Sha256: af7850504b69081e332425d73c09bb54e8cadb0f1c94b073052a83af675e8e5b
Contents?: true
Size: 1.46 KB
Versions: 11
Compression:
Stored size: 1.46 KB
Contents
$debug("Defining HTMLHeadElement"); /* * HTMLHeadElement - DOM Level 2 */ var HTMLHeadElement = function(ownerDocument) { this.HTMLElement = HTMLElement; this.HTMLElement(ownerDocument); }; HTMLHeadElement.prototype = new HTMLElement; __extend__(HTMLHeadElement.prototype, { get profile(){ return this.getAttribute('profile'); }, set profile(value){ this.setAttribute('profile', value); }, //we override this so we can apply browser behavior specific to head children //like loading scripts appendChild : function(newChild) { var newChild = HTMLElement.prototype.appendChild.apply(this,[newChild]); //__evalScript__(newChild); return newChild; }, insertBefore : function(newChild, refChild) { var newChild = HTMLElement.prototype.insertBefore.apply(this,[newChild]); //__evalScript__(newChild); return newChild; } }); var __evalScript__ = function(newChild){ //check to see if this is a script element and apply a script loading strategy //the check against the ownerDocument isnt really enough to support frames in // the long run, but for now it's ok if(newChild.nodeType == DOMNode.ELEMENT_NODE && newChild.ownerDocument == window.document ){ if(newChild.nodeName.toUpperCase() == "SCRIPT"){ $debug("loading script via policy. "); $policy.loadScript(newChild); } } }; // $w.HTMLHeadElement = HTMLHeadElement;
Version data entries
11 entries across 11 versions & 2 rubygems