Revert "Commit updated Javascript packages"
This reverts commit a88734348a.
This commit is contained in:
22
build/javascript/node_modules/preact/src/util.js
generated
vendored
22
build/javascript/node_modules/preact/src/util.js
generated
vendored
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Assign properties from `props` to `obj`
|
||||
* @template O, P The obj and props types
|
||||
* @param {O} obj The object to copy properties to
|
||||
* @param {P} props The object to copy properties from
|
||||
* @returns {O & P}
|
||||
*/
|
||||
export function assign(obj, props) {
|
||||
for (let i in props) obj[i] = props[i];
|
||||
return /** @type {O & P} */ (obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a child node from its parent if attached. This is a workaround for
|
||||
* IE11 which doesn't support `Element.prototype.remove()`. Using this function
|
||||
* is smaller than including a dedicated polyfill.
|
||||
* @param {Node} node The node to remove
|
||||
*/
|
||||
export function removeNode(node) {
|
||||
let parentNode = node.parentNode;
|
||||
if (parentNode) parentNode.removeChild(node);
|
||||
}
|
||||
Reference in New Issue
Block a user