Skip to content

Instantly share code, notes, and snippets.

Created September 23, 2010 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/064e49090300f8bfa36f to your computer and use it in GitHub Desktop.
Save anonymous/064e49090300f8bfa36f to your computer and use it in GitHub Desktop.
uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOM3Document.domConfig]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: http://localhost:8000/test.js :: run :: line 53" data: no]
>>> var request = "window.document";
>>> var result = new Array;
>>> var i = 0;
>>> eval('for(key in '+request+'){result[i]=eval("typeof '+request+'."+key);result[i+1]="'+request+'."+key;i+=2;}');
>>> result.length
304
// Dean Edwards/Matthias Miller/John Resig
function init() {
// quit if this function has already been called
if (arguments.callee.done) return;
// flag this function so we don't do the same thing twice
arguments.callee.done = true;
// kill the timer
if (_timer) clearInterval(_timer);
// do stuff
run();
};
/* for Mozilla/Opera9 */
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", init, false);
}
/* for Internet Explorer */
/*@cc_on @*/
/*@if (@_win32)
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
if (this.readyState == "complete") {
init(); // call the onload handler
}
};
/*@end @*/
/* for Safari */
if (/WebKit/i.test(navigator.userAgent)) { // sniff
var _timer = setInterval(function() {
if (/loaded|complete/.test(document.readyState)) {
init(); // call the onload handler
}
}, 10);
}
/* for other browsers */
window.onload = init;
/* End Dean Edwards/Matthaias Miller/John Resig */
function run() {
var request = "window.document";
var result = new Array;
var i = 0;
eval('for(key in '+request+'){result[i]=eval("typeof '+request+'."+key);result[i+1]="'+request+'."+key;i+=2;}');
console.log(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment