MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / _moveBefore

Function _moveBefore

www/js/_hyperscript.esm.js:3676–3685  ·  view source on GitHub ↗
(parentNode, element, after)

Source from the content-addressed store, hash-verified

3674 }
3675}
3676function _moveBefore(parentNode, element, after) {
3677 if (parentNode.moveBefore) {
3678 try {
3679 parentNode.moveBefore(element, after);
3680 return;
3681 } catch (e) {
3682 }
3683 }
3684 parentNode.insertBefore(element, after);
3685}
3686function _copyAttributes(destination, source) {
3687 for (var attr of source.attributes) {
3688 if (destination.getAttribute(attr.name) !== attr.value) {

Callers 2

_morphChildrenFunction · 0.70
_removeNodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected