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

Function _moveBefore

www/js/_hyperscript-max.js:3677–3686  ·  view source on GitHub ↗
(parentNode, element, after)

Source from the content-addressed store, hash-verified

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