Comparing version 0.10.6 to 0.11.0
@@ -11,3 +11,3 @@ var fs = require('fs'); | ||
var features = require('./jsdom/browser/documentfeatures'); | ||
var dom = exports.dom = require('./jsdom/level3/index').dom; | ||
var dom = exports.dom = require('./jsdom/living/index').dom; | ||
var createWindow = exports.createWindow = require('./jsdom/browser/index').createWindow; | ||
@@ -21,3 +21,3 @@ | ||
exports.defaultLevel = dom.level3.html; | ||
exports.defaultLevel = dom.living.html; | ||
exports.browserAugmentation = require('./jsdom/browser/index').browserAugmentation; | ||
@@ -49,3 +49,7 @@ exports.windowAugmentation = require('./jsdom/browser/index').windowAugmentation; | ||
return require('./jsdom/level' + level + '/' + feature).dom['level' + level][feature]; | ||
if (String(level) === '1' || String(level) === '2' || String(level) === '3') { | ||
level = 'level' + level; | ||
} | ||
return require('./jsdom/' + level + '/' + feature).dom[level][feature]; | ||
}; | ||
@@ -135,3 +139,3 @@ | ||
if (args.length > 1 && typeof(args[1] === 'string')) { | ||
if (args.length > 1 && typeof args[1] === 'string') { | ||
path = args[1]; | ||
@@ -138,0 +142,0 @@ } |
@@ -224,7 +224,8 @@ var http = require('http'), | ||
navigator: { | ||
userAgent: 'Node.js (' + process.platform + '; U; rv:' + process.version + ')', | ||
appName: 'Node.js jsDom', | ||
platform: process.platform, | ||
appVersion: process.version, | ||
noUI: true | ||
get userAgent() { return 'Node.js (' + process.platform + '; U; rv:' + process.version + ')'; }, | ||
get appName() { return 'Node.js jsDom'; }, | ||
get platform() { return process.platform; }, | ||
get appVersion() { return process.version; }, | ||
noUI: true, | ||
get cookieEnabled() { return true; } | ||
}, | ||
@@ -471,2 +472,6 @@ XMLHttpRequest: function() { | ||
parseDocType(this, html); | ||
if(this._doctype) { | ||
this._childNodes[0] = this._doctype; | ||
} | ||
} | ||
@@ -493,2 +498,6 @@ if (html !== "" && html != null) { | ||
parseDocType(this, html); | ||
if(this._doctype) { | ||
this._childNodes[0] = this._doctype; | ||
} | ||
} | ||
@@ -510,3 +519,3 @@ if (html !== "" && html != null) { | ||
fullDT = '', | ||
name = 'HTML', | ||
name = 'html', | ||
set = true, | ||
@@ -556,3 +565,3 @@ doctype = html.match(DOC_HTML5); | ||
doctype = doctype[0].split(' '); | ||
name = doctype[0].toUpperCase(); | ||
name = doctype[0]; | ||
} | ||
@@ -562,2 +571,3 @@ } | ||
doc._doctype._ownerDocument = doc; | ||
doc._doctype._parentNode = doc; | ||
doc._doctype._fullDT = fullDT; | ||
@@ -564,0 +574,0 @@ doc._doctype.toString = function() { |
@@ -1572,7 +1572,2 @@ /* | ||
createProcessingInstruction: function(/* string */ target,/* string */ data) { | ||
if (this._doctype && this._doctype.name === "html") { | ||
throw new core.DOMException(NOT_SUPPORTED_ERR); | ||
} | ||
if (target.match(tagRegEx) || !target || !target.length) { | ||
@@ -1968,2 +1963,3 @@ throw new core.DOMException(INVALID_CHARACTER_ERR); | ||
this._notations = notations || new core.NotationNodeMap(document); | ||
this._parentNode = document; | ||
@@ -1970,0 +1966,0 @@ core.markTreeReadonly(this._notations); |
@@ -79,8 +79,20 @@ var events = require("../level2/events"), | ||
// Compare Document Position | ||
var DOCUMENT_POSITION_DISCONNECTED = core.Node.prototype.DOCUMENT_POSITION_DISCONNECTED = 0x01; | ||
var DOCUMENT_POSITION_PRECEDING = core.Node.prototype.DOCUMENT_POSITION_PRECEDING = 0x02; | ||
var DOCUMENT_POSITION_FOLLOWING = core.Node.prototype.DOCUMENT_POSITION_FOLLOWING = 0x04; | ||
var DOCUMENT_POSITION_CONTAINS = core.Node.prototype.DOCUMENT_POSITION_CONTAINS = 0x08; | ||
var DOCUMENT_POSITION_CONTAINED_BY = core.Node.prototype.DOCUMENT_POSITION_CONTAINED_BY = 0x10; | ||
var DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = core.Node.prototype.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; | ||
var DOCUMENT_POSITION_DISCONNECTED = core.Node.DOCUMENT_POSITION_DISCONNECTED = | ||
core.Node.prototype.DOCUMENT_POSITION_DISCONNECTED = 0x01; | ||
var DOCUMENT_POSITION_PRECEDING = core.Node.DOCUMENT_POSITION_PRECEDING = | ||
core.Node.prototype.DOCUMENT_POSITION_PRECEDING = 0x02; | ||
var DOCUMENT_POSITION_FOLLOWING = core.Node.DOCUMENT_POSITION_FOLLOWING = | ||
core.Node.prototype.DOCUMENT_POSITION_FOLLOWING = 0x04; | ||
var DOCUMENT_POSITION_CONTAINS = core.Node.DOCUMENT_POSITION_CONTAINS = | ||
core.Node.prototype.DOCUMENT_POSITION_CONTAINS = 0x08; | ||
var DOCUMENT_POSITION_CONTAINED_BY = core.Node.DOCUMENT_POSITION_CONTAINED_BY = | ||
core.Node.prototype.DOCUMENT_POSITION_CONTAINED_BY = 0x10; | ||
var DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = core.Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = | ||
core.Node.prototype.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; | ||
var DOCUMENT_TYPE_NODE = core.Node.prototype.DOCUMENT_TYPE_NODE; | ||
@@ -87,0 +99,0 @@ |
{ | ||
"name": "jsdom", | ||
"version": "0.10.6", | ||
"version": "0.11.0", | ||
"description": "A JavaScript implementation of the DOM and HTML standards", | ||
@@ -5,0 +5,0 @@ "keywords": ["dom", "html", "whatwg", "w3c"], |
# jsdom | ||
A JavaScript implementation of the W3C DOM. | ||
A JavaScript implementation of the WHATWG DOM and HTML standards. | ||
@@ -272,34 +272,4 @@ ## Install | ||
## Test Compliance: | ||
## Running the tests | ||
``` | ||
level1/core 535/535 100% | ||
level1/html 238/238 100% | ||
level1/svg 527/527 100% | ||
level2/core 287/287 100% | ||
level2/html 717/717 100% | ||
level2/style 15/15 100% | ||
level2/extra 4/4 100% | ||
level2/events 24/24 100% | ||
level3/xpath 93/93 100% | ||
whatwg/attributes 10/10 100% | ||
window/index 8/8 100% | ||
window/history 5/5 100% | ||
window/script 10/10 100% | ||
window/console 2/2 100% | ||
window/frame 17/17 100% | ||
sizzle/index 14/14 100% | ||
jsdom/index 84/84 100% | ||
jsdom/parsing 11/11 100% | ||
jsdom/env 25/25 100% | ||
jsdom/utils 11/11 100% | ||
jsonp/jsonp 1/1 100% | ||
browser/css 1/1 100% | ||
browser/index 34/34 100% | ||
------------------------------------------ | ||
TOTALS: 0/2673 failed; 100% success | ||
``` | ||
### Running the tests | ||
First you'll want to `npm install`. To run all the tests, use `npm test`, which just calls `node test/runner`. | ||
@@ -306,0 +276,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
375586
30
10905
323