[TOC] ## demo 打印节点 ``` (function(win){ 'use strict'; var document = win.document; //非必须 function ready(selector, fn){ check(selector,fn); } function check(selector,fn){ var dom =document.querySelector(selector) fn(dom); } // 对外暴露ready win.getDom = ready; })(this); // usage getDom('h1', function(element){ console.log(element); }); ```