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

Function _moveBefore

www/js/_hyperscript.js:3678–3687  ·  view source on GitHub ↗
(parentNode, element, after)

Source from the content-addressed store, hash-verified

3676 }
3677 }
3678 function _moveBefore(parentNode, element, after) {
3679 if (parentNode.moveBefore) {
3680 try {
3681 parentNode.moveBefore(element, after);
3682 return;
3683 } catch (e) {
3684 }
3685 }
3686 parentNode.insertBefore(element, after);
3687 }
3688 function _copyAttributes(destination, source) {
3689 for (var attr of source.attributes) {
3690 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