<commit_before>var sys = require("sys");
var dom = require("../../lib/level1/core").dom.level1.core;

var window = {document: new dom.Document()};
var navigator = { userAgent: "node-js" };

//var jQuery = require("./node-jquery").jQueryInit(window, navigator);
var jQuery = require("./node-jquery");

for (var i = 0; i<10; i++)
{
  var p = window.document.createElement("p")
  p.setAttribute("class", "paragraph-" + i);
  p.appendChild(window.document.createTextNode("Item #" + i));
  
}

sys.puts(jQuery.dollar("p#paragraph-5", window.document).length);
<commit_msg>working on getting around compareDocumentPosition<commit_after>var sys = require("sys"), 
    dom = require("../../lib/level1/core").dom.level1.core,
    fs = require("fs");
window = global;
global.document =  new dom.Document();
global.navigator = { userAgent: "node-js" };

fs.readFile(__dirname + "/jquery.js", function(err, data) {

  for (var i = 0; i<10; i++)
  {
    var p = window.document.createElement("p")
    p.setAttribute("class", "paragraph-" + i);
    p.appendChild(window.document.createTextNode("Item #" + i));
  }

  sys.puts(jQuery("p#paragraph-5", window.document).length);
  
  global.document.documentElement.compareDocumentPosition = function() {};
  
  sys.puts(sys.inspect(eval(data)));

  

  //var jQuery = require("./node-jquery").jQueryInit(window, navigator);


})
{'fraction_non_alphanumeric': 0.19750367107195302, 'fraction_numerical': 0.00881057268722467, 'mean_word_length': 4.262548262548263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5134236', 'n_tokens_mistral': 457, 'n_tokens_neox': 443, 'n_words': 84}