twixt-document

call function when document is ready

Usage no npm install needed!

<script type="module">
  import twixtDocument from 'https://cdn.skypack.dev/twixt-document';
</script>

README

twixt-document Function

var doc = require("twixt-document");

doc(function(document) {
    document.getElementById("foo");
});

Custom Document

var doc = require("twixt-document")(document);

doc(function(document) {
    // document is the document passed to the require above
});