Created
May 23, 2018 18:02
-
-
Save neopunisher/14459477e74ecbd46318ca79fa7cdb9b to your computer and use it in GitHub Desktop.
does stuff when things are added to the page... via https://github.com/muicss/sentineljs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(style, func){ | |
document.addEventListener('sentinel-load', function(){ | |
sentinel.on(style, func); | |
}) | |
var a=document.createElement("script");a.src='//cdn.rawgit.com/muicss/sentineljs/0.0.4/dist/sentinel.min.js';a.type="text/javascript"; | |
document.head.appendChild(a); | |
})('.my-div', function(el) { | |
el.innerHTML = 'The sentinel is always watching.'; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment