Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

input elements have type=text by default

  • Loading branch information...
commit 3648e81579ad822b75329db1ec044fbb2496fb55 1 parent c613582
Ɛərɪn VonderHaar avh4 authored
Showing with 9 additions and 0 deletions.
  1. +4 −0 dom-element.js
  2. +5 −0 test/test-document.js
4 dom-element.js
View
@@ -22,6 +22,10 @@ function DOMElement(tagName, owner, namespace) {
this.style = {}
this.ownerDocument = owner || null
this.namespaceURI = ns
+
+ if (this.tagName === 'INPUT') {
+ this.type = 'text'
+ }
}
DOMElement.prototype.type = "DOMElement"
5 test/test-document.js
View
@@ -255,6 +255,11 @@ function testDocument(document) {
assert.end()
})
+ test("input has type=text by default", function (assert) {
+ assert.equal(document.createElement("input").type, "text");
+ assert.end()
+ })
+
function elemString(element) {
var html = String(element) || "[]"
Please sign in to comment.
Something went wrong with that request. Please try again.