public
Created

  • Download Gist
gistfile1.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11
var Document = function() {};
Document.prototype = parser.prototype;
//or
Document.prototype = parser;
 
Document.prototype.__defineGetter__('body') = function() {
return this.getElementsByTagName('body')[0];
}
 
var document = new Document();
document.body; //Reference to the BODY element

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.