Comparing version 0.0.13 to 0.0.14
@@ -47,1 +47,3 @@ export declare type ForgoRef<T> = { | ||
export declare function rerender(element: ForgoElementArg | undefined, props?: undefined, fullRerender?: boolean): void; | ||
export declare function getForgoState(node: ChildNode): NodeAttachedState | undefined; | ||
export declare function setForgoState(node: ChildNode, state: NodeAttachedState): void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.rerender = exports.render = exports.mount = exports.setCustomEnv = void 0; | ||
exports.setForgoState = exports.getForgoState = exports.rerender = exports.render = exports.mount = exports.setCustomEnv = void 0; | ||
/* | ||
@@ -237,3 +237,3 @@ The element types we care about. | ||
for (let i = forgoChildIndex; i < findResult.index; i++) { | ||
unloadNode(parentElement, childNodes[i]); | ||
unloadNode(childNodes[i]); | ||
} | ||
@@ -257,3 +257,3 @@ internalRender(forgoChild, childNodes[forgoChildIndex], [], fullRerender); | ||
for (let i = forgoChildIndex; i < childNodes.length; i++) { | ||
unloadNode(parentElement, childNodes[i]); | ||
unloadNode(childNodes[i]); | ||
} | ||
@@ -267,4 +267,4 @@ } | ||
*/ | ||
function unloadNode(parentElement, node) { | ||
parentElement.removeChild(node); | ||
function unloadNode(node) { | ||
node.remove(); | ||
const state = getForgoState(node); | ||
@@ -466,2 +466,3 @@ if (state) { | ||
} | ||
exports.getForgoState = getForgoState; | ||
/* | ||
@@ -479,2 +480,3 @@ Same as above, but will never be undefined. (Caller makes sure.) | ||
} | ||
exports.setForgoState = setForgoState; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "forgo", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"main": "./dist", | ||
@@ -5,0 +5,0 @@ "devDependencies": { |
@@ -457,3 +457,3 @@ /* | ||
for (let i = forgoChildIndex; i < findResult.index; i++) { | ||
unloadNode(parentElement, childNodes[i]); | ||
unloadNode(childNodes[i]); | ||
} | ||
@@ -485,3 +485,3 @@ internalRender( | ||
for (let i = forgoChildIndex; i < childNodes.length; i++) { | ||
unloadNode(parentElement, childNodes[i]); | ||
unloadNode(childNodes[i]); | ||
} | ||
@@ -496,4 +496,4 @@ } | ||
*/ | ||
function unloadNode(parentElement: HTMLElement, node: ChildNode) { | ||
parentElement.removeChild(node); | ||
function unloadNode(node: ChildNode) { | ||
node.remove(); | ||
const state = getForgoState(node); | ||
@@ -742,3 +742,3 @@ if (state) { | ||
*/ | ||
function getForgoState(node: ChildNode): NodeAttachedState | undefined { | ||
export function getForgoState(node: ChildNode): NodeAttachedState | undefined { | ||
return (node as any).__forgo; | ||
@@ -757,4 +757,4 @@ } | ||
*/ | ||
function setForgoState(node: ChildNode, state: NodeAttachedState): void { | ||
export function setForgoState(node: ChildNode, state: NodeAttachedState): void { | ||
(node as any).__forgo = state; | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72082
1219