Skip to content

Instantly share code, notes, and snippets.

@1cg
1cg / primer.js
Created February 2, 2024 02:36 — forked from makinde/primer.js
!function() {
var doc = document,
htm = doc.documentElement,
lct = null, // last click target
nearest = function(elm, tag) {
while (elm && elm.nodeName != tag) {
elm = elm.parentNode;
}
return elm;
};
function controlStuff(){
var listOfThings = loadThings()
for(thing in listOfThings.whereTypeIs(CanDoSomething)){
thing.doSomething()
}
}
// or just...
function controlStuff(){