Skip to content

Instantly share code, notes, and snippets.



Created Jul 22, 2013
What would you like to do?
macro forThing {
case $val ($a:expr, $b:expr) => {(function($val){$b, this)}).bind($a)}
case $val ($a:expr) => {(function($val){,this)}).bind($a)}
function makeMutationObserver(tag){
var queue= tag.queue,
put= queue.put.bind(queue),
mutationAddObserve= forThing val (put, val.getElementsByTagName(this.tag)),
mutationObserver= forThing val (mutationAddObserve, val.addedNodes),
mutationsObserver= forThing val (mutationObserver)
return new MutationObserver(mutationsObserver)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.