Skip to content

Instantly share code, notes, and snippets.

@juner
Created July 24, 2016 06:11
Show Gist options
  • Save juner/d56cfcf1f83f342e5e71cc7a790529ca to your computer and use it in GitHub Desktop.
Save juner/d56cfcf1f83f342e5e71cc7a790529ca to your computer and use it in GitHub Desktop.
コンソールを用いたワンライナー TIPS(IE11) ref: http://qiita.com/juner/items/d64c4e2cad1c9c2674bc
[].filter.call($$(selector),function(element){ return element.textContent.indexOf("hoge") != -1; });
[].forEach.call($$(selector),function(element){ console.dir(element);});
["id1","id2","id3"].map(function(id){ return document.getElementById(id); });
[].map.call($$(selector),function(element){ return ["attrName1","attrName2"].reduce(function(obj,name){ return obj[name] = element.getAttribute(name),obj; },{}); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment