dom

dom

Methods

(static) getSiblings(node, predicate) → {Array}

Source:

Create a router

Parameters:
Name Type Description
node HTMLELement

the target element

predicate function

the function to be used by filter

Returns:
  • an array of sibling elements
Type
Array

(static) insertAfter() → {void}

Source:
Properties:
Name Type Description
node HTMLElement | String

the node to insert

before HTMLelement

the node to insert after

Insert a dom node before another node

Returns:
Type
void

(static) insertBefore() → {void}

Source:
Properties:
Name Type Description
node HTMLElement | String

the node to insert

before HTMLelement

the node to insert before

Insert a dom node before another node

Returns:
Type
void

(static) setStyle(:HTMLELement)

Source:
Example
setStyle(document.getElementById('a'), {
  transition: 'all 300ms ease',
	 'margin-top': '20px'
})
Parameters:
Name Type Description
:HTMLELement
Object