faux moz dom 用于测试目的的DOMRequest和DOMCursor的模拟实现
人造世界在这一点上,我什至不认为这是一个好主意……安装$ npm install michaelrhodes/faux-moz-dom用法var FauxDOMRequest = require ( 'faux-moz-dom/request' ) var FauxDOMCursor = require ( 'faux-moz-dom/cursor' ) var requestSomething = function ( ) { var request = new FauxDOMRequest setTimeout ( function ( ) { request . readyState = 'done' request . result = 'Great job!' if ( typeof request . onsuccess === 'f
用户评论