rob@77: /** rob@77: * Returns an array of elements with the given IDs, eg. rob@77: * @example q("main", "foo", "bar") rob@77: * @result [
, , ] rob@77: */ rob@77: var query_ids = function() { rob@77: var r = []; rob@77: rob@77: for ( var i = 0; i < arguments.length; i++ ) { rob@77: r.push( document.getElementById( arguments[i] ) ); rob@77: } rob@77: rob@77: return r; rob@77: }; rob@77: rob@77: var recreate_doc = function(html) { rob@77: document = require('jsdom').jsdom(html); rob@77: window = document.createWindow(); rob@77: return require(process.cwd() + '/lib/node-jquery').create(window); rob@77: }; rob@77: rob@77: rob@77: exports.query_ids = query_ids; rob@77: exports.recreate_doc = recreate_doc;