diff --git a/bin/prototype-1.6.0.3-test.js b/bin/prototype-1.6.0.3-test.js
index 80a2b342..c92e47d4 100644
--- a/bin/prototype-1.6.0.3-test.js
+++ b/bin/prototype-1.6.0.3-test.js
@@ -1,5 +1,5 @@
//debugger;
-load("build/runtest/env.js");
+load("env.js");
(function($env){
@@ -7,27 +7,6 @@ load("build/runtest/env.js");
//let it load the script from the html
scriptTypes: {
"text/javascript" :true
- },
- afterload:{
- 'qunit/testrunner.js': function(){
- //hook into qunit.log
- var count = 0;
- QUnit.log = function(result, message){
- $env.log('(' + (count++) + ')[' +
- ((!!result) ? 'PASS' : 'FAIL') + '] ' + message);
- };
- //hook into qunit.done
- QUnit.done = function(pass, fail){
- $env.warn('Writing Results to File');
- jQuery('script').each(function(){
- this.type = 'text/envjs';
- });
- $env.writeToFile(
- document.documentElement.xml,
- $env.location('jqenv.html')
- );
- };
- }
}
});
diff --git a/bin/test-prototype.sh b/bin/test-prototype.sh
index e13f865b..1ce56bf0 100755
--- a/bin/test-prototype.sh
+++ b/bin/test-prototype.sh
@@ -24,8 +24,9 @@ ant concat
if [ ! -d "$PROTOTYPE_DIR" ]; then
git clone git://github.com/sstephenson/prototype.git $PROTOTYPE_DIR
+ # - prepares tests - #
cd $PROTOTYPE_DIR
- rake test #prepares tests
+ rake test
cd -
fi
@@ -34,15 +35,14 @@ cp rhino/js.jar $PROTOTYPE_DIR/test/js.jar
cp bin/prototype-$VERSION-test.js $PROTOTYPE_DIR/test/test.js
cd $PROTOTYPE_DIR
-git submodule init
-git submodule update
-
-
-#if [ $DEBUG -eq 1 ]; then
-# echo 'running with rhino debugger'
-# java -cp js.jar org.mozilla.javascript.tools.debugger.Main test.js;
-#else
-# echo 'running with rhino'
-# java -jar js.jar -w -debug test.js;
-#fi
+git submodule init #allow prototype to discover test framework dependencies
+git submodule update #load the dicovered dependencies
+
+if [ $DEBUG -eq 1 ]; then
+ echo 'running with rhino debugger'
+ java -cp js.jar org.mozilla.javascript.tools.debugger.Main test.js;
+else
+ echo 'running with rhino'
+ java -jar js.jar -w -debug test.js;
+fi
diff --git a/build.xml b/build.xml
index 7d36443f..5e6702a1 100644
--- a/build.xml
+++ b/build.xml
@@ -3,7 +3,7 @@
Builds, tests, and runs the project Env.
-
+
" string that ends the CDATA section
@@ -1694,16 +1658,12 @@ __extend__(DOMCDATASection.prototype,{
toString : function(){
return "CDATA #"+this._id;
}
-});$debug("Defining Comment");
+});
+
+$w.CDATASection = DOMCDATASection;$debug("Defining Comment");
/*
* Comment - DOM Level 2
*/
-$w.__defineGetter__("Comment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMComment - This represents the content of a comment, i.e., all the characters between the starting ''
* @extends DOMCharacterData
@@ -1728,27 +1688,21 @@ __extend__(DOMComment.prototype, {
return "Comment #"+this._id;
}
});
+
+$w.Comment = DOMComment;
$debug("Defining DocumentType");
;/*
* DocumentType - DOM Level 2
*/
-$w.__defineGetter__('DocumentType', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
+var DOMDocumentType = function() {
+ $error("DOMDocumentType.constructor(): Not Implemented" );
+};
-var DOMDocumentType = function() { $error("DOMDocumentType.constructor(): Not Implemented" ); };$debug("Defining Attr");
+$w.DocumentType = DOMDocumentType;
+$debug("Defining Attr");
/*
* Attr - DOM Level 2
*/
-$w.__defineGetter__("Attr", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMAttr - The Attr interface represents an attribute in an Element object
* @extends DOMNode
@@ -1794,19 +1748,10 @@ __extend__(DOMAttr.prototype, {
toString : function(){
return "Attr #" + this._id + " " + this.name;
}
-});
-
-$debug("Defining Element");
-/*
-* Element - DOM Level 2
-*/
-$w.__defineGetter__("Element", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
});
-
+$w.Attr = DOMAttr;
+$debug("Defining Element");
/**
* @class DOMElement - By far the vast majority of objects (apart from text) that authors encounter
* when traversing a document are Element nodes.
@@ -2010,6 +1955,7 @@ __extend__(DOMElement.prototype, {
}
});
+$w.Element = DOMElement;
/**
* @class DOMException - raised when an operation is impossible to perform
* @author Jon van Noort (jon@webarcana.com.au)
@@ -2042,12 +1988,6 @@ $debug("Defining DocumentFragment");
/*
* DocumentFragment - DOM Level 2
*/
-$w.__defineGetter__("DocumentFragment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMDocumentFragment - DocumentFragment is a "lightweight" or "minimal" Document object.
* @extends DOMNode
@@ -2079,16 +2019,12 @@ __extend__(DOMDocumentFragment.prototype,{
return "DocumentFragment #"+this._id;
}
});
+
+$w.DocumentFragment = DOMDocumentFragment;
$debug("Defining ProcessingInstruction");
/*
* ProcessingInstruction - DOM Level 2
*/
-$w.__defineGetter__('ProcessingInstruction', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMProcessingInstruction - The ProcessingInstruction interface represents a "processing instruction",
* used in XML as a way to keep processor-specific information in the text of the document
@@ -2128,6 +2064,8 @@ __extend__(DOMProcessingInstruction.prototype, {
return "ProcessingInstruction #"+this._id;
}
});
+
+$w.ProcessesingInstruction = DOMProcessingInstruction;
$debug("Defining DOMParser");
/*
* DOMParser
@@ -2145,7 +2083,7 @@ $debug("Initializing Internal DOMParser.");
//keep one around for internal use
$domparser = new DOMParser();
-$w.__defineGetter__('DOMParser', DOMParser);
+$w.DOMParser = DOMParser;
// =========================================================================
//
// xmlsax.js - an XML SAX parser in JavaScript.
@@ -3301,12 +3239,6 @@ function __unescapeXML__(str) {
//DOMImplementation
$debug("Defining DOMImplementation");
-$w.__defineGetter__("DOMImplementation", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMImplementation - provides a number of methods for performing operations
* that are independent of any particular instance of the document object model.
@@ -3878,17 +3810,6 @@ $debug("Initializing document.implementation");
var $implementation = new DOMImplementation();
$implementation.namespaceAware = false;
$implementation.errorChecking = false;$debug("Defining Document");
-/*
-* Document - DOM Level 2
-* The Document object is not directly
-*/
-$w.__defineGetter__('Document', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -4264,6 +4185,8 @@ var __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribut
return valid;
};
+
+$w.Document = DOMDocument;
/*
* parser.js
*/
@@ -4607,13 +4530,7 @@ var __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribut
$debug("Defining HTMLDocument");
/*
* HTMLDocument - DOM Level 2
-* The Document object is not directly
*/
-$w.__defineGetter__("HTMLDocument", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
/**
* @class HTMLDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -4793,33 +4710,11 @@ __extend__(HTMLDocument.prototype, {
}
});
-//This is useful as html elements that modify the dom must also run through the new
-//nodes and determine if they are javascript tags and load it. This is really the fun
-//parts! ;)
-function __execScripts__( node ) {
- if ( node.nodeName == "SCRIPT" ) {
- if ( !node.getAttribute("src") ) {
- eval.call( window, node.textContent );
- }
- } else {
- var scripts = node.getElementsByTagName("script");
- for ( var i = 0; i < scripts.length; i++ ) {
- __execScripts__( node );
- }
- }
-};$debug("Defining HTMLElement");
+$w.HTMLDocument = HTMLDocument;
+$debug("Defining HTMLElement");
/*
* HTMLElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.HTMLElement.__defineGetter__("prototype", function(){
- return HTMLElement.prototype;
-});
-
var HTMLElement = function(ownerDocument) {
this.DOMElement = DOMElement;
this.DOMElement(ownerDocument);
@@ -5034,17 +4929,13 @@ var __blur__ = function(element){
event.initEvent("blur");
element.dispatchEvent(event);
};
+
+$w.HTMLElement = HTMLElement;
$debug("Defining HTMLCollection");
/*
* HTMLCollection - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLCollection", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLCollection = function(nodelist, type){
__setArray__(this, []);
@@ -5071,6 +4962,8 @@ HTMLCollection.prototype = {
}
};
+$w.HTMLCollection = HTMLCollection;
+
/*var HTMLCollection = function(nodelist, type){
var $items = [],
$item, i;
@@ -5113,12 +5006,6 @@ HTMLCollection.prototype = {
/*
* HTMLAnchorElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAnchorElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAnchorElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -5232,21 +5119,14 @@ __extend__(HTMLAnchorElement.prototype, {
}
});
- $debug("Defining Anchor");
+$w.HTMLAnchorElement = HTMLAnchorElement;$debug("Defining Anchor");
/*
* Anchor - DOM Level 2
*/
-$w.__defineGetter__("Anchor", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var Anchor = function(ownerDocument) {
this.HTMLAnchorElement = HTMLAnchorElement;
this.HTMLAnchorElement(ownerDocument);
};
-Anchor.prototype = new Anchor;
(function(){
//static regular expressions
@@ -5317,16 +5197,12 @@ Anchor.prototype = new Anchor;
});
})();
- $debug("Defining HTMLAreaElement");
+
+$w.Anchor = Anchor;
+$debug("Defining HTMLAreaElement");
/*
* HTMLAreaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAreaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAreaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5378,16 +5254,11 @@ __extend__(HTMLAreaElement.prototype, {
}
});
+$w.HTMLAreaElement = HTMLAreaElement;
$debug("Defining HTMLBaseElement");
/*
* HTMLBaseElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLBaseElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLBaseElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -5409,16 +5280,10 @@ __extend__(HTMLBaseElement.prototype, {
}
});
- $debug("Defining HTMLQuoteElement");
+$w.HTMLBaseElement = HTMLBaseElement; $debug("Defining HTMLQuoteElement");
/*
* HTMLQuoteElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLQuoteElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLQuoteElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5433,16 +5298,10 @@ __extend__(HTMLQuoteElement.prototype, {
}
});
- $debug("Defining HTMLButtonElement");
+$w.HTMLQuoteElement = HTMLQuoteElement; $debug("Defining HTMLButtonElement");
/*
* HTMLButtonElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLButtonElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLButtonElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5482,16 +5341,10 @@ __extend__(HTMLButtonElement.prototype, {
}
});
- $debug("Defining HTMLTableColElement");
+$w.HTMLButtonElement = HTMLButtonElement; $debug("Defining HTMLTableColElement");
/*
* HTMLTableColElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLTableColElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableColElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5536,16 +5389,11 @@ __extend__(HTMLTableColElement.prototype, {
}
});
- $debug("Defining HTMLModElement");
+$w.HTMLTableColElement = HTMLTableColElement;
+$debug("Defining HTMLModElement");
/*
* HTMLModElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLModElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLModElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5566,16 +5414,10 @@ __extend__(HTMLModElement.prototype, {
}
});
- $debug("Defining HTMLFieldSetElement");
+$w.HTMLModElement = HTMLModElement; $debug("Defining HTMLFieldSetElement");
/*
* HTMLFieldSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFieldSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFieldSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5591,21 +5433,10 @@ __extend__(HTMLFieldSetElement.prototype, {
}
});
- $debug("Defining HTMLFormElement");
+$w.HTMLFieldSetElement = HTMLFieldSetElement; $debug("Defining HTMLFormElement");
/*
-* HTMLAnchorElement - DOM Level 2
+* HTMLFormElement - DOM Level 2
*/
-$w.__defineGetter__("Form", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.__defineGetter__("HTMLFormElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFormElement = function(ownerDocument){
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5678,16 +5509,10 @@ __extend__(HTMLFormElement.prototype,{
}
});
- $debug("Defining HTMLFrameElement");
+$w.HTMLFormElement = HTMLFormElement;$debug("Defining HTMLFrameElement");
/*
* HTMLFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5759,16 +5584,11 @@ __extend__(HTMLFrameElement.prototype, {
}
});
- $debug("Defining HTMLFrameSetElement");
+$w.HTMLFrameElement = HTMLFrameElement;
+$debug("Defining HTMLFrameSetElement");
/*
* HTMLFrameSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5789,16 +5609,10 @@ __extend__(HTMLFrameSetElement.prototype, {
}
});
- $debug("Defining HTMLHeadElement");
+$w.HTMLFrameSetElement = HTMLFrameSetElement; $debug("Defining HTMLHeadElement");
/*
* HTMLHeadElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLHeadElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLHeadElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5836,16 +5650,13 @@ var __evalScript__ = function(newChild){
$policy.loadScript(newChild);
}
}
-};$debug("Defining HTMLIFrameElement");
+};
+
+$w.HTMLHeadElement = HTMLHeadElement;
+$debug("Defining HTMLIFrameElement");
/*
* HTMLIFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLIFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLIFrameElement = function(ownerDocument) {
this.HTMLFrameElement = HTMLFrameElement;
this.HTMLFrameElement(ownerDocument);
@@ -5866,17 +5677,11 @@ __extend__(HTMLIFrameElement.prototype, {
}
});
-
+$w.HTMLIFrameElement = HTMLIFrameElement;
$debug("Defining HTMLImageElement");
/*
* HTMLImageElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLImageElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLImageElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5927,16 +5732,10 @@ __extend__(HTMLImageElement.prototype, {
}
});
- $debug("Defining HTMLInputElement");
+$w.HTMLImageElement = HTMLImageElement;$debug("Defining HTMLInputElement");
/*
* HTMLInputElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLInputElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLInputElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6058,16 +5857,10 @@ __extend__(HTMLInputElement.prototype, {
}
});
- $debug("Defining HTMLLabelElement");
+$w.HTMLInputElement = HTMLInputElement;$debug("Defining HTMLLabelElement");
/*
* HTMLLabelElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLabelElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLabelElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6095,16 +5888,10 @@ __extend__(HTMLLabelElement.prototype, {
}
});
- $debug("Defining HTMLLegendElement");
+$w.HTMLLabelElement = HTMLLabelElement; $debug("Defining HTMLLegendElement");
/*
* HTMLLegendElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLegendElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLegendElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6126,7 +5913,7 @@ __extend__(HTMLLegendElement.prototype, {
}
});
- /**
+$w.HTMLLegendElement = HTMLLegendElement; /**
* Link - HTMLElement
*/
$w.__defineGetter__("Link", function(){
@@ -6140,12 +5927,6 @@ $debug("Defining HTMLLinkElement");
/*
* HTMLLinkElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLinkElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLinkElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6208,18 +5989,11 @@ __extend__(HTMLLinkElement.prototype, {
}
});
-
-
- $debug("Defining HTMLMapElement");
+$w.HTMLLinkElement = HTMLLinkElement;
+$debug("Defining HTMLMapElement");
/*
* HTMLMapElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMapElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMapElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6237,16 +6011,10 @@ __extend__(HTMLMapElement.prototype, {
}
});
- $debug("Defining HTMLMetaElement");
+$w.HTMLMapElement = HTMLMapElement;$debug("Defining HTMLMetaElement");
/*
* HTMLMetaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMetaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMetaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6279,16 +6047,11 @@ __extend__(HTMLMetaElement.prototype, {
}
});
- $debug("Defining HTMLObjectElement");
+$w.HTMLMetaElement = HTMLMetaElement;
+$debug("Defining HTMLObjectElement");
/*
* HTMLObjectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLObjectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLObjectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6372,16 +6135,11 @@ __extend__(HTMLObjectElement.prototype, {
}
});
+$w.HTMLObjectElement = HTMLObjectElement;
$debug("Defining HTMLOptGroupElement");
/*
* HTMLOptGroupElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptGroupElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptGroupElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6402,16 +6160,10 @@ __extend__(HTMLOptGroupElement.prototype, {
},
});
- $debug("Defining HTMLOptionElement");
+$w.HTMLOptGroupElement = HTMLOptGroupElement; $debug("Defining HTMLOptionElement");
/*
* HTMLOptionElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6472,16 +6224,11 @@ __extend__(HTMLOptionElement.prototype, {
}
});
- $debug("Defining HTMLParamElement");
+$w.HTMLOptionElement = HTMLOptionElement;
+$debug("Defining HTMLParamElement");
/*
* HTMLParamElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLParamElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLParamElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6514,16 +6261,11 @@ __extend__(HTMLParamElement.prototype, {
},
});
- $debug("Defining HTMLScriptElement");
+$w.HTMLParamElement = HTMLParamElement;
+ $debug("Defining HTMLScriptElement");
/*
* HTMLScriptElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLScriptElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLScriptElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6583,16 +6325,10 @@ __extend__(HTMLScriptElement.prototype, {
}
});
- $debug("Defining HTMLSelectElement");
+$w.HTMLScriptElement = HTMLScriptElement;$debug("Defining HTMLSelectElement");
/*
* HTMLSelectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLSelectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLSelectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6694,16 +6430,10 @@ __extend__(HTMLSelectElement.prototype, {
}
});
- $debug("Defining HTMLStyleElement");
+$w.HTMLSelectElement = HTMLSelectElement;$debug("Defining HTMLStyleElement");
/*
* HTMLStyleElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLStyleElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLStyleElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6730,19 +6460,12 @@ __extend__(HTMLStyleElement.prototype, {
}
});
- $debug("Defining HTMLTableElement");
+$w.HTMLStyleElement = HTMLStyleElement;$debug("Defining HTMLTableElement");
/*
* HTMLTableElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableElement = function(ownerDocument) {
-
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6928,20 +6651,13 @@ __extend__(HTMLTableElement.prototype, {
this.setAttribute("width", width);
}
-
});
- $debug("Defining HTMLxElement");
+$w.HTMLTableElement = HTMLTableElement; $debug("Defining HTMLTableSectionElement");
/*
* HTMLxElement - DOM Level 2
* - Contributed by Steven Wood
*/
-$w.__defineGetter__("HTMLTableSectionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableSectionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7027,17 +6743,12 @@ __extend__(HTMLTableSectionElement.prototype, {
});
- $debug("Defining HTMLTableCellElement");
+$w.HTMLTableSectionElement = HTMLTableSectionElement;
+$debug("Defining HTMLTableCellElement");
/*
* HTMLTableCellElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableCellElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableCellElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7050,17 +6761,11 @@ __extend__(HTMLTableCellElement.prototype, {
});
- $debug("Defining HTMLRowElement");
+$w.HTMLTableCellElement = HTMLTableCellElement;$debug("Defining HTMLTableRowElement");
/*
* HTMLRowElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableRowElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableRowElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7160,7 +6865,8 @@ __extend__(HTMLTableRowElement.prototype, {
});
- /**
+$w.HTMLTableRowElement = HTMLTableRowElement;
+/**
* @author thatcher
*/
$debug("Defining XMLSerializer");
@@ -7288,20 +6994,6 @@ __extend__(XSLTProcessor.prototype, {
/*
* event.js
*/
-$w.__defineGetter__("Event", function(){
- __extend__(this,{
- CAPTURING_PHASE : 1,
- AT_TARGET : 2,
- BUBBLING_PHASE : 3
- });
- if(this.__output__ == undefined) {
- this.__output__ = function(){
- throw new Error("Object cannot be created in this context");
- };
- }
- return this.__output__;
-});
-
var Event = function(options){
if(options === undefined){
options={target:window,currentTarget:window};
@@ -7337,6 +7029,7 @@ var Event = function(options){
});
};
+$w.Event = Event;
$debug("Defining MouseEvent");
/*
* mouseevent.js
@@ -7351,13 +7044,6 @@ var $onblur,
$onresize;/*
* CSS2Properties - DOM Level 2 CSS
*/
-$w.__defineGetter__("CSS2Properties", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
var CSS2Properties = function(options){
__extend__(this, __supportedStyles__);
__cssTextToStyles__(this, options.cssText?options.cssText:"");
@@ -7562,15 +7248,11 @@ var __supportedStyles__ = {
width: "",
wordSpacing: "",
zIndex: ""
-};/*
+};
+
+$w.CSS2Properties = CSS2Properties;/*
* CSSRule - DOM Level 2
*/
-$w.__defineGetter__("CSSRule", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSRule = function(options){
var $style,
$selectorText = options.selectorText?options.selectorText:"";
@@ -7589,15 +7271,10 @@ var CSSRule = function(options){
}
});
};
+$w.CSSRule = CSSRule;
/*
* CSSStyleSheet - DOM Level 2
*/
-$w.__defineGetter__("CSSStyleSheet", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSStyleSheet = function(options){
var $cssRules,
$disabled = options.disabled?options.disabled:false,
@@ -7645,6 +7322,8 @@ var CSSStyleSheet = function(options){
removeRule: function(index){this.deleteRule(index);}//IE - may be deprecated
});
};
+
+$w.CSSStyleSheet = CSSStyleSheet;
/*
* location.js
* - requires env
diff --git a/dist/env.js b/dist/env.js
index 680ca90d..29e564d7 100644
--- a/dist/env.js
+++ b/dist/env.js
@@ -238,13 +238,6 @@ $debug("Defining NodeList");
/*
* NodeList - DOM Level 2
*/
-$w.__defineGetter__('NodeList', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMNodeList - provides the abstraction of an ordered collection of nodes
*
@@ -436,6 +429,7 @@ var __cloneNodes__ = function(nodelist, deep, parentNode) {
return cloneNodeList;
};
+$w.NodeList = DOMNodeList;
/**
* @class DOMNamedNodeMap - used to represent collections of nodes that can be accessed by name
@@ -803,22 +797,6 @@ $debug("Defining Node");
/*
* Node - DOM Level 2
*/
-$w.__defineGetter__('Node', function(){
- return __extend__(function(){
- throw new Error("Object cannot be created in this context");
- } , {
- ELEMENT_NODE :1,
- ATTRIBUTE_NODE :2,
- TEXT_NODE :3,
- CDATA_SECTION_NODE: 4,
- PROCESSING_INSTRUCTION_NODE: 7,
- COMMENT_NODE: 8,
- DOCUMENT_NODE: 9,
- DOCUMENT_TYPE_NODE: 10,
- DOCUMENT_FRAGMENT_NODE: 11
- });
-});
-
/**
* @class DOMNode - The Node interface is the primary datatype for the entire Document Object Model.
* It represents a single node in the document tree.
@@ -1410,6 +1388,9 @@ var __isAncestor__ = function(target, node) {
var __ownerDocument__ = function(node){
return (node.nodeType == DOMNode.DOCUMENT_NODE)?node:node.ownerDocument;
};
+
+$w.Node = DOMNode;
+
/**
* @class DOMNamespace - The Namespace interface represents an namespace in an Element object
*
@@ -1463,12 +1444,6 @@ $debug("Defining CharacterData");
/*
* CharacterData - DOM Level 2
*/
-$w.__defineGetter__("CharacterData", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMCharacterData - parent abstract class for DOMText and DOMComment
* @extends DOMNode
@@ -1582,16 +1557,11 @@ __extend__(DOMCharacterData.prototype,{
return ret;
}
});
-$debug("Defining Text");
+
+$w.CharacterData = DOMCharacterData;$debug("Defining Text");
/*
* Text - DOM Level 2
*/
-$w.__defineGetter__("Text", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMText - The Text interface represents the textual content (termed character data in XML) of an Element or Attr.
* If there is no markup inside an element's content, the text is contained in a single object implementing the Text interface
@@ -1601,7 +1571,7 @@ $w.__defineGetter__("Text", function(){
* @author Jon van Noort (jon@webarcana.com.au) and David Joham (djoham@yahoo.com)
* @param ownerDocument : DOMDocument - The Document object associated with this node.
*/
-DOMText = function(ownerDocument) {
+var DOMText = function(ownerDocument) {
this.DOMCharacterData = DOMCharacterData;
this.DOMCharacterData(ownerDocument);
@@ -1660,16 +1630,10 @@ __extend__(DOMText.prototype,{
}
});
-$debug("Defining CDATASection");
+$w.Text = DOMText;$debug("Defining CDATASection");
/*
* CDATASection - DOM Level 2
*/
-$w.__defineGetter__("CDATASection", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMCDATASection - CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
* The only delimiter that is recognized in a CDATA section is the "\]\]\>" string that ends the CDATA section
@@ -1694,16 +1658,12 @@ __extend__(DOMCDATASection.prototype,{
toString : function(){
return "CDATA #"+this._id;
}
-});$debug("Defining Comment");
+});
+
+$w.CDATASection = DOMCDATASection;$debug("Defining Comment");
/*
* Comment - DOM Level 2
*/
-$w.__defineGetter__("Comment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMComment - This represents the content of a comment, i.e., all the characters between the starting ''
* @extends DOMCharacterData
@@ -1728,27 +1688,21 @@ __extend__(DOMComment.prototype, {
return "Comment #"+this._id;
}
});
+
+$w.Comment = DOMComment;
$debug("Defining DocumentType");
;/*
* DocumentType - DOM Level 2
*/
-$w.__defineGetter__('DocumentType', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
+var DOMDocumentType = function() {
+ $error("DOMDocumentType.constructor(): Not Implemented" );
+};
-var DOMDocumentType = function() { $error("DOMDocumentType.constructor(): Not Implemented" ); };$debug("Defining Attr");
+$w.DocumentType = DOMDocumentType;
+$debug("Defining Attr");
/*
* Attr - DOM Level 2
*/
-$w.__defineGetter__("Attr", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMAttr - The Attr interface represents an attribute in an Element object
* @extends DOMNode
@@ -1794,19 +1748,10 @@ __extend__(DOMAttr.prototype, {
toString : function(){
return "Attr #" + this._id + " " + this.name;
}
-});
-
-$debug("Defining Element");
-/*
-* Element - DOM Level 2
-*/
-$w.__defineGetter__("Element", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
});
-
+$w.Attr = DOMAttr;
+$debug("Defining Element");
/**
* @class DOMElement - By far the vast majority of objects (apart from text) that authors encounter
* when traversing a document are Element nodes.
@@ -2010,6 +1955,7 @@ __extend__(DOMElement.prototype, {
}
});
+$w.Element = DOMElement;
/**
* @class DOMException - raised when an operation is impossible to perform
* @author Jon van Noort (jon@webarcana.com.au)
@@ -2042,12 +1988,6 @@ $debug("Defining DocumentFragment");
/*
* DocumentFragment - DOM Level 2
*/
-$w.__defineGetter__("DocumentFragment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMDocumentFragment - DocumentFragment is a "lightweight" or "minimal" Document object.
* @extends DOMNode
@@ -2079,16 +2019,12 @@ __extend__(DOMDocumentFragment.prototype,{
return "DocumentFragment #"+this._id;
}
});
+
+$w.DocumentFragment = DOMDocumentFragment;
$debug("Defining ProcessingInstruction");
/*
* ProcessingInstruction - DOM Level 2
*/
-$w.__defineGetter__('ProcessingInstruction', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMProcessingInstruction - The ProcessingInstruction interface represents a "processing instruction",
* used in XML as a way to keep processor-specific information in the text of the document
@@ -2128,6 +2064,8 @@ __extend__(DOMProcessingInstruction.prototype, {
return "ProcessingInstruction #"+this._id;
}
});
+
+$w.ProcessesingInstruction = DOMProcessingInstruction;
$debug("Defining DOMParser");
/*
* DOMParser
@@ -2145,7 +2083,7 @@ $debug("Initializing Internal DOMParser.");
//keep one around for internal use
$domparser = new DOMParser();
-$w.__defineGetter__('DOMParser', DOMParser);
+$w.DOMParser = DOMParser;
// =========================================================================
//
// xmlsax.js - an XML SAX parser in JavaScript.
@@ -3301,12 +3239,6 @@ function __unescapeXML__(str) {
//DOMImplementation
$debug("Defining DOMImplementation");
-$w.__defineGetter__("DOMImplementation", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMImplementation - provides a number of methods for performing operations
* that are independent of any particular instance of the document object model.
@@ -3878,17 +3810,6 @@ $debug("Initializing document.implementation");
var $implementation = new DOMImplementation();
$implementation.namespaceAware = false;
$implementation.errorChecking = false;$debug("Defining Document");
-/*
-* Document - DOM Level 2
-* The Document object is not directly
-*/
-$w.__defineGetter__('Document', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -4264,6 +4185,8 @@ var __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribut
return valid;
};
+
+$w.Document = DOMDocument;
/*
* parser.js
*/
@@ -4607,13 +4530,7 @@ var __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribut
$debug("Defining HTMLDocument");
/*
* HTMLDocument - DOM Level 2
-* The Document object is not directly
*/
-$w.__defineGetter__("HTMLDocument", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
/**
* @class HTMLDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -4793,33 +4710,11 @@ __extend__(HTMLDocument.prototype, {
}
});
-//This is useful as html elements that modify the dom must also run through the new
-//nodes and determine if they are javascript tags and load it. This is really the fun
-//parts! ;)
-function __execScripts__( node ) {
- if ( node.nodeName == "SCRIPT" ) {
- if ( !node.getAttribute("src") ) {
- eval.call( window, node.textContent );
- }
- } else {
- var scripts = node.getElementsByTagName("script");
- for ( var i = 0; i < scripts.length; i++ ) {
- __execScripts__( node );
- }
- }
-};$debug("Defining HTMLElement");
+$w.HTMLDocument = HTMLDocument;
+$debug("Defining HTMLElement");
/*
* HTMLElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.HTMLElement.__defineGetter__("prototype", function(){
- return HTMLElement.prototype;
-});
-
var HTMLElement = function(ownerDocument) {
this.DOMElement = DOMElement;
this.DOMElement(ownerDocument);
@@ -5034,17 +4929,13 @@ var __blur__ = function(element){
event.initEvent("blur");
element.dispatchEvent(event);
};
+
+$w.HTMLElement = HTMLElement;
$debug("Defining HTMLCollection");
/*
* HTMLCollection - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLCollection", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLCollection = function(nodelist, type){
__setArray__(this, []);
@@ -5071,6 +4962,8 @@ HTMLCollection.prototype = {
}
};
+$w.HTMLCollection = HTMLCollection;
+
/*var HTMLCollection = function(nodelist, type){
var $items = [],
$item, i;
@@ -5113,12 +5006,6 @@ HTMLCollection.prototype = {
/*
* HTMLAnchorElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAnchorElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAnchorElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -5232,21 +5119,14 @@ __extend__(HTMLAnchorElement.prototype, {
}
});
- $debug("Defining Anchor");
+$w.HTMLAnchorElement = HTMLAnchorElement;$debug("Defining Anchor");
/*
* Anchor - DOM Level 2
*/
-$w.__defineGetter__("Anchor", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var Anchor = function(ownerDocument) {
this.HTMLAnchorElement = HTMLAnchorElement;
this.HTMLAnchorElement(ownerDocument);
};
-Anchor.prototype = new Anchor;
(function(){
//static regular expressions
@@ -5317,16 +5197,12 @@ Anchor.prototype = new Anchor;
});
})();
- $debug("Defining HTMLAreaElement");
+
+$w.Anchor = Anchor;
+$debug("Defining HTMLAreaElement");
/*
* HTMLAreaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAreaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAreaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5378,16 +5254,11 @@ __extend__(HTMLAreaElement.prototype, {
}
});
+$w.HTMLAreaElement = HTMLAreaElement;
$debug("Defining HTMLBaseElement");
/*
* HTMLBaseElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLBaseElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLBaseElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -5409,16 +5280,10 @@ __extend__(HTMLBaseElement.prototype, {
}
});
- $debug("Defining HTMLQuoteElement");
+$w.HTMLBaseElement = HTMLBaseElement; $debug("Defining HTMLQuoteElement");
/*
* HTMLQuoteElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLQuoteElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLQuoteElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5433,16 +5298,10 @@ __extend__(HTMLQuoteElement.prototype, {
}
});
- $debug("Defining HTMLButtonElement");
+$w.HTMLQuoteElement = HTMLQuoteElement; $debug("Defining HTMLButtonElement");
/*
* HTMLButtonElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLButtonElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLButtonElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5482,16 +5341,10 @@ __extend__(HTMLButtonElement.prototype, {
}
});
- $debug("Defining HTMLTableColElement");
+$w.HTMLButtonElement = HTMLButtonElement; $debug("Defining HTMLTableColElement");
/*
* HTMLTableColElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLTableColElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableColElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5536,16 +5389,11 @@ __extend__(HTMLTableColElement.prototype, {
}
});
- $debug("Defining HTMLModElement");
+$w.HTMLTableColElement = HTMLTableColElement;
+$debug("Defining HTMLModElement");
/*
* HTMLModElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLModElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLModElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5566,16 +5414,10 @@ __extend__(HTMLModElement.prototype, {
}
});
- $debug("Defining HTMLFieldSetElement");
+$w.HTMLModElement = HTMLModElement; $debug("Defining HTMLFieldSetElement");
/*
* HTMLFieldSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFieldSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFieldSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5591,21 +5433,10 @@ __extend__(HTMLFieldSetElement.prototype, {
}
});
- $debug("Defining HTMLFormElement");
+$w.HTMLFieldSetElement = HTMLFieldSetElement; $debug("Defining HTMLFormElement");
/*
-* HTMLAnchorElement - DOM Level 2
+* HTMLFormElement - DOM Level 2
*/
-$w.__defineGetter__("Form", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.__defineGetter__("HTMLFormElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFormElement = function(ownerDocument){
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5678,16 +5509,10 @@ __extend__(HTMLFormElement.prototype,{
}
});
- $debug("Defining HTMLFrameElement");
+$w.HTMLFormElement = HTMLFormElement;$debug("Defining HTMLFrameElement");
/*
* HTMLFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5759,16 +5584,11 @@ __extend__(HTMLFrameElement.prototype, {
}
});
- $debug("Defining HTMLFrameSetElement");
+$w.HTMLFrameElement = HTMLFrameElement;
+$debug("Defining HTMLFrameSetElement");
/*
* HTMLFrameSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5789,16 +5609,10 @@ __extend__(HTMLFrameSetElement.prototype, {
}
});
- $debug("Defining HTMLHeadElement");
+$w.HTMLFrameSetElement = HTMLFrameSetElement; $debug("Defining HTMLHeadElement");
/*
* HTMLHeadElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLHeadElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLHeadElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5836,16 +5650,13 @@ var __evalScript__ = function(newChild){
$policy.loadScript(newChild);
}
}
-};$debug("Defining HTMLIFrameElement");
+};
+
+$w.HTMLHeadElement = HTMLHeadElement;
+$debug("Defining HTMLIFrameElement");
/*
* HTMLIFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLIFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLIFrameElement = function(ownerDocument) {
this.HTMLFrameElement = HTMLFrameElement;
this.HTMLFrameElement(ownerDocument);
@@ -5866,17 +5677,11 @@ __extend__(HTMLIFrameElement.prototype, {
}
});
-
+$w.HTMLIFrameElement = HTMLIFrameElement;
$debug("Defining HTMLImageElement");
/*
* HTMLImageElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLImageElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLImageElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5927,16 +5732,10 @@ __extend__(HTMLImageElement.prototype, {
}
});
- $debug("Defining HTMLInputElement");
+$w.HTMLImageElement = HTMLImageElement;$debug("Defining HTMLInputElement");
/*
* HTMLInputElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLInputElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLInputElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6058,16 +5857,10 @@ __extend__(HTMLInputElement.prototype, {
}
});
- $debug("Defining HTMLLabelElement");
+$w.HTMLInputElement = HTMLInputElement;$debug("Defining HTMLLabelElement");
/*
* HTMLLabelElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLabelElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLabelElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6095,16 +5888,10 @@ __extend__(HTMLLabelElement.prototype, {
}
});
- $debug("Defining HTMLLegendElement");
+$w.HTMLLabelElement = HTMLLabelElement; $debug("Defining HTMLLegendElement");
/*
* HTMLLegendElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLegendElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLegendElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6126,7 +5913,7 @@ __extend__(HTMLLegendElement.prototype, {
}
});
- /**
+$w.HTMLLegendElement = HTMLLegendElement; /**
* Link - HTMLElement
*/
$w.__defineGetter__("Link", function(){
@@ -6140,12 +5927,6 @@ $debug("Defining HTMLLinkElement");
/*
* HTMLLinkElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLinkElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLinkElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6208,18 +5989,11 @@ __extend__(HTMLLinkElement.prototype, {
}
});
-
-
- $debug("Defining HTMLMapElement");
+$w.HTMLLinkElement = HTMLLinkElement;
+$debug("Defining HTMLMapElement");
/*
* HTMLMapElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMapElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMapElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6237,16 +6011,10 @@ __extend__(HTMLMapElement.prototype, {
}
});
- $debug("Defining HTMLMetaElement");
+$w.HTMLMapElement = HTMLMapElement;$debug("Defining HTMLMetaElement");
/*
* HTMLMetaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMetaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMetaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6279,16 +6047,11 @@ __extend__(HTMLMetaElement.prototype, {
}
});
- $debug("Defining HTMLObjectElement");
+$w.HTMLMetaElement = HTMLMetaElement;
+$debug("Defining HTMLObjectElement");
/*
* HTMLObjectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLObjectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLObjectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6372,16 +6135,11 @@ __extend__(HTMLObjectElement.prototype, {
}
});
+$w.HTMLObjectElement = HTMLObjectElement;
$debug("Defining HTMLOptGroupElement");
/*
* HTMLOptGroupElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptGroupElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptGroupElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6402,16 +6160,10 @@ __extend__(HTMLOptGroupElement.prototype, {
},
});
- $debug("Defining HTMLOptionElement");
+$w.HTMLOptGroupElement = HTMLOptGroupElement; $debug("Defining HTMLOptionElement");
/*
* HTMLOptionElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6472,16 +6224,11 @@ __extend__(HTMLOptionElement.prototype, {
}
});
- $debug("Defining HTMLParamElement");
+$w.HTMLOptionElement = HTMLOptionElement;
+$debug("Defining HTMLParamElement");
/*
* HTMLParamElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLParamElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLParamElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6514,16 +6261,11 @@ __extend__(HTMLParamElement.prototype, {
},
});
- $debug("Defining HTMLScriptElement");
+$w.HTMLParamElement = HTMLParamElement;
+ $debug("Defining HTMLScriptElement");
/*
* HTMLScriptElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLScriptElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLScriptElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6583,16 +6325,10 @@ __extend__(HTMLScriptElement.prototype, {
}
});
- $debug("Defining HTMLSelectElement");
+$w.HTMLScriptElement = HTMLScriptElement;$debug("Defining HTMLSelectElement");
/*
* HTMLSelectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLSelectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLSelectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6694,16 +6430,10 @@ __extend__(HTMLSelectElement.prototype, {
}
});
- $debug("Defining HTMLStyleElement");
+$w.HTMLSelectElement = HTMLSelectElement;$debug("Defining HTMLStyleElement");
/*
* HTMLStyleElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLStyleElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLStyleElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6730,19 +6460,12 @@ __extend__(HTMLStyleElement.prototype, {
}
});
- $debug("Defining HTMLTableElement");
+$w.HTMLStyleElement = HTMLStyleElement;$debug("Defining HTMLTableElement");
/*
* HTMLTableElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableElement = function(ownerDocument) {
-
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6928,20 +6651,13 @@ __extend__(HTMLTableElement.prototype, {
this.setAttribute("width", width);
}
-
});
- $debug("Defining HTMLxElement");
+$w.HTMLTableElement = HTMLTableElement; $debug("Defining HTMLTableSectionElement");
/*
* HTMLxElement - DOM Level 2
* - Contributed by Steven Wood
*/
-$w.__defineGetter__("HTMLTableSectionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableSectionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7027,17 +6743,12 @@ __extend__(HTMLTableSectionElement.prototype, {
});
- $debug("Defining HTMLTableCellElement");
+$w.HTMLTableSectionElement = HTMLTableSectionElement;
+$debug("Defining HTMLTableCellElement");
/*
* HTMLTableCellElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableCellElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableCellElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7050,17 +6761,11 @@ __extend__(HTMLTableCellElement.prototype, {
});
- $debug("Defining HTMLRowElement");
+$w.HTMLTableCellElement = HTMLTableCellElement;$debug("Defining HTMLTableRowElement");
/*
* HTMLRowElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableRowElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableRowElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7160,7 +6865,8 @@ __extend__(HTMLTableRowElement.prototype, {
});
- /**
+$w.HTMLTableRowElement = HTMLTableRowElement;
+/**
* @author thatcher
*/
$debug("Defining XMLSerializer");
@@ -7288,20 +6994,6 @@ __extend__(XSLTProcessor.prototype, {
/*
* event.js
*/
-$w.__defineGetter__("Event", function(){
- __extend__(this,{
- CAPTURING_PHASE : 1,
- AT_TARGET : 2,
- BUBBLING_PHASE : 3
- });
- if(this.__output__ == undefined) {
- this.__output__ = function(){
- throw new Error("Object cannot be created in this context");
- };
- }
- return this.__output__;
-});
-
var Event = function(options){
if(options === undefined){
options={target:window,currentTarget:window};
@@ -7337,6 +7029,7 @@ var Event = function(options){
});
};
+$w.Event = Event;
$debug("Defining MouseEvent");
/*
* mouseevent.js
@@ -7351,13 +7044,6 @@ var $onblur,
$onresize;/*
* CSS2Properties - DOM Level 2 CSS
*/
-$w.__defineGetter__("CSS2Properties", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
var CSS2Properties = function(options){
__extend__(this, __supportedStyles__);
__cssTextToStyles__(this, options.cssText?options.cssText:"");
@@ -7562,15 +7248,11 @@ var __supportedStyles__ = {
width: "",
wordSpacing: "",
zIndex: ""
-};/*
+};
+
+$w.CSS2Properties = CSS2Properties;/*
* CSSRule - DOM Level 2
*/
-$w.__defineGetter__("CSSRule", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSRule = function(options){
var $style,
$selectorText = options.selectorText?options.selectorText:"";
@@ -7589,15 +7271,10 @@ var CSSRule = function(options){
}
});
};
+$w.CSSRule = CSSRule;
/*
* CSSStyleSheet - DOM Level 2
*/
-$w.__defineGetter__("CSSStyleSheet", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSStyleSheet = function(options){
var $cssRules,
$disabled = options.disabled?options.disabled:false,
@@ -7645,6 +7322,8 @@ var CSSStyleSheet = function(options){
removeRule: function(index){this.deleteRule(index);}//IE - may be deprecated
});
};
+
+$w.CSSStyleSheet = CSSStyleSheet;
/*
* location.js
* - requires env
diff --git a/dist/env.rhino.0.9.5.js b/dist/env.rhino.0.9.6.js
similarity index 96%
rename from dist/env.rhino.0.9.5.js
rename to dist/env.rhino.0.9.6.js
index d3544ae0..d85b1dd8 100644
--- a/dist/env.rhino.0.9.5.js
+++ b/dist/env.rhino.0.9.6.js
@@ -631,13 +631,6 @@ $debug("Defining NodeList");
/*
* NodeList - DOM Level 2
*/
-$w.__defineGetter__('NodeList', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMNodeList - provides the abstraction of an ordered collection of nodes
*
@@ -829,6 +822,7 @@ var __cloneNodes__ = function(nodelist, deep, parentNode) {
return cloneNodeList;
};
+$w.NodeList = DOMNodeList;
/**
* @class DOMNamedNodeMap - used to represent collections of nodes that can be accessed by name
@@ -1196,22 +1190,6 @@ $debug("Defining Node");
/*
* Node - DOM Level 2
*/
-$w.__defineGetter__('Node', function(){
- return __extend__(function(){
- throw new Error("Object cannot be created in this context");
- } , {
- ELEMENT_NODE :1,
- ATTRIBUTE_NODE :2,
- TEXT_NODE :3,
- CDATA_SECTION_NODE: 4,
- PROCESSING_INSTRUCTION_NODE: 7,
- COMMENT_NODE: 8,
- DOCUMENT_NODE: 9,
- DOCUMENT_TYPE_NODE: 10,
- DOCUMENT_FRAGMENT_NODE: 11
- });
-});
-
/**
* @class DOMNode - The Node interface is the primary datatype for the entire Document Object Model.
* It represents a single node in the document tree.
@@ -1803,6 +1781,9 @@ var __isAncestor__ = function(target, node) {
var __ownerDocument__ = function(node){
return (node.nodeType == DOMNode.DOCUMENT_NODE)?node:node.ownerDocument;
};
+
+$w.Node = DOMNode;
+
/**
* @class DOMNamespace - The Namespace interface represents an namespace in an Element object
*
@@ -1856,12 +1837,6 @@ $debug("Defining CharacterData");
/*
* CharacterData - DOM Level 2
*/
-$w.__defineGetter__("CharacterData", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMCharacterData - parent abstract class for DOMText and DOMComment
* @extends DOMNode
@@ -1975,16 +1950,11 @@ __extend__(DOMCharacterData.prototype,{
return ret;
}
});
-$debug("Defining Text");
+
+$w.CharacterData = DOMCharacterData;$debug("Defining Text");
/*
* Text - DOM Level 2
*/
-$w.__defineGetter__("Text", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMText - The Text interface represents the textual content (termed character data in XML) of an Element or Attr.
* If there is no markup inside an element's content, the text is contained in a single object implementing the Text interface
@@ -1994,7 +1964,7 @@ $w.__defineGetter__("Text", function(){
* @author Jon van Noort (jon@webarcana.com.au) and David Joham (djoham@yahoo.com)
* @param ownerDocument : DOMDocument - The Document object associated with this node.
*/
-DOMText = function(ownerDocument) {
+var DOMText = function(ownerDocument) {
this.DOMCharacterData = DOMCharacterData;
this.DOMCharacterData(ownerDocument);
@@ -2053,16 +2023,10 @@ __extend__(DOMText.prototype,{
}
});
-$debug("Defining CDATASection");
+$w.Text = DOMText;$debug("Defining CDATASection");
/*
* CDATASection - DOM Level 2
*/
-$w.__defineGetter__("CDATASection", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMCDATASection - CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
* The only delimiter that is recognized in a CDATA section is the "\]\]\>" string that ends the CDATA section
@@ -2087,16 +2051,12 @@ __extend__(DOMCDATASection.prototype,{
toString : function(){
return "CDATA #"+this._id;
}
-});$debug("Defining Comment");
+});
+
+$w.CDATASection = DOMCDATASection;$debug("Defining Comment");
/*
* Comment - DOM Level 2
*/
-$w.__defineGetter__("Comment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMComment - This represents the content of a comment, i.e., all the characters between the starting ''
* @extends DOMCharacterData
@@ -2121,27 +2081,21 @@ __extend__(DOMComment.prototype, {
return "Comment #"+this._id;
}
});
+
+$w.Comment = DOMComment;
$debug("Defining DocumentType");
;/*
* DocumentType - DOM Level 2
*/
-$w.__defineGetter__('DocumentType', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
+var DOMDocumentType = function() {
+ $error("DOMDocumentType.constructor(): Not Implemented" );
+};
-var DOMDocumentType = function() { $error("DOMDocumentType.constructor(): Not Implemented" ); };$debug("Defining Attr");
+$w.DocumentType = DOMDocumentType;
+$debug("Defining Attr");
/*
* Attr - DOM Level 2
*/
-$w.__defineGetter__("Attr", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMAttr - The Attr interface represents an attribute in an Element object
* @extends DOMNode
@@ -2187,19 +2141,10 @@ __extend__(DOMAttr.prototype, {
toString : function(){
return "Attr #" + this._id + " " + this.name;
}
-});
-
-$debug("Defining Element");
-/*
-* Element - DOM Level 2
-*/
-$w.__defineGetter__("Element", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
});
-
+$w.Attr = DOMAttr;
+$debug("Defining Element");
/**
* @class DOMElement - By far the vast majority of objects (apart from text) that authors encounter
* when traversing a document are Element nodes.
@@ -2403,6 +2348,7 @@ __extend__(DOMElement.prototype, {
}
});
+$w.Element = DOMElement;
/**
* @class DOMException - raised when an operation is impossible to perform
* @author Jon van Noort (jon@webarcana.com.au)
@@ -2435,12 +2381,6 @@ $debug("Defining DocumentFragment");
/*
* DocumentFragment - DOM Level 2
*/
-$w.__defineGetter__("DocumentFragment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMDocumentFragment - DocumentFragment is a "lightweight" or "minimal" Document object.
* @extends DOMNode
@@ -2472,16 +2412,12 @@ __extend__(DOMDocumentFragment.prototype,{
return "DocumentFragment #"+this._id;
}
});
+
+$w.DocumentFragment = DOMDocumentFragment;
$debug("Defining ProcessingInstruction");
/*
* ProcessingInstruction - DOM Level 2
*/
-$w.__defineGetter__('ProcessingInstruction', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMProcessingInstruction - The ProcessingInstruction interface represents a "processing instruction",
* used in XML as a way to keep processor-specific information in the text of the document
@@ -2521,6 +2457,8 @@ __extend__(DOMProcessingInstruction.prototype, {
return "ProcessingInstruction #"+this._id;
}
});
+
+$w.ProcessesingInstruction = DOMProcessingInstruction;
$debug("Defining DOMParser");
/*
* DOMParser
@@ -2538,7 +2476,7 @@ $debug("Initializing Internal DOMParser.");
//keep one around for internal use
$domparser = new DOMParser();
-$w.__defineGetter__('DOMParser', DOMParser);
+$w.DOMParser = DOMParser;
// =========================================================================
//
// xmlsax.js - an XML SAX parser in JavaScript.
@@ -3694,12 +3632,6 @@ function __unescapeXML__(str) {
//DOMImplementation
$debug("Defining DOMImplementation");
-$w.__defineGetter__("DOMImplementation", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMImplementation - provides a number of methods for performing operations
* that are independent of any particular instance of the document object model.
@@ -4271,17 +4203,6 @@ $debug("Initializing document.implementation");
var $implementation = new DOMImplementation();
$implementation.namespaceAware = false;
$implementation.errorChecking = false;$debug("Defining Document");
-/*
-* Document - DOM Level 2
-* The Document object is not directly
-*/
-$w.__defineGetter__('Document', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -4657,6 +4578,8 @@ var __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribut
return valid;
};
+
+$w.Document = DOMDocument;
/*
* parser.js
*/
@@ -5000,13 +4923,7 @@ var __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribut
$debug("Defining HTMLDocument");
/*
* HTMLDocument - DOM Level 2
-* The Document object is not directly
*/
-$w.__defineGetter__("HTMLDocument", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
/**
* @class HTMLDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -5186,33 +5103,11 @@ __extend__(HTMLDocument.prototype, {
}
});
-//This is useful as html elements that modify the dom must also run through the new
-//nodes and determine if they are javascript tags and load it. This is really the fun
-//parts! ;)
-function __execScripts__( node ) {
- if ( node.nodeName == "SCRIPT" ) {
- if ( !node.getAttribute("src") ) {
- eval.call( window, node.textContent );
- }
- } else {
- var scripts = node.getElementsByTagName("script");
- for ( var i = 0; i < scripts.length; i++ ) {
- __execScripts__( node );
- }
- }
-};$debug("Defining HTMLElement");
+$w.HTMLDocument = HTMLDocument;
+$debug("Defining HTMLElement");
/*
* HTMLElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.HTMLElement.__defineGetter__("prototype", function(){
- return HTMLElement.prototype;
-});
-
var HTMLElement = function(ownerDocument) {
this.DOMElement = DOMElement;
this.DOMElement(ownerDocument);
@@ -5427,17 +5322,13 @@ var __blur__ = function(element){
event.initEvent("blur");
element.dispatchEvent(event);
};
+
+$w.HTMLElement = HTMLElement;
$debug("Defining HTMLCollection");
/*
* HTMLCollection - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLCollection", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLCollection = function(nodelist, type){
__setArray__(this, []);
@@ -5464,6 +5355,8 @@ HTMLCollection.prototype = {
}
};
+$w.HTMLCollection = HTMLCollection;
+
/*var HTMLCollection = function(nodelist, type){
var $items = [],
$item, i;
@@ -5506,12 +5399,6 @@ HTMLCollection.prototype = {
/*
* HTMLAnchorElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAnchorElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAnchorElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -5625,21 +5512,14 @@ __extend__(HTMLAnchorElement.prototype, {
}
});
- $debug("Defining Anchor");
+$w.HTMLAnchorElement = HTMLAnchorElement;$debug("Defining Anchor");
/*
* Anchor - DOM Level 2
*/
-$w.__defineGetter__("Anchor", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var Anchor = function(ownerDocument) {
this.HTMLAnchorElement = HTMLAnchorElement;
this.HTMLAnchorElement(ownerDocument);
};
-Anchor.prototype = new Anchor;
(function(){
//static regular expressions
@@ -5710,16 +5590,12 @@ Anchor.prototype = new Anchor;
});
})();
- $debug("Defining HTMLAreaElement");
+
+$w.Anchor = Anchor;
+$debug("Defining HTMLAreaElement");
/*
* HTMLAreaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAreaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAreaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5771,16 +5647,11 @@ __extend__(HTMLAreaElement.prototype, {
}
});
+$w.HTMLAreaElement = HTMLAreaElement;
$debug("Defining HTMLBaseElement");
/*
* HTMLBaseElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLBaseElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLBaseElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -5802,16 +5673,10 @@ __extend__(HTMLBaseElement.prototype, {
}
});
- $debug("Defining HTMLQuoteElement");
+$w.HTMLBaseElement = HTMLBaseElement; $debug("Defining HTMLQuoteElement");
/*
* HTMLQuoteElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLQuoteElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLQuoteElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5826,16 +5691,10 @@ __extend__(HTMLQuoteElement.prototype, {
}
});
- $debug("Defining HTMLButtonElement");
+$w.HTMLQuoteElement = HTMLQuoteElement; $debug("Defining HTMLButtonElement");
/*
* HTMLButtonElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLButtonElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLButtonElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5875,16 +5734,10 @@ __extend__(HTMLButtonElement.prototype, {
}
});
- $debug("Defining HTMLTableColElement");
+$w.HTMLButtonElement = HTMLButtonElement; $debug("Defining HTMLTableColElement");
/*
* HTMLTableColElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLTableColElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableColElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5929,16 +5782,11 @@ __extend__(HTMLTableColElement.prototype, {
}
});
- $debug("Defining HTMLModElement");
+$w.HTMLTableColElement = HTMLTableColElement;
+$debug("Defining HTMLModElement");
/*
* HTMLModElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLModElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLModElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5959,16 +5807,10 @@ __extend__(HTMLModElement.prototype, {
}
});
- $debug("Defining HTMLFieldSetElement");
+$w.HTMLModElement = HTMLModElement; $debug("Defining HTMLFieldSetElement");
/*
* HTMLFieldSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFieldSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFieldSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5984,21 +5826,10 @@ __extend__(HTMLFieldSetElement.prototype, {
}
});
- $debug("Defining HTMLFormElement");
+$w.HTMLFieldSetElement = HTMLFieldSetElement; $debug("Defining HTMLFormElement");
/*
-* HTMLAnchorElement - DOM Level 2
+* HTMLFormElement - DOM Level 2
*/
-$w.__defineGetter__("Form", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.__defineGetter__("HTMLFormElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFormElement = function(ownerDocument){
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6071,16 +5902,10 @@ __extend__(HTMLFormElement.prototype,{
}
});
- $debug("Defining HTMLFrameElement");
+$w.HTMLFormElement = HTMLFormElement;$debug("Defining HTMLFrameElement");
/*
* HTMLFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6152,16 +5977,11 @@ __extend__(HTMLFrameElement.prototype, {
}
});
- $debug("Defining HTMLFrameSetElement");
+$w.HTMLFrameElement = HTMLFrameElement;
+$debug("Defining HTMLFrameSetElement");
/*
* HTMLFrameSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6182,16 +6002,10 @@ __extend__(HTMLFrameSetElement.prototype, {
}
});
- $debug("Defining HTMLHeadElement");
+$w.HTMLFrameSetElement = HTMLFrameSetElement; $debug("Defining HTMLHeadElement");
/*
* HTMLHeadElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLHeadElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLHeadElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6229,16 +6043,13 @@ var __evalScript__ = function(newChild){
$policy.loadScript(newChild);
}
}
-};$debug("Defining HTMLIFrameElement");
+};
+
+$w.HTMLHeadElement = HTMLHeadElement;
+$debug("Defining HTMLIFrameElement");
/*
* HTMLIFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLIFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLIFrameElement = function(ownerDocument) {
this.HTMLFrameElement = HTMLFrameElement;
this.HTMLFrameElement(ownerDocument);
@@ -6259,17 +6070,11 @@ __extend__(HTMLIFrameElement.prototype, {
}
});
-
+$w.HTMLIFrameElement = HTMLIFrameElement;
$debug("Defining HTMLImageElement");
/*
* HTMLImageElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLImageElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLImageElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6320,16 +6125,10 @@ __extend__(HTMLImageElement.prototype, {
}
});
- $debug("Defining HTMLInputElement");
+$w.HTMLImageElement = HTMLImageElement;$debug("Defining HTMLInputElement");
/*
* HTMLInputElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLInputElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLInputElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6451,16 +6250,10 @@ __extend__(HTMLInputElement.prototype, {
}
});
- $debug("Defining HTMLLabelElement");
+$w.HTMLInputElement = HTMLInputElement;$debug("Defining HTMLLabelElement");
/*
* HTMLLabelElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLabelElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLabelElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6488,16 +6281,10 @@ __extend__(HTMLLabelElement.prototype, {
}
});
- $debug("Defining HTMLLegendElement");
+$w.HTMLLabelElement = HTMLLabelElement; $debug("Defining HTMLLegendElement");
/*
* HTMLLegendElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLegendElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLegendElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6519,7 +6306,7 @@ __extend__(HTMLLegendElement.prototype, {
}
});
- /**
+$w.HTMLLegendElement = HTMLLegendElement; /**
* Link - HTMLElement
*/
$w.__defineGetter__("Link", function(){
@@ -6533,12 +6320,6 @@ $debug("Defining HTMLLinkElement");
/*
* HTMLLinkElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLinkElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLinkElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6601,18 +6382,11 @@ __extend__(HTMLLinkElement.prototype, {
}
});
-
-
- $debug("Defining HTMLMapElement");
+$w.HTMLLinkElement = HTMLLinkElement;
+$debug("Defining HTMLMapElement");
/*
* HTMLMapElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMapElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMapElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6630,16 +6404,10 @@ __extend__(HTMLMapElement.prototype, {
}
});
- $debug("Defining HTMLMetaElement");
+$w.HTMLMapElement = HTMLMapElement;$debug("Defining HTMLMetaElement");
/*
* HTMLMetaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMetaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMetaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6672,16 +6440,11 @@ __extend__(HTMLMetaElement.prototype, {
}
});
- $debug("Defining HTMLObjectElement");
+$w.HTMLMetaElement = HTMLMetaElement;
+$debug("Defining HTMLObjectElement");
/*
* HTMLObjectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLObjectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLObjectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6765,16 +6528,11 @@ __extend__(HTMLObjectElement.prototype, {
}
});
+$w.HTMLObjectElement = HTMLObjectElement;
$debug("Defining HTMLOptGroupElement");
/*
* HTMLOptGroupElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptGroupElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptGroupElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6795,16 +6553,10 @@ __extend__(HTMLOptGroupElement.prototype, {
},
});
- $debug("Defining HTMLOptionElement");
+$w.HTMLOptGroupElement = HTMLOptGroupElement; $debug("Defining HTMLOptionElement");
/*
* HTMLOptionElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6865,16 +6617,11 @@ __extend__(HTMLOptionElement.prototype, {
}
});
- $debug("Defining HTMLParamElement");
+$w.HTMLOptionElement = HTMLOptionElement;
+$debug("Defining HTMLParamElement");
/*
* HTMLParamElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLParamElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLParamElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6907,16 +6654,11 @@ __extend__(HTMLParamElement.prototype, {
},
});
- $debug("Defining HTMLScriptElement");
+$w.HTMLParamElement = HTMLParamElement;
+ $debug("Defining HTMLScriptElement");
/*
* HTMLScriptElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLScriptElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLScriptElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6976,16 +6718,10 @@ __extend__(HTMLScriptElement.prototype, {
}
});
- $debug("Defining HTMLSelectElement");
+$w.HTMLScriptElement = HTMLScriptElement;$debug("Defining HTMLSelectElement");
/*
* HTMLSelectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLSelectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLSelectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7087,16 +6823,10 @@ __extend__(HTMLSelectElement.prototype, {
}
});
- $debug("Defining HTMLStyleElement");
+$w.HTMLSelectElement = HTMLSelectElement;$debug("Defining HTMLStyleElement");
/*
* HTMLStyleElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLStyleElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLStyleElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7123,19 +6853,12 @@ __extend__(HTMLStyleElement.prototype, {
}
});
- $debug("Defining HTMLTableElement");
+$w.HTMLStyleElement = HTMLStyleElement;$debug("Defining HTMLTableElement");
/*
* HTMLTableElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableElement = function(ownerDocument) {
-
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7321,20 +7044,13 @@ __extend__(HTMLTableElement.prototype, {
this.setAttribute("width", width);
}
-
});
- $debug("Defining HTMLxElement");
+$w.HTMLTableElement = HTMLTableElement; $debug("Defining HTMLTableSectionElement");
/*
* HTMLxElement - DOM Level 2
* - Contributed by Steven Wood
*/
-$w.__defineGetter__("HTMLTableSectionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableSectionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7420,17 +7136,12 @@ __extend__(HTMLTableSectionElement.prototype, {
});
- $debug("Defining HTMLTableCellElement");
+$w.HTMLTableSectionElement = HTMLTableSectionElement;
+$debug("Defining HTMLTableCellElement");
/*
* HTMLTableCellElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableCellElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableCellElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7443,17 +7154,11 @@ __extend__(HTMLTableCellElement.prototype, {
});
- $debug("Defining HTMLRowElement");
+$w.HTMLTableCellElement = HTMLTableCellElement;$debug("Defining HTMLTableRowElement");
/*
* HTMLRowElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableRowElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableRowElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7553,7 +7258,8 @@ __extend__(HTMLTableRowElement.prototype, {
});
- /**
+$w.HTMLTableRowElement = HTMLTableRowElement;
+/**
* @author thatcher
*/
$debug("Defining XMLSerializer");
@@ -7681,20 +7387,6 @@ __extend__(XSLTProcessor.prototype, {
/*
* event.js
*/
-$w.__defineGetter__("Event", function(){
- __extend__(this,{
- CAPTURING_PHASE : 1,
- AT_TARGET : 2,
- BUBBLING_PHASE : 3
- });
- if(this.__output__ == undefined) {
- this.__output__ = function(){
- throw new Error("Object cannot be created in this context");
- };
- }
- return this.__output__;
-});
-
var Event = function(options){
if(options === undefined){
options={target:window,currentTarget:window};
@@ -7730,6 +7422,7 @@ var Event = function(options){
});
};
+$w.Event = Event;
$debug("Defining MouseEvent");
/*
* mouseevent.js
@@ -7744,13 +7437,6 @@ var $onblur,
$onresize;/*
* CSS2Properties - DOM Level 2 CSS
*/
-$w.__defineGetter__("CSS2Properties", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
var CSS2Properties = function(options){
__extend__(this, __supportedStyles__);
__cssTextToStyles__(this, options.cssText?options.cssText:"");
@@ -7955,15 +7641,11 @@ var __supportedStyles__ = {
width: "",
wordSpacing: "",
zIndex: ""
-};/*
+};
+
+$w.CSS2Properties = CSS2Properties;/*
* CSSRule - DOM Level 2
*/
-$w.__defineGetter__("CSSRule", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSRule = function(options){
var $style,
$selectorText = options.selectorText?options.selectorText:"";
@@ -7982,15 +7664,10 @@ var CSSRule = function(options){
}
});
};
+$w.CSSRule = CSSRule;
/*
* CSSStyleSheet - DOM Level 2
*/
-$w.__defineGetter__("CSSStyleSheet", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSStyleSheet = function(options){
var $cssRules,
$disabled = options.disabled?options.disabled:false,
@@ -8038,6 +7715,8 @@ var CSSStyleSheet = function(options){
removeRule: function(index){this.deleteRule(index);}//IE - may be deprecated
});
};
+
+$w.CSSStyleSheet = CSSStyleSheet;
/*
* location.js
* - requires env
diff --git a/dist/env.rhino.js b/dist/env.rhino.js
index d3544ae0..d85b1dd8 100644
--- a/dist/env.rhino.js
+++ b/dist/env.rhino.js
@@ -631,13 +631,6 @@ $debug("Defining NodeList");
/*
* NodeList - DOM Level 2
*/
-$w.__defineGetter__('NodeList', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMNodeList - provides the abstraction of an ordered collection of nodes
*
@@ -829,6 +822,7 @@ var __cloneNodes__ = function(nodelist, deep, parentNode) {
return cloneNodeList;
};
+$w.NodeList = DOMNodeList;
/**
* @class DOMNamedNodeMap - used to represent collections of nodes that can be accessed by name
@@ -1196,22 +1190,6 @@ $debug("Defining Node");
/*
* Node - DOM Level 2
*/
-$w.__defineGetter__('Node', function(){
- return __extend__(function(){
- throw new Error("Object cannot be created in this context");
- } , {
- ELEMENT_NODE :1,
- ATTRIBUTE_NODE :2,
- TEXT_NODE :3,
- CDATA_SECTION_NODE: 4,
- PROCESSING_INSTRUCTION_NODE: 7,
- COMMENT_NODE: 8,
- DOCUMENT_NODE: 9,
- DOCUMENT_TYPE_NODE: 10,
- DOCUMENT_FRAGMENT_NODE: 11
- });
-});
-
/**
* @class DOMNode - The Node interface is the primary datatype for the entire Document Object Model.
* It represents a single node in the document tree.
@@ -1803,6 +1781,9 @@ var __isAncestor__ = function(target, node) {
var __ownerDocument__ = function(node){
return (node.nodeType == DOMNode.DOCUMENT_NODE)?node:node.ownerDocument;
};
+
+$w.Node = DOMNode;
+
/**
* @class DOMNamespace - The Namespace interface represents an namespace in an Element object
*
@@ -1856,12 +1837,6 @@ $debug("Defining CharacterData");
/*
* CharacterData - DOM Level 2
*/
-$w.__defineGetter__("CharacterData", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMCharacterData - parent abstract class for DOMText and DOMComment
* @extends DOMNode
@@ -1975,16 +1950,11 @@ __extend__(DOMCharacterData.prototype,{
return ret;
}
});
-$debug("Defining Text");
+
+$w.CharacterData = DOMCharacterData;$debug("Defining Text");
/*
* Text - DOM Level 2
*/
-$w.__defineGetter__("Text", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMText - The Text interface represents the textual content (termed character data in XML) of an Element or Attr.
* If there is no markup inside an element's content, the text is contained in a single object implementing the Text interface
@@ -1994,7 +1964,7 @@ $w.__defineGetter__("Text", function(){
* @author Jon van Noort (jon@webarcana.com.au) and David Joham (djoham@yahoo.com)
* @param ownerDocument : DOMDocument - The Document object associated with this node.
*/
-DOMText = function(ownerDocument) {
+var DOMText = function(ownerDocument) {
this.DOMCharacterData = DOMCharacterData;
this.DOMCharacterData(ownerDocument);
@@ -2053,16 +2023,10 @@ __extend__(DOMText.prototype,{
}
});
-$debug("Defining CDATASection");
+$w.Text = DOMText;$debug("Defining CDATASection");
/*
* CDATASection - DOM Level 2
*/
-$w.__defineGetter__("CDATASection", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMCDATASection - CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
* The only delimiter that is recognized in a CDATA section is the "\]\]\>" string that ends the CDATA section
@@ -2087,16 +2051,12 @@ __extend__(DOMCDATASection.prototype,{
toString : function(){
return "CDATA #"+this._id;
}
-});$debug("Defining Comment");
+});
+
+$w.CDATASection = DOMCDATASection;$debug("Defining Comment");
/*
* Comment - DOM Level 2
*/
-$w.__defineGetter__("Comment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMComment - This represents the content of a comment, i.e., all the characters between the starting ''
* @extends DOMCharacterData
@@ -2121,27 +2081,21 @@ __extend__(DOMComment.prototype, {
return "Comment #"+this._id;
}
});
+
+$w.Comment = DOMComment;
$debug("Defining DocumentType");
;/*
* DocumentType - DOM Level 2
*/
-$w.__defineGetter__('DocumentType', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
+var DOMDocumentType = function() {
+ $error("DOMDocumentType.constructor(): Not Implemented" );
+};
-var DOMDocumentType = function() { $error("DOMDocumentType.constructor(): Not Implemented" ); };$debug("Defining Attr");
+$w.DocumentType = DOMDocumentType;
+$debug("Defining Attr");
/*
* Attr - DOM Level 2
*/
-$w.__defineGetter__("Attr", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMAttr - The Attr interface represents an attribute in an Element object
* @extends DOMNode
@@ -2187,19 +2141,10 @@ __extend__(DOMAttr.prototype, {
toString : function(){
return "Attr #" + this._id + " " + this.name;
}
-});
-
-$debug("Defining Element");
-/*
-* Element - DOM Level 2
-*/
-$w.__defineGetter__("Element", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
});
-
+$w.Attr = DOMAttr;
+$debug("Defining Element");
/**
* @class DOMElement - By far the vast majority of objects (apart from text) that authors encounter
* when traversing a document are Element nodes.
@@ -2403,6 +2348,7 @@ __extend__(DOMElement.prototype, {
}
});
+$w.Element = DOMElement;
/**
* @class DOMException - raised when an operation is impossible to perform
* @author Jon van Noort (jon@webarcana.com.au)
@@ -2435,12 +2381,6 @@ $debug("Defining DocumentFragment");
/*
* DocumentFragment - DOM Level 2
*/
-$w.__defineGetter__("DocumentFragment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMDocumentFragment - DocumentFragment is a "lightweight" or "minimal" Document object.
* @extends DOMNode
@@ -2472,16 +2412,12 @@ __extend__(DOMDocumentFragment.prototype,{
return "DocumentFragment #"+this._id;
}
});
+
+$w.DocumentFragment = DOMDocumentFragment;
$debug("Defining ProcessingInstruction");
/*
* ProcessingInstruction - DOM Level 2
*/
-$w.__defineGetter__('ProcessingInstruction', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMProcessingInstruction - The ProcessingInstruction interface represents a "processing instruction",
* used in XML as a way to keep processor-specific information in the text of the document
@@ -2521,6 +2457,8 @@ __extend__(DOMProcessingInstruction.prototype, {
return "ProcessingInstruction #"+this._id;
}
});
+
+$w.ProcessesingInstruction = DOMProcessingInstruction;
$debug("Defining DOMParser");
/*
* DOMParser
@@ -2538,7 +2476,7 @@ $debug("Initializing Internal DOMParser.");
//keep one around for internal use
$domparser = new DOMParser();
-$w.__defineGetter__('DOMParser', DOMParser);
+$w.DOMParser = DOMParser;
// =========================================================================
//
// xmlsax.js - an XML SAX parser in JavaScript.
@@ -3694,12 +3632,6 @@ function __unescapeXML__(str) {
//DOMImplementation
$debug("Defining DOMImplementation");
-$w.__defineGetter__("DOMImplementation", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMImplementation - provides a number of methods for performing operations
* that are independent of any particular instance of the document object model.
@@ -4271,17 +4203,6 @@ $debug("Initializing document.implementation");
var $implementation = new DOMImplementation();
$implementation.namespaceAware = false;
$implementation.errorChecking = false;$debug("Defining Document");
-/*
-* Document - DOM Level 2
-* The Document object is not directly
-*/
-$w.__defineGetter__('Document', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -4657,6 +4578,8 @@ var __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribut
return valid;
};
+
+$w.Document = DOMDocument;
/*
* parser.js
*/
@@ -5000,13 +4923,7 @@ var __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribut
$debug("Defining HTMLDocument");
/*
* HTMLDocument - DOM Level 2
-* The Document object is not directly
*/
-$w.__defineGetter__("HTMLDocument", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
/**
* @class HTMLDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -5186,33 +5103,11 @@ __extend__(HTMLDocument.prototype, {
}
});
-//This is useful as html elements that modify the dom must also run through the new
-//nodes and determine if they are javascript tags and load it. This is really the fun
-//parts! ;)
-function __execScripts__( node ) {
- if ( node.nodeName == "SCRIPT" ) {
- if ( !node.getAttribute("src") ) {
- eval.call( window, node.textContent );
- }
- } else {
- var scripts = node.getElementsByTagName("script");
- for ( var i = 0; i < scripts.length; i++ ) {
- __execScripts__( node );
- }
- }
-};$debug("Defining HTMLElement");
+$w.HTMLDocument = HTMLDocument;
+$debug("Defining HTMLElement");
/*
* HTMLElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.HTMLElement.__defineGetter__("prototype", function(){
- return HTMLElement.prototype;
-});
-
var HTMLElement = function(ownerDocument) {
this.DOMElement = DOMElement;
this.DOMElement(ownerDocument);
@@ -5427,17 +5322,13 @@ var __blur__ = function(element){
event.initEvent("blur");
element.dispatchEvent(event);
};
+
+$w.HTMLElement = HTMLElement;
$debug("Defining HTMLCollection");
/*
* HTMLCollection - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLCollection", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLCollection = function(nodelist, type){
__setArray__(this, []);
@@ -5464,6 +5355,8 @@ HTMLCollection.prototype = {
}
};
+$w.HTMLCollection = HTMLCollection;
+
/*var HTMLCollection = function(nodelist, type){
var $items = [],
$item, i;
@@ -5506,12 +5399,6 @@ HTMLCollection.prototype = {
/*
* HTMLAnchorElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAnchorElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAnchorElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -5625,21 +5512,14 @@ __extend__(HTMLAnchorElement.prototype, {
}
});
- $debug("Defining Anchor");
+$w.HTMLAnchorElement = HTMLAnchorElement;$debug("Defining Anchor");
/*
* Anchor - DOM Level 2
*/
-$w.__defineGetter__("Anchor", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var Anchor = function(ownerDocument) {
this.HTMLAnchorElement = HTMLAnchorElement;
this.HTMLAnchorElement(ownerDocument);
};
-Anchor.prototype = new Anchor;
(function(){
//static regular expressions
@@ -5710,16 +5590,12 @@ Anchor.prototype = new Anchor;
});
})();
- $debug("Defining HTMLAreaElement");
+
+$w.Anchor = Anchor;
+$debug("Defining HTMLAreaElement");
/*
* HTMLAreaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAreaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAreaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5771,16 +5647,11 @@ __extend__(HTMLAreaElement.prototype, {
}
});
+$w.HTMLAreaElement = HTMLAreaElement;
$debug("Defining HTMLBaseElement");
/*
* HTMLBaseElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLBaseElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLBaseElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -5802,16 +5673,10 @@ __extend__(HTMLBaseElement.prototype, {
}
});
- $debug("Defining HTMLQuoteElement");
+$w.HTMLBaseElement = HTMLBaseElement; $debug("Defining HTMLQuoteElement");
/*
* HTMLQuoteElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLQuoteElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLQuoteElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5826,16 +5691,10 @@ __extend__(HTMLQuoteElement.prototype, {
}
});
- $debug("Defining HTMLButtonElement");
+$w.HTMLQuoteElement = HTMLQuoteElement; $debug("Defining HTMLButtonElement");
/*
* HTMLButtonElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLButtonElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLButtonElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5875,16 +5734,10 @@ __extend__(HTMLButtonElement.prototype, {
}
});
- $debug("Defining HTMLTableColElement");
+$w.HTMLButtonElement = HTMLButtonElement; $debug("Defining HTMLTableColElement");
/*
* HTMLTableColElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLTableColElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableColElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5929,16 +5782,11 @@ __extend__(HTMLTableColElement.prototype, {
}
});
- $debug("Defining HTMLModElement");
+$w.HTMLTableColElement = HTMLTableColElement;
+$debug("Defining HTMLModElement");
/*
* HTMLModElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLModElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLModElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5959,16 +5807,10 @@ __extend__(HTMLModElement.prototype, {
}
});
- $debug("Defining HTMLFieldSetElement");
+$w.HTMLModElement = HTMLModElement; $debug("Defining HTMLFieldSetElement");
/*
* HTMLFieldSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFieldSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFieldSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -5984,21 +5826,10 @@ __extend__(HTMLFieldSetElement.prototype, {
}
});
- $debug("Defining HTMLFormElement");
+$w.HTMLFieldSetElement = HTMLFieldSetElement; $debug("Defining HTMLFormElement");
/*
-* HTMLAnchorElement - DOM Level 2
+* HTMLFormElement - DOM Level 2
*/
-$w.__defineGetter__("Form", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.__defineGetter__("HTMLFormElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFormElement = function(ownerDocument){
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6071,16 +5902,10 @@ __extend__(HTMLFormElement.prototype,{
}
});
- $debug("Defining HTMLFrameElement");
+$w.HTMLFormElement = HTMLFormElement;$debug("Defining HTMLFrameElement");
/*
* HTMLFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6152,16 +5977,11 @@ __extend__(HTMLFrameElement.prototype, {
}
});
- $debug("Defining HTMLFrameSetElement");
+$w.HTMLFrameElement = HTMLFrameElement;
+$debug("Defining HTMLFrameSetElement");
/*
* HTMLFrameSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6182,16 +6002,10 @@ __extend__(HTMLFrameSetElement.prototype, {
}
});
- $debug("Defining HTMLHeadElement");
+$w.HTMLFrameSetElement = HTMLFrameSetElement; $debug("Defining HTMLHeadElement");
/*
* HTMLHeadElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLHeadElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLHeadElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6229,16 +6043,13 @@ var __evalScript__ = function(newChild){
$policy.loadScript(newChild);
}
}
-};$debug("Defining HTMLIFrameElement");
+};
+
+$w.HTMLHeadElement = HTMLHeadElement;
+$debug("Defining HTMLIFrameElement");
/*
* HTMLIFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLIFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLIFrameElement = function(ownerDocument) {
this.HTMLFrameElement = HTMLFrameElement;
this.HTMLFrameElement(ownerDocument);
@@ -6259,17 +6070,11 @@ __extend__(HTMLIFrameElement.prototype, {
}
});
-
+$w.HTMLIFrameElement = HTMLIFrameElement;
$debug("Defining HTMLImageElement");
/*
* HTMLImageElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLImageElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLImageElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6320,16 +6125,10 @@ __extend__(HTMLImageElement.prototype, {
}
});
- $debug("Defining HTMLInputElement");
+$w.HTMLImageElement = HTMLImageElement;$debug("Defining HTMLInputElement");
/*
* HTMLInputElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLInputElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLInputElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6451,16 +6250,10 @@ __extend__(HTMLInputElement.prototype, {
}
});
- $debug("Defining HTMLLabelElement");
+$w.HTMLInputElement = HTMLInputElement;$debug("Defining HTMLLabelElement");
/*
* HTMLLabelElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLabelElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLabelElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6488,16 +6281,10 @@ __extend__(HTMLLabelElement.prototype, {
}
});
- $debug("Defining HTMLLegendElement");
+$w.HTMLLabelElement = HTMLLabelElement; $debug("Defining HTMLLegendElement");
/*
* HTMLLegendElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLegendElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLegendElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6519,7 +6306,7 @@ __extend__(HTMLLegendElement.prototype, {
}
});
- /**
+$w.HTMLLegendElement = HTMLLegendElement; /**
* Link - HTMLElement
*/
$w.__defineGetter__("Link", function(){
@@ -6533,12 +6320,6 @@ $debug("Defining HTMLLinkElement");
/*
* HTMLLinkElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLinkElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLinkElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6601,18 +6382,11 @@ __extend__(HTMLLinkElement.prototype, {
}
});
-
-
- $debug("Defining HTMLMapElement");
+$w.HTMLLinkElement = HTMLLinkElement;
+$debug("Defining HTMLMapElement");
/*
* HTMLMapElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMapElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMapElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6630,16 +6404,10 @@ __extend__(HTMLMapElement.prototype, {
}
});
- $debug("Defining HTMLMetaElement");
+$w.HTMLMapElement = HTMLMapElement;$debug("Defining HTMLMetaElement");
/*
* HTMLMetaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMetaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMetaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6672,16 +6440,11 @@ __extend__(HTMLMetaElement.prototype, {
}
});
- $debug("Defining HTMLObjectElement");
+$w.HTMLMetaElement = HTMLMetaElement;
+$debug("Defining HTMLObjectElement");
/*
* HTMLObjectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLObjectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLObjectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6765,16 +6528,11 @@ __extend__(HTMLObjectElement.prototype, {
}
});
+$w.HTMLObjectElement = HTMLObjectElement;
$debug("Defining HTMLOptGroupElement");
/*
* HTMLOptGroupElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptGroupElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptGroupElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6795,16 +6553,10 @@ __extend__(HTMLOptGroupElement.prototype, {
},
});
- $debug("Defining HTMLOptionElement");
+$w.HTMLOptGroupElement = HTMLOptGroupElement; $debug("Defining HTMLOptionElement");
/*
* HTMLOptionElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6865,16 +6617,11 @@ __extend__(HTMLOptionElement.prototype, {
}
});
- $debug("Defining HTMLParamElement");
+$w.HTMLOptionElement = HTMLOptionElement;
+$debug("Defining HTMLParamElement");
/*
* HTMLParamElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLParamElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLParamElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6907,16 +6654,11 @@ __extend__(HTMLParamElement.prototype, {
},
});
- $debug("Defining HTMLScriptElement");
+$w.HTMLParamElement = HTMLParamElement;
+ $debug("Defining HTMLScriptElement");
/*
* HTMLScriptElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLScriptElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLScriptElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -6976,16 +6718,10 @@ __extend__(HTMLScriptElement.prototype, {
}
});
- $debug("Defining HTMLSelectElement");
+$w.HTMLScriptElement = HTMLScriptElement;$debug("Defining HTMLSelectElement");
/*
* HTMLSelectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLSelectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLSelectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7087,16 +6823,10 @@ __extend__(HTMLSelectElement.prototype, {
}
});
- $debug("Defining HTMLStyleElement");
+$w.HTMLSelectElement = HTMLSelectElement;$debug("Defining HTMLStyleElement");
/*
* HTMLStyleElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLStyleElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLStyleElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7123,19 +6853,12 @@ __extend__(HTMLStyleElement.prototype, {
}
});
- $debug("Defining HTMLTableElement");
+$w.HTMLStyleElement = HTMLStyleElement;$debug("Defining HTMLTableElement");
/*
* HTMLTableElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableElement = function(ownerDocument) {
-
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7321,20 +7044,13 @@ __extend__(HTMLTableElement.prototype, {
this.setAttribute("width", width);
}
-
});
- $debug("Defining HTMLxElement");
+$w.HTMLTableElement = HTMLTableElement; $debug("Defining HTMLTableSectionElement");
/*
* HTMLxElement - DOM Level 2
* - Contributed by Steven Wood
*/
-$w.__defineGetter__("HTMLTableSectionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableSectionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7420,17 +7136,12 @@ __extend__(HTMLTableSectionElement.prototype, {
});
- $debug("Defining HTMLTableCellElement");
+$w.HTMLTableSectionElement = HTMLTableSectionElement;
+$debug("Defining HTMLTableCellElement");
/*
* HTMLTableCellElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableCellElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableCellElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7443,17 +7154,11 @@ __extend__(HTMLTableCellElement.prototype, {
});
- $debug("Defining HTMLRowElement");
+$w.HTMLTableCellElement = HTMLTableCellElement;$debug("Defining HTMLTableRowElement");
/*
* HTMLRowElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableRowElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableRowElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -7553,7 +7258,8 @@ __extend__(HTMLTableRowElement.prototype, {
});
- /**
+$w.HTMLTableRowElement = HTMLTableRowElement;
+/**
* @author thatcher
*/
$debug("Defining XMLSerializer");
@@ -7681,20 +7387,6 @@ __extend__(XSLTProcessor.prototype, {
/*
* event.js
*/
-$w.__defineGetter__("Event", function(){
- __extend__(this,{
- CAPTURING_PHASE : 1,
- AT_TARGET : 2,
- BUBBLING_PHASE : 3
- });
- if(this.__output__ == undefined) {
- this.__output__ = function(){
- throw new Error("Object cannot be created in this context");
- };
- }
- return this.__output__;
-});
-
var Event = function(options){
if(options === undefined){
options={target:window,currentTarget:window};
@@ -7730,6 +7422,7 @@ var Event = function(options){
});
};
+$w.Event = Event;
$debug("Defining MouseEvent");
/*
* mouseevent.js
@@ -7744,13 +7437,6 @@ var $onblur,
$onresize;/*
* CSS2Properties - DOM Level 2 CSS
*/
-$w.__defineGetter__("CSS2Properties", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
var CSS2Properties = function(options){
__extend__(this, __supportedStyles__);
__cssTextToStyles__(this, options.cssText?options.cssText:"");
@@ -7955,15 +7641,11 @@ var __supportedStyles__ = {
width: "",
wordSpacing: "",
zIndex: ""
-};/*
+};
+
+$w.CSS2Properties = CSS2Properties;/*
* CSSRule - DOM Level 2
*/
-$w.__defineGetter__("CSSRule", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSRule = function(options){
var $style,
$selectorText = options.selectorText?options.selectorText:"";
@@ -7982,15 +7664,10 @@ var CSSRule = function(options){
}
});
};
+$w.CSSRule = CSSRule;
/*
* CSSStyleSheet - DOM Level 2
*/
-$w.__defineGetter__("CSSStyleSheet", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSStyleSheet = function(options){
var $cssRules,
$disabled = options.disabled?options.disabled:false,
@@ -8038,6 +7715,8 @@ var CSSStyleSheet = function(options){
removeRule: function(index){this.deleteRule(index);}//IE - may be deprecated
});
};
+
+$w.CSSStyleSheet = CSSStyleSheet;
/*
* location.js
* - requires env
diff --git a/rhino/js.jar b/rhino/js.jar
index 2f4fad90..2369f99a 100644
Binary files a/rhino/js.jar and b/rhino/js.jar differ
diff --git a/rhino/js_.jar b/rhino/js_.jar
new file mode 100644
index 00000000..2f4fad90
Binary files /dev/null and b/rhino/js_.jar differ
diff --git a/src/css/properties.js b/src/css/properties.js
index 2e05e836..78701a5e 100644
--- a/src/css/properties.js
+++ b/src/css/properties.js
@@ -1,13 +1,6 @@
/*
* CSS2Properties - DOM Level 2 CSS
*/
-$w.__defineGetter__("CSS2Properties", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
var CSS2Properties = function(options){
__extend__(this, __supportedStyles__);
__cssTextToStyles__(this, options.cssText?options.cssText:"");
@@ -212,4 +205,6 @@ var __supportedStyles__ = {
width: "",
wordSpacing: "",
zIndex: ""
-};
\ No newline at end of file
+};
+
+$w.CSS2Properties = CSS2Properties;
\ No newline at end of file
diff --git a/src/css/rule.js b/src/css/rule.js
index 9b414dae..9960c3dc 100644
--- a/src/css/rule.js
+++ b/src/css/rule.js
@@ -1,12 +1,6 @@
/*
* CSSRule - DOM Level 2
*/
-$w.__defineGetter__("CSSRule", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSRule = function(options){
var $style,
$selectorText = options.selectorText?options.selectorText:"";
@@ -25,3 +19,4 @@ var CSSRule = function(options){
}
});
};
+$w.CSSRule = CSSRule;
diff --git a/src/css/stylesheet.js b/src/css/stylesheet.js
index c9bc41cf..1884cde5 100644
--- a/src/css/stylesheet.js
+++ b/src/css/stylesheet.js
@@ -1,12 +1,6 @@
/*
* CSSStyleSheet - DOM Level 2
*/
-$w.__defineGetter__("CSSStyleSheet", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var CSSStyleSheet = function(options){
var $cssRules,
$disabled = options.disabled?options.disabled:false,
@@ -54,3 +48,5 @@ var CSSStyleSheet = function(options){
removeRule: function(index){this.deleteRule(index);}//IE - may be deprecated
});
};
+
+$w.CSSStyleSheet = CSSStyleSheet;
diff --git a/src/dom/attr.js b/src/dom/attr.js
index 535c821a..1a0477c4 100644
--- a/src/dom/attr.js
+++ b/src/dom/attr.js
@@ -2,13 +2,6 @@ $debug("Defining Attr");
/*
* Attr - DOM Level 2
*/
-$w.__defineGetter__("Attr", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMAttr - The Attr interface represents an attribute in an Element object
* @extends DOMNode
@@ -54,5 +47,6 @@ __extend__(DOMAttr.prototype, {
toString : function(){
return "Attr #" + this._id + " " + this.name;
}
-});
+});
+$w.Attr = DOMAttr;
diff --git a/src/dom/cdatasection.js b/src/dom/cdatasection.js
index f12b3d6d..96535e8e 100644
--- a/src/dom/cdatasection.js
+++ b/src/dom/cdatasection.js
@@ -2,12 +2,6 @@ $debug("Defining CDATASection");
/*
* CDATASection - DOM Level 2
*/
-$w.__defineGetter__("CDATASection", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMCDATASection - CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup.
* The only delimiter that is recognized in a CDATA section is the "\]\]\>" string that ends the CDATA section
@@ -32,4 +26,6 @@ __extend__(DOMCDATASection.prototype,{
toString : function(){
return "CDATA #"+this._id;
}
-});
\ No newline at end of file
+});
+
+$w.CDATASection = DOMCDATASection;
\ No newline at end of file
diff --git a/src/dom/characterdata.js b/src/dom/characterdata.js
index b769d1fe..f8fbfab4 100644
--- a/src/dom/characterdata.js
+++ b/src/dom/characterdata.js
@@ -2,12 +2,6 @@ $debug("Defining CharacterData");
/*
* CharacterData - DOM Level 2
*/
-$w.__defineGetter__("CharacterData", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMCharacterData - parent abstract class for DOMText and DOMComment
* @extends DOMNode
@@ -121,3 +115,5 @@ __extend__(DOMCharacterData.prototype,{
return ret;
}
});
+
+$w.CharacterData = DOMCharacterData;
\ No newline at end of file
diff --git a/src/dom/comment.js b/src/dom/comment.js
index 52d0812f..33c48bc0 100644
--- a/src/dom/comment.js
+++ b/src/dom/comment.js
@@ -2,12 +2,6 @@ $debug("Defining Comment");
/*
* Comment - DOM Level 2
*/
-$w.__defineGetter__("Comment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMComment - This represents the content of a comment, i.e., all the characters between the starting ''
* @extends DOMCharacterData
@@ -32,3 +26,5 @@ __extend__(DOMComment.prototype, {
return "Comment #"+this._id;
}
});
+
+$w.Comment = DOMComment;
diff --git a/src/dom/doctype.js b/src/dom/doctype.js
index 0e915e96..93ddcf57 100644
--- a/src/dom/doctype.js
+++ b/src/dom/doctype.js
@@ -2,10 +2,8 @@ $debug("Defining DocumentType");
;/*
* DocumentType - DOM Level 2
*/
-$w.__defineGetter__('DocumentType', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
+var DOMDocumentType = function() {
+ $error("DOMDocumentType.constructor(): Not Implemented" );
+};
-var DOMDocumentType = function() { $error("DOMDocumentType.constructor(): Not Implemented" ); };
\ No newline at end of file
+$w.DocumentType = DOMDocumentType;
diff --git a/src/dom/document.js b/src/dom/document.js
index 7b444a30..a6686228 100644
--- a/src/dom/document.js
+++ b/src/dom/document.js
@@ -1,15 +1,4 @@
$debug("Defining Document");
-/*
-* Document - DOM Level 2
-* The Document object is not directly
-*/
-$w.__defineGetter__('Document', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -385,3 +374,5 @@ var __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribut
return valid;
};
+
+$w.Document = DOMDocument;
diff --git a/src/dom/element.js b/src/dom/element.js
index 2f72b83a..4f88b2df 100644
--- a/src/dom/element.js
+++ b/src/dom/element.js
@@ -1,14 +1,4 @@
$debug("Defining Element");
-/*
-* Element - DOM Level 2
-*/
-$w.__defineGetter__("Element", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMElement - By far the vast majority of objects (apart from text) that authors encounter
* when traversing a document are Element nodes.
@@ -212,3 +202,4 @@ __extend__(DOMElement.prototype, {
}
});
+$w.Element = DOMElement;
diff --git a/src/dom/fragment.js b/src/dom/fragment.js
index 6fdee589..4f6ff793 100644
--- a/src/dom/fragment.js
+++ b/src/dom/fragment.js
@@ -2,12 +2,6 @@ $debug("Defining DocumentFragment");
/*
* DocumentFragment - DOM Level 2
*/
-$w.__defineGetter__("DocumentFragment", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMDocumentFragment - DocumentFragment is a "lightweight" or "minimal" Document object.
* @extends DOMNode
@@ -39,3 +33,5 @@ __extend__(DOMDocumentFragment.prototype,{
return "DocumentFragment #"+this._id;
}
});
+
+$w.DocumentFragment = DOMDocumentFragment;
diff --git a/src/dom/implementation.js b/src/dom/implementation.js
index 253124d8..2365185b 100644
--- a/src/dom/implementation.js
+++ b/src/dom/implementation.js
@@ -1,11 +1,5 @@
//DOMImplementation
$debug("Defining DOMImplementation");
-$w.__defineGetter__("DOMImplementation", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMImplementation - provides a number of methods for performing operations
* that are independent of any particular instance of the document object model.
diff --git a/src/dom/instruction.js b/src/dom/instruction.js
index ddc6ef3c..00176b65 100644
--- a/src/dom/instruction.js
+++ b/src/dom/instruction.js
@@ -2,12 +2,6 @@ $debug("Defining ProcessingInstruction");
/*
* ProcessingInstruction - DOM Level 2
*/
-$w.__defineGetter__('ProcessingInstruction', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMProcessingInstruction - The ProcessingInstruction interface represents a "processing instruction",
* used in XML as a way to keep processor-specific information in the text of the document
@@ -47,3 +41,5 @@ __extend__(DOMProcessingInstruction.prototype, {
return "ProcessingInstruction #"+this._id;
}
});
+
+$w.ProcessesingInstruction = DOMProcessingInstruction;
diff --git a/src/dom/node.js b/src/dom/node.js
index 0eba0fed..b8687225 100644
--- a/src/dom/node.js
+++ b/src/dom/node.js
@@ -2,22 +2,6 @@ $debug("Defining Node");
/*
* Node - DOM Level 2
*/
-$w.__defineGetter__('Node', function(){
- return __extend__(function(){
- throw new Error("Object cannot be created in this context");
- } , {
- ELEMENT_NODE :1,
- ATTRIBUTE_NODE :2,
- TEXT_NODE :3,
- CDATA_SECTION_NODE: 4,
- PROCESSING_INSTRUCTION_NODE: 7,
- COMMENT_NODE: 8,
- DOCUMENT_NODE: 9,
- DOCUMENT_TYPE_NODE: 10,
- DOCUMENT_FRAGMENT_NODE: 11
- });
-});
-
/**
* @class DOMNode - The Node interface is the primary datatype for the entire Document Object Model.
* It represents a single node in the document tree.
@@ -608,4 +592,6 @@ var __isAncestor__ = function(target, node) {
var __ownerDocument__ = function(node){
return (node.nodeType == DOMNode.DOCUMENT_NODE)?node:node.ownerDocument;
-};
\ No newline at end of file
+};
+
+$w.Node = DOMNode;
diff --git a/src/dom/nodelist.js b/src/dom/nodelist.js
index 45df4a27..dcfe667c 100644
--- a/src/dom/nodelist.js
+++ b/src/dom/nodelist.js
@@ -2,13 +2,6 @@ $debug("Defining NodeList");
/*
* NodeList - DOM Level 2
*/
-$w.__defineGetter__('NodeList', function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-
/**
* @class DOMNodeList - provides the abstraction of an ordered collection of nodes
*
@@ -200,3 +193,4 @@ var __cloneNodes__ = function(nodelist, deep, parentNode) {
return cloneNodeList;
};
+$w.NodeList = DOMNodeList;
diff --git a/src/dom/parser.js b/src/dom/parser.js
index 246784dc..9f180918 100644
--- a/src/dom/parser.js
+++ b/src/dom/parser.js
@@ -15,7 +15,7 @@ $debug("Initializing Internal DOMParser.");
//keep one around for internal use
$domparser = new DOMParser();
-$w.__defineGetter__('DOMParser', DOMParser);
+$w.DOMParser = DOMParser;
// =========================================================================
//
// xmlsax.js - an XML SAX parser in JavaScript.
diff --git a/src/dom/text.js b/src/dom/text.js
index 76f29434..6d09d436 100644
--- a/src/dom/text.js
+++ b/src/dom/text.js
@@ -2,12 +2,6 @@ $debug("Defining Text");
/*
* Text - DOM Level 2
*/
-$w.__defineGetter__("Text", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
/**
* @class DOMText - The Text interface represents the textual content (termed character data in XML) of an Element or Attr.
* If there is no markup inside an element's content, the text is contained in a single object implementing the Text interface
@@ -17,7 +11,7 @@ $w.__defineGetter__("Text", function(){
* @author Jon van Noort (jon@webarcana.com.au) and David Joham (djoham@yahoo.com)
* @param ownerDocument : DOMDocument - The Document object associated with this node.
*/
-DOMText = function(ownerDocument) {
+var DOMText = function(ownerDocument) {
this.DOMCharacterData = DOMCharacterData;
this.DOMCharacterData(ownerDocument);
@@ -76,3 +70,4 @@ __extend__(DOMText.prototype,{
}
});
+$w.Text = DOMText;
\ No newline at end of file
diff --git a/src/event/event.js b/src/event/event.js
index dba306e0..96f8b6db 100644
--- a/src/event/event.js
+++ b/src/event/event.js
@@ -2,20 +2,6 @@ $debug("Defining Event");
/*
* event.js
*/
-$w.__defineGetter__("Event", function(){
- __extend__(this,{
- CAPTURING_PHASE : 1,
- AT_TARGET : 2,
- BUBBLING_PHASE : 3
- });
- if(this.__output__ == undefined) {
- this.__output__ = function(){
- throw new Error("Object cannot be created in this context");
- };
- }
- return this.__output__;
-});
-
var Event = function(options){
if(options === undefined){
options={target:window,currentTarget:window};
@@ -51,3 +37,4 @@ var Event = function(options){
});
};
+$w.Event = Event;
diff --git a/src/html/a.js b/src/html/a.js
index 0e1f6582..ff88694a 100644
--- a/src/html/a.js
+++ b/src/html/a.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLAnchorElement");
/*
* HTMLAnchorElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAnchorElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAnchorElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -121,4 +115,4 @@ __extend__(HTMLAnchorElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLAnchorElement = HTMLAnchorElement;
\ No newline at end of file
diff --git a/src/html/anchor.js b/src/html/anchor.js
index 0385abc1..a8880161 100644
--- a/src/html/anchor.js
+++ b/src/html/anchor.js
@@ -2,17 +2,10 @@ $debug("Defining Anchor");
/*
* Anchor - DOM Level 2
*/
-$w.__defineGetter__("Anchor", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var Anchor = function(ownerDocument) {
this.HTMLAnchorElement = HTMLAnchorElement;
this.HTMLAnchorElement(ownerDocument);
};
-Anchor.prototype = new Anchor;
(function(){
//static regular expressions
@@ -83,4 +76,5 @@ Anchor.prototype = new Anchor;
});
})();
-
\ No newline at end of file
+
+$w.Anchor = Anchor;
diff --git a/src/html/area.js b/src/html/area.js
index 5bab3592..d216339a 100644
--- a/src/html/area.js
+++ b/src/html/area.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLAreaElement");
/*
* HTMLAreaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLAreaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLAreaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -59,4 +53,5 @@ __extend__(HTMLAreaElement.prototype, {
}
});
+$w.HTMLAreaElement = HTMLAreaElement;
\ No newline at end of file
diff --git a/src/html/base.js b/src/html/base.js
index d188003c..852b23a2 100644
--- a/src/html/base.js
+++ b/src/html/base.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLBaseElement");
/*
* HTMLBaseElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLBaseElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLBaseElement = function(ownerDocument) {
//$log("creating anchor element");
this.HTMLElement = HTMLElement;
@@ -29,4 +23,4 @@ __extend__(HTMLBaseElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLBaseElement = HTMLBaseElement;
\ No newline at end of file
diff --git a/src/html/blockquote-q.js b/src/html/blockquote-q.js
index 650045df..c734b79f 100644
--- a/src/html/blockquote-q.js
+++ b/src/html/blockquote-q.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLQuoteElement");
/*
* HTMLQuoteElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLQuoteElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLQuoteElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -22,4 +16,4 @@ __extend__(HTMLQuoteElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLQuoteElement = HTMLQuoteElement;
\ No newline at end of file
diff --git a/src/html/button.js b/src/html/button.js
index c20daf31..5e679f77 100644
--- a/src/html/button.js
+++ b/src/html/button.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLButtonElement");
/*
* HTMLButtonElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLButtonElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLButtonElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -47,4 +41,4 @@ __extend__(HTMLButtonElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLButtonElement = HTMLButtonElement;
\ No newline at end of file
diff --git a/src/html/canvas.js b/src/html/canvas.js
index 791f2449..68ff0557 100644
--- a/src/html/canvas.js
+++ b/src/html/canvas.js
@@ -2,18 +2,13 @@ $debug("Defining HTMLCanvasElement");
/*
* HTMLCanvasElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLCanvasElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-var HTMLxElement = function(ownerDocument) {
+var HTMLCanvasElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
};
-HTMLxElement.prototype = new HTMLElement;
-__extend__(HTMLxElement.prototype, {
+HTMLCanvasElement.prototype = new HTMLElement;
+__extend__(HTMLCanvasElement.prototype, {
});
-
\ No newline at end of file
+$w.HTMLCanvasElement = HTMLCanvasElement;
+
\ No newline at end of file
diff --git a/src/html/col-colgroup.js b/src/html/col-colgroup.js
index c0d7a988..8d4199e3 100644
--- a/src/html/col-colgroup.js
+++ b/src/html/col-colgroup.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLTableColElement");
/*
* HTMLTableColElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLTableColElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableColElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -52,4 +46,4 @@ __extend__(HTMLTableColElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLTableColElement = HTMLTableColElement;
diff --git a/src/html/collection.js b/src/html/collection.js
index 61bce949..556c8379 100644
--- a/src/html/collection.js
+++ b/src/html/collection.js
@@ -3,12 +3,6 @@ $debug("Defining HTMLCollection");
* HTMLCollection - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLCollection", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLCollection = function(nodelist, type){
__setArray__(this, []);
@@ -35,6 +29,8 @@ HTMLCollection.prototype = {
}
};
+$w.HTMLCollection = HTMLCollection;
+
/*var HTMLCollection = function(nodelist, type){
var $items = [],
$item, i;
diff --git a/src/html/del-ins.js b/src/html/del-ins.js
index 54149951..4c7aa999 100644
--- a/src/html/del-ins.js
+++ b/src/html/del-ins.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLModElement");
/*
* HTMLModElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLModElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLModElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -28,4 +22,4 @@ __extend__(HTMLModElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLModElement = HTMLModElement;
\ No newline at end of file
diff --git a/src/html/document.js b/src/html/document.js
index 4e7c3916..b0fcce38 100644
--- a/src/html/document.js
+++ b/src/html/document.js
@@ -1,13 +1,7 @@
$debug("Defining HTMLDocument");
/*
* HTMLDocument - DOM Level 2
-* The Document object is not directly
*/
-$w.__defineGetter__("HTMLDocument", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
/**
* @class HTMLDocument - The Document interface represents the entire HTML or XML document.
* Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
@@ -187,18 +181,4 @@ __extend__(HTMLDocument.prototype, {
}
});
-//This is useful as html elements that modify the dom must also run through the new
-//nodes and determine if they are javascript tags and load it. This is really the fun
-//parts! ;)
-function __execScripts__( node ) {
- if ( node.nodeName == "SCRIPT" ) {
- if ( !node.getAttribute("src") ) {
- eval.call( window, node.textContent );
- }
- } else {
- var scripts = node.getElementsByTagName("script");
- for ( var i = 0; i < scripts.length; i++ ) {
- __execScripts__( node );
- }
- }
-};
\ No newline at end of file
+$w.HTMLDocument = HTMLDocument;
diff --git a/src/html/element.js b/src/html/element.js
index 76d48132..694ccaae 100644
--- a/src/html/element.js
+++ b/src/html/element.js
@@ -2,15 +2,6 @@ $debug("Defining HTMLElement");
/*
* HTMLElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.HTMLElement.__defineGetter__("prototype", function(){
- return HTMLElement.prototype;
-});
-
var HTMLElement = function(ownerDocument) {
this.DOMElement = DOMElement;
this.DOMElement(ownerDocument);
@@ -225,3 +216,5 @@ var __blur__ = function(element){
event.initEvent("blur");
element.dispatchEvent(event);
};
+
+$w.HTMLElement = HTMLElement;
diff --git a/src/html/fieldset.js b/src/html/fieldset.js
index 0e4b3436..a0a7c893 100644
--- a/src/html/fieldset.js
+++ b/src/html/fieldset.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLFieldSetElement");
/*
* HTMLFieldSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFieldSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFieldSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -23,4 +17,4 @@ __extend__(HTMLFieldSetElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLFieldSetElement = HTMLFieldSetElement;
\ No newline at end of file
diff --git a/src/html/form.js b/src/html/form.js
index 07679f94..52fa094c 100644
--- a/src/html/form.js
+++ b/src/html/form.js
@@ -1,18 +1,7 @@
$debug("Defining HTMLFormElement");
/*
-* HTMLAnchorElement - DOM Level 2
+* HTMLFormElement - DOM Level 2
*/
-$w.__defineGetter__("Form", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-$w.__defineGetter__("HTMLFormElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFormElement = function(ownerDocument){
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -85,4 +74,4 @@ __extend__(HTMLFormElement.prototype,{
}
});
-
\ No newline at end of file
+$w.HTMLFormElement = HTMLFormElement;
\ No newline at end of file
diff --git a/src/html/frame.js b/src/html/frame.js
index b587d515..3ef78301 100644
--- a/src/html/frame.js
+++ b/src/html/frame.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLFrameElement");
/*
* HTMLFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -79,4 +73,4 @@ __extend__(HTMLFrameElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLFrameElement = HTMLFrameElement;
diff --git a/src/html/frameset.js b/src/html/frameset.js
index 5543cf06..4c83e2dc 100644
--- a/src/html/frameset.js
+++ b/src/html/frameset.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLFrameSetElement");
/*
* HTMLFrameSetElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLFrameSetElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLFrameSetElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -28,4 +22,4 @@ __extend__(HTMLFrameSetElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLFrameSetElement = HTMLFrameSetElement;
\ No newline at end of file
diff --git a/src/html/head.js b/src/html/head.js
index 733c0b6b..6dd1921d 100644
--- a/src/html/head.js
+++ b/src/html/head.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLHeadElement");
/*
* HTMLHeadElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLHeadElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLHeadElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -45,4 +39,6 @@ var __evalScript__ = function(newChild){
$policy.loadScript(newChild);
}
}
-};
\ No newline at end of file
+};
+
+$w.HTMLHeadElement = HTMLHeadElement;
diff --git a/src/html/iframe.js b/src/html/iframe.js
index 544321d6..29d0216c 100644
--- a/src/html/iframe.js
+++ b/src/html/iframe.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLIFrameElement");
/*
* HTMLIFrameElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLIFrameElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLIFrameElement = function(ownerDocument) {
this.HTMLFrameElement = HTMLFrameElement;
this.HTMLFrameElement(ownerDocument);
@@ -28,5 +22,5 @@ __extend__(HTMLIFrameElement.prototype, {
}
});
-
+$w.HTMLIFrameElement = HTMLIFrameElement;
\ No newline at end of file
diff --git a/src/html/img.js b/src/html/img.js
index d0ab881d..66273e1b 100644
--- a/src/html/img.js
+++ b/src/html/img.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLImageElement");
/*
* HTMLImageElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLImageElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLImageElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -58,4 +52,4 @@ __extend__(HTMLImageElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLImageElement = HTMLImageElement;
\ No newline at end of file
diff --git a/src/html/input.js b/src/html/input.js
index 8eec3385..9ad097ed 100644
--- a/src/html/input.js
+++ b/src/html/input.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLInputElement");
/*
* HTMLInputElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLInputElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLInputElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -129,4 +123,4 @@ __extend__(HTMLInputElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLInputElement = HTMLInputElement;
\ No newline at end of file
diff --git a/src/html/label.js b/src/html/label.js
index 43963273..e0a63d9c 100644
--- a/src/html/label.js
+++ b/src/html/label.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLLabelElement");
/*
* HTMLLabelElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLabelElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLabelElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -35,4 +29,4 @@ __extend__(HTMLLabelElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLLabelElement = HTMLLabelElement;
\ No newline at end of file
diff --git a/src/html/legend.js b/src/html/legend.js
index 10a17d83..f6ea18fd 100644
--- a/src/html/legend.js
+++ b/src/html/legend.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLLegendElement");
/*
* HTMLLegendElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLegendElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLegendElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -29,4 +23,4 @@ __extend__(HTMLLegendElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLLegendElement = HTMLLegendElement;
\ No newline at end of file
diff --git a/src/html/link.js b/src/html/link.js
index 492cd6c1..97a9595b 100644
--- a/src/html/link.js
+++ b/src/html/link.js
@@ -12,12 +12,6 @@ $debug("Defining HTMLLinkElement");
/*
* HTMLLinkElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLLinkElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLLinkElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -80,6 +74,4 @@ __extend__(HTMLLinkElement.prototype, {
}
});
-
-
-
\ No newline at end of file
+$w.HTMLLinkElement = HTMLLinkElement;
diff --git a/src/html/map.js b/src/html/map.js
index f72dee5e..10108485 100644
--- a/src/html/map.js
+++ b/src/html/map.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLMapElement");
/*
* HTMLMapElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMapElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMapElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -25,4 +19,4 @@ __extend__(HTMLMapElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLMapElement = HTMLMapElement;
\ No newline at end of file
diff --git a/src/html/meta.js b/src/html/meta.js
index 5d5824c5..b6c224eb 100644
--- a/src/html/meta.js
+++ b/src/html/meta.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLMetaElement");
/*
* HTMLMetaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLMetaElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLMetaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -40,4 +34,4 @@ __extend__(HTMLMetaElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLMetaElement = HTMLMetaElement;
diff --git a/src/html/object.js b/src/html/object.js
index 94a61565..dc51c959 100644
--- a/src/html/object.js
+++ b/src/html/object.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLObjectElement");
/*
* HTMLObjectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLObjectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLObjectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -91,4 +85,5 @@ __extend__(HTMLObjectElement.prototype, {
}
});
+$w.HTMLObjectElement = HTMLObjectElement;
\ No newline at end of file
diff --git a/src/html/optgroup.js b/src/html/optgroup.js
index 58530f72..70905ea0 100644
--- a/src/html/optgroup.js
+++ b/src/html/optgroup.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLOptGroupElement");
/*
* HTMLOptGroupElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptGroupElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptGroupElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -28,4 +22,4 @@ __extend__(HTMLOptGroupElement.prototype, {
},
});
-
\ No newline at end of file
+$w.HTMLOptGroupElement = HTMLOptGroupElement;
\ No newline at end of file
diff --git a/src/html/option.js b/src/html/option.js
index ebb0bdc2..b662a8c1 100644
--- a/src/html/option.js
+++ b/src/html/option.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLOptionElement");
/*
* HTMLOptionElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLOptionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLOptionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -68,4 +62,4 @@ __extend__(HTMLOptionElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLOptionElement = HTMLOptionElement;
diff --git a/src/html/param.js b/src/html/param.js
index 3a88586d..ae3a61ce 100644
--- a/src/html/param.js
+++ b/src/html/param.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLParamElement");
/*
* HTMLParamElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLParamElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLParamElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -40,4 +34,5 @@ __extend__(HTMLParamElement.prototype, {
},
});
-
\ No newline at end of file
+$w.HTMLParamElement = HTMLParamElement;
+
\ No newline at end of file
diff --git a/src/html/script.js b/src/html/script.js
index 586d72eb..574c560b 100644
--- a/src/html/script.js
+++ b/src/html/script.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLScriptElement");
/*
* HTMLScriptElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLScriptElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLScriptElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -67,4 +61,4 @@ __extend__(HTMLScriptElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLScriptElement = HTMLScriptElement;
\ No newline at end of file
diff --git a/src/html/select.js b/src/html/select.js
index ccb97d43..e224f29d 100644
--- a/src/html/select.js
+++ b/src/html/select.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLSelectElement");
/*
* HTMLSelectElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLSelectElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLSelectElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -109,4 +103,4 @@ __extend__(HTMLSelectElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLSelectElement = HTMLSelectElement;
\ No newline at end of file
diff --git a/src/html/style.js b/src/html/style.js
index 50488e42..f6beff69 100644
--- a/src/html/style.js
+++ b/src/html/style.js
@@ -2,12 +2,6 @@ $debug("Defining HTMLStyleElement");
/*
* HTMLStyleElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLStyleElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLStyleElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -34,4 +28,4 @@ __extend__(HTMLStyleElement.prototype, {
}
});
-
\ No newline at end of file
+$w.HTMLStyleElement = HTMLStyleElement;
\ No newline at end of file
diff --git a/src/html/table.js b/src/html/table.js
index 321bc9b7..c3ee3e33 100644
--- a/src/html/table.js
+++ b/src/html/table.js
@@ -3,14 +3,7 @@ $debug("Defining HTMLTableElement");
* HTMLTableElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableElement = function(ownerDocument) {
-
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -196,7 +189,6 @@ __extend__(HTMLTableElement.prototype, {
this.setAttribute("width", width);
}
-
});
-
\ No newline at end of file
+$w.HTMLTableElement = HTMLTableElement;
\ No newline at end of file
diff --git a/src/html/tbody-thead-tfoot.js b/src/html/tbody-thead-tfoot.js
index 7fc0804a..a1d443e1 100644
--- a/src/html/tbody-thead-tfoot.js
+++ b/src/html/tbody-thead-tfoot.js
@@ -1,14 +1,8 @@
-$debug("Defining HTMLxElement");
+$debug("Defining HTMLTableSectionElement");
/*
* HTMLxElement - DOM Level 2
* - Contributed by Steven Wood
*/
-$w.__defineGetter__("HTMLTableSectionElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableSectionElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -94,4 +88,4 @@ __extend__(HTMLTableSectionElement.prototype, {
});
-
\ No newline at end of file
+$w.HTMLTableSectionElement = HTMLTableSectionElement;
diff --git a/src/html/td-th.js b/src/html/td-th.js
index c404971e..77bd8679 100644
--- a/src/html/td-th.js
+++ b/src/html/td-th.js
@@ -3,12 +3,6 @@ $debug("Defining HTMLTableCellElement");
* HTMLTableCellElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableCellElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableCellElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -21,4 +15,4 @@ __extend__(HTMLTableCellElement.prototype, {
});
-
\ No newline at end of file
+$w.HTMLTableCellElement = HTMLTableCellElement;
\ No newline at end of file
diff --git a/src/html/textarea.js b/src/html/textarea.js
index 4bf067e1..97a08daa 100644
--- a/src/html/textarea.js
+++ b/src/html/textarea.js
@@ -1,19 +1,14 @@
-$debug("Defining HTMLxElement");
+$debug("Defining HTMLTextAreaElement");
/*
-* HTMLxElement - DOM Level 2
+* HTMLTextAreaElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLxElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-var HTMLxElement = function(ownerDocument) {
+var HTMLTextAreaElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
};
-HTMLxElement.prototype = new HTMLElement;
-__extend__(HTMLxElement.prototype, {
+HTMLTextAreaElement.prototype = new HTMLElement;
+__extend__(HTMLTextAreaElement.prototype, {
+ //TODO
});
-
\ No newline at end of file
+$w.HTMLTextAreaElement = HTMLTextAreaElement;
\ No newline at end of file
diff --git a/src/html/title.js b/src/html/title.js
index 4bf067e1..70eee4af 100644
--- a/src/html/title.js
+++ b/src/html/title.js
@@ -1,19 +1,14 @@
-$debug("Defining HTMLxElement");
+$debug("Defining HTMLTitleElement");
/*
-* HTMLxElement - DOM Level 2
+* HTMLTitleElement - DOM Level 2
*/
-$w.__defineGetter__("HTMLxElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
-var HTMLxElement = function(ownerDocument) {
+var HTMLTitleElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
};
-HTMLxElement.prototype = new HTMLElement;
-__extend__(HTMLxElement.prototype, {
+HTMLTitleElement.prototype = new HTMLElement;
+__extend__(HTMLTitleElement.prototype, {
+ //TODO
});
-
\ No newline at end of file
+$w.HTMLTitleElement = HTMLTitleElement;
\ No newline at end of file
diff --git a/src/html/tr.js b/src/html/tr.js
index 4821828a..18959031 100644
--- a/src/html/tr.js
+++ b/src/html/tr.js
@@ -1,14 +1,8 @@
-$debug("Defining HTMLRowElement");
+$debug("Defining HTMLTableRowElement");
/*
* HTMLRowElement - DOM Level 2
* Implementation Provided by Steven Wood
*/
-$w.__defineGetter__("HTMLTableRowElement", function(){
- return function(){
- throw new Error("Object cannot be created in this context");
- };
-});
-
var HTMLTableRowElement = function(ownerDocument) {
this.HTMLElement = HTMLElement;
this.HTMLElement(ownerDocument);
@@ -108,4 +102,4 @@ __extend__(HTMLTableRowElement.prototype, {
});
-
\ No newline at end of file
+$w.HTMLTableRowElement = HTMLTableRowElement;