Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:thatcher/env-js
Browse files Browse the repository at this point in the history
  • Loading branch information
gleneivey committed Apr 13, 2010
2 parents 700c791 + cfaf98b commit 1774c8a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
2 changes: 2 additions & 0 deletions build.xml
Expand Up @@ -382,6 +382,7 @@
<fileset dir="${SRC_DIR}" includes="common/__trim__.js" />
<fileset dir="${SRC_DIR}" includes="common/__extend__.js" />
<fileset dir="${SRC_DIR}" includes="common/__setArray__.js" />
<fileset dir="${SRC_DIR}" includes="html/cookie.js" />
<fileset dir="${SRC_DIR}" includes="html/document.js" />
<fileset dir="${SRC_DIR}" includes="html/htmlevents.js" />
<fileset dir="${SRC_DIR}" includes="html/keyboardevents.js" />
Expand Down Expand Up @@ -429,6 +430,7 @@
<fileset dir="${SRC_DIR}" includes="html/param.js" />
<fileset dir="${SRC_DIR}" includes="html/script.js" />
<fileset dir="${SRC_DIR}" includes="html/select.js" />
<fileset dir="${SRC_DIR}" includes="html/span.js" />
<fileset dir="${SRC_DIR}" includes="html/style.js" />
<fileset dir="${SRC_DIR}" includes="html/table.js" />
<fileset dir="${SRC_DIR}" includes="html/tbody-thead-tfoot.js" />
Expand Down
3 changes: 2 additions & 1 deletion specs/html/spec.js
Expand Up @@ -2,7 +2,7 @@ QUnit.module('html');

test('HTML Interfaces Available', function(){

expect(52);
expect(53);
ok(HTMLDocument, 'HTMLDocument defined');
ok(HTMLElement, 'HTMLElement defined');
ok(HTMLCollection, 'HTMLCollection defined');
Expand Down Expand Up @@ -42,6 +42,7 @@ test('HTML Interfaces Available', function(){
ok(HTMLParamElement, 'HTMLParamElement defined');
ok(HTMLScriptElement, 'HTMLScriptElement defined');
ok(HTMLSelectElement, 'HTMLSelectElement defined');
ok(HTMLSpanElement, 'HTMLSpanElement defined');
ok(HTMLStyleElement, 'HTMLStyleElement defined');
ok(HTMLTableElement, 'HTMLTableElement defined');
ok(HTMLTableSectionElement, 'HTMLTableSectionElement defined');
Expand Down
1 change: 1 addition & 0 deletions src/html/__global__.js
Expand Up @@ -47,6 +47,7 @@ var HTMLDocument,
HTMLPreElement,
HTMLScriptElement,
HTMLSelectElement,
HTMLSpanElement,
HTMLStyleElement,
HTMLTableElement,
HTMLTableSectionElement,
Expand Down
12 changes: 10 additions & 2 deletions src/html/document.js
Expand Up @@ -98,6 +98,8 @@ __extend__(HTMLDocument.prototype, {
node = new HTMLMapElement(this);break;
case "META":
node = new HTMLMetaElement(this);break;
case "NOSCRIPT":
node = new HTMLElement(this);break;
case "OBJECT":
node = new HTMLObjectElement(this);break;
case "OPTGROUP":
Expand All @@ -116,6 +118,12 @@ __extend__(HTMLDocument.prototype, {
node = new HTMLScriptElement(this);break;
case "SELECT":
node = new HTMLSelectElement(this);break;
case "SMALL":
node = new HTMLElement(this);break;
case "SPAN":
node = new HTMLSpanElement(this);break;
case "STRONG":
node = new HTMLElement(this);break;
case "STYLE":
node = new HTMLStyleElement(this);break;
case "TABLE":
Expand Down Expand Up @@ -421,7 +429,7 @@ Aspect.around({
node = invocation.proceed(),
doc = node.ownerDocument;

//console.log('element appended: %s %s', node+'', node.namespaceURI);
//console.log('element appended: %s %s %s', node+'', node.nodeName, node.namespaceURI);
if((node.nodeType !== Node.ELEMENT_NODE)){
//for now we are only handling element insertions. probably
//we will need to handle text node changes to script tags and
Expand Down Expand Up @@ -525,7 +533,7 @@ Aspect.around({
}//switch on ns
break;
default:
console.log('element appended: %s %s', node+'', node.namespaceURI);
// console.log('element appended: %s %s', node+'', node.namespaceURI);
}//switch on doc.parsing
return node;

Expand Down
15 changes: 15 additions & 0 deletions src/html/span.js
@@ -0,0 +1,15 @@
/**
* HTML 5: 4.6.22 The span element
* http://dev.w3.org/html5/spec/Overview.html#the-span-element
*
*/
HTMLSpanElement = function(ownerDocument) {
HTMLElement.apply(this, arguments);
};
HTMLSpanElement.prototype = new HTMLElement();
__extend__(HTMLSpanElement.prototype, {
toString: function(){
return '[object HTMLSpanElement]';
}
});

0 comments on commit 1774c8a

Please sign in to comment.