@frontmeans/dom-primitives

DOM primitives

Usage no npm install needed!

<script type="module">
  import frontmeansDomPrimitives from 'https://cdn.skypack.dev/@frontmeans/dom-primitives';
</script>

README

DOM Primitives

NPM Build Status GitHub Project API Documentation

An assorted set of basic DOM-related. See the API documentation.

DOM Node Types

These function check whether the target DOM node is of corresponding type:

DOM Inspection

  • nodeDocument - Returns a document of the given DOM node.

  • nodeHost - Finds a host element of the given DOM node. I.e. an enclosing element.

    Crosses shadow DOM bounds.

  • nodeWindow - Returns an owner window of the given DOM node.

DOM Manipulation