foxts 3.14.0 → 3.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/empty-node.d.ts +7 -4
- package/dist/empty-node.js +1 -1
- package/dist/empty-node.mjs +1 -1
- package/package.json +1 -1
package/dist/empty-node.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* if you are trying to empty an Element, use `emptyElement` method instead, it will opt-in more performant method on modern browsers.
|
|
3
|
+
*/
|
|
4
|
+
declare function emptyNode(node: Node): void;
|
|
5
|
+
declare function emptyElementModern(element: Element): void;
|
|
3
6
|
/**
|
|
4
7
|
* Use `Element.replaceChildren` if available, otherwise fall back to removing each child node.
|
|
5
8
|
*/
|
|
6
|
-
declare const
|
|
9
|
+
declare const emptyElement: (element: Element) => void;
|
|
7
10
|
|
|
8
|
-
export {
|
|
11
|
+
export { emptyElement, emptyElementModern, emptyNode };
|
package/dist/empty-node.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){for(;e.firstChild;)e.removeChild(e.lastChild)}function t(e){e.replaceChildren()}Object.defineProperty(exports,"__esModule",{value:!0});let
|
|
1
|
+
function e(e){for(;e.firstChild;)e.removeChild(e.lastChild)}function t(e){e.replaceChildren()}Object.defineProperty(exports,"__esModule",{value:!0});let l="undefined"!=typeof Element&&"replaceChildren"in Element.prototype?t:e;exports.emptyElement=l,exports.emptyElementModern=t,exports.emptyNode=e;
|
package/dist/empty-node.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){for(;e.firstChild;)e.removeChild(e.lastChild)}function t(e){e.replaceChildren()}let n="undefined"!=typeof Element&&"replaceChildren"in Element.prototype?t:e;export{n as
|
|
1
|
+
function e(e){for(;e.firstChild;)e.removeChild(e.lastChild)}function t(e){e.replaceChildren()}let n="undefined"!=typeof Element&&"replaceChildren"in Element.prototype?t:e;export{n as emptyElement,t as emptyElementModern,e as emptyNode};
|