I already have a set of functions I use to extend the document (i.e. bind/unbind). So I can do stuff like: document.bind('load',someAction,{})
But it doesn't work if I do: $('some_iframe').contentWindow.document.bind(...)
And apparently, $('some_iframe').contentWindow.document.prototype
doesn't exist.
EDIT: Here is the code breakdown:
//the eggplant library
eggp = {
extend: function(dest, source){
for(var prop in source)
dest.prototype[prop] = source[prop];
return dest;
},
//other functions below...
bind{},
unbind{}
}
//extend the DOM
eggp.extend(Document, eggp);
//extending the iframe document DOESN'T WORK
eggp.extend(someiframe.contentWindow.document, eggp);
I've checked to see if someiframe.contentWindow.document
is undefined, but it returns object HTMLDocument