Comparing version 0.5.3 to 0.5.4
@@ -175,3 +175,4 @@ var dom = exports.dom = require("./jsdom/level3/index").dom, | ||
}, | ||
url: config.url | ||
url: config.url, | ||
parser: config.parser | ||
}, | ||
@@ -322,3 +323,4 @@ window = exports.html(html, null, options).createWindow(), | ||
'document': false, // HTMLDocument properties | ||
'features': false // allow for features to be specified | ||
'features': false, // allow for features to be specified | ||
'parser' : false | ||
}, | ||
@@ -325,0 +327,0 @@ propKeys = Object.keys(props), |
@@ -396,6 +396,2 @@ var http = require('http'), | ||
if (dom._augmented) { | ||
return dom; | ||
} | ||
if(!options) { | ||
@@ -406,4 +402,11 @@ options = {}; | ||
// set up html parser - use a provided one or try and load from library | ||
var htmltodom = new HtmlToDom(options.parser || getDefaultParser()); | ||
var parser = options.parser || getDefaultParser(); | ||
if (dom._augmented && dom._parser === parser) { | ||
return dom; | ||
} | ||
dom._parser = parser; | ||
var htmltodom = new HtmlToDom(parser); | ||
if (!dom.HTMLDocument) { | ||
@@ -483,3 +486,3 @@ dom.HTMLDocument = dom.Document; | ||
dom.Element.prototype.__defineSetter__('doctype', function() { | ||
throw new core.DOMException(NO_MODIFICATION_ALLOWED_ERR); | ||
throw new dom.DOMException(dom.NO_MODIFICATION_ALLOWED_ERR); | ||
}); | ||
@@ -486,0 +489,0 @@ dom.Element.prototype.__defineGetter__('doctype', function() { |
@@ -1244,3 +1244,3 @@ /* | ||
attrs = attrElement.attributes; | ||
var attrs = attrElement.attributes; | ||
var attr, len = attrs.length, defaultAttr; | ||
@@ -1247,0 +1247,0 @@ for (var i = 0; i < len; i++) { |
@@ -93,3 +93,3 @@ var core = require("../level1/core").dom.level1.core; | ||
if (doctype && !doctype.entities) { | ||
doctype.entities = new dom.EntityNodeMap(); | ||
doctype.entities = new core.EntityNodeMap(); | ||
} | ||
@@ -215,3 +215,3 @@ | ||
if (this._readonly === true) { | ||
throw new core.DOMException(NO_MODIFICATION_ALLOWED_ERR); | ||
throw new core.DOMException(core.NO_MODIFICATION_ALLOWED_ERR); | ||
} | ||
@@ -218,0 +218,0 @@ |
@@ -1252,2 +1252,7 @@ var core = require("./core").dom.level2.core, | ||
tagName: 'IMG', | ||
proto: { | ||
get src() { | ||
return core.resourceLoader.resolve(this._ownerDocument, this.getAttribute('src')); | ||
} | ||
}, | ||
attributes: [ | ||
@@ -1262,3 +1267,3 @@ 'name', | ||
'longDesc', | ||
'src', | ||
{prop: 'src', type: 'string', read: false}, | ||
'useMap', | ||
@@ -1619,3 +1624,4 @@ {prop: 'vspace', type: 'long'}, | ||
get rowIndex() { | ||
return closest(this, 'TABLE').rows._toArray().indexOf(this); | ||
var table = closest(this, 'TABLE'); | ||
return table ? table.rows._toArray().indexOf(this) : -1; | ||
}, | ||
@@ -1622,0 +1628,0 @@ |
223
package.json
{ | ||
"name": "jsdom", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "A JavaScript implementation of the W3C DOM", | ||
"keywords": [ | ||
"dom", | ||
"w3c", | ||
"html" | ||
], | ||
"keywords": ["dom", "w3c", "html"], | ||
"maintainers": [ | ||
{ | ||
"name": "Elijah Insua", | ||
"email": "tmpvar@gmail.com", | ||
"url": "http://tmpvar.com" | ||
}, | ||
{ | ||
"name": "Domenic Denicola", | ||
"email": "domenic@domenicdenicola.com", | ||
"url": "http://domenicdenicola.com" | ||
} | ||
"Elijah Insua <tmpvar@gmail.com> (http://tmpvar.com)", | ||
"Domenic Denicola <domenic@domenicdenicola.com (http://domenicdenicola.com)" | ||
], | ||
"contributors": [ | ||
{ | ||
"name": "Vincent Greene", | ||
"email": "ulteriorlife@gmail.com" | ||
}, | ||
{ | ||
"name": "Dav Glass", | ||
"email": "davglass@gmail.com" | ||
}, | ||
{ | ||
"name": "Felix Gnass", | ||
"email": "fgnass@gmail.com" | ||
}, | ||
{ | ||
"name": "Charlie Robbins", | ||
"email": "charlie.robbins@gmail.com" | ||
}, | ||
{ | ||
"name": "Aria Stewart", | ||
"email": "aredridel@nbtsc.org" | ||
}, | ||
{ | ||
"name": "Matthew", | ||
"email": "N.A.", | ||
"url": "http://github.com/matthewpflueger/" | ||
}, | ||
{ | ||
"name": "Olivier El Mekki", | ||
"email": "unknown", | ||
"url": "http://blog.olivier-elmekki.com/" | ||
}, | ||
{ | ||
"name": "Shimon Dookdin", | ||
"email": "helpmepro1@gmail.com" | ||
}, | ||
{ | ||
"name": "Daniel Cassidy", | ||
"email": "mail@danielcassidy.me.uk", | ||
"url": "http://www.danielcassidy.me.uk/" | ||
}, | ||
{ | ||
"name": "Sam Ruby", | ||
"url": "http://intertwingly.net/blog/" | ||
}, | ||
{ | ||
"name": "hij1nx", | ||
"url": "http://github.com/hij1nx" | ||
}, | ||
{ | ||
"name": "Yonathan Randolph", | ||
"url": "http://github.com/yonran" | ||
}, | ||
{ | ||
"name": "Martin Davis", | ||
"url": "http://github.com/waslogic" | ||
}, | ||
{ | ||
"name": "Andreas Lind Petersen", | ||
"email": "andreas@one.com" | ||
}, | ||
{ | ||
"name": "d-ash", | ||
"url": "http://github.com/d-ash" | ||
}, | ||
{ | ||
"name": "Robin Zhong", | ||
"email": "fbzhong@gmail.com" | ||
}, | ||
{ | ||
"name": "Alexander Flatter", | ||
"email": "flatter@gmail.com" | ||
}, | ||
{ | ||
"name": "Heng Liu", | ||
"email": "liucougar@gmail.com" | ||
}, | ||
{ | ||
"name": "Brian McDaniel", | ||
"url": "http://github.com/brianmcd" | ||
}, | ||
{ | ||
"name": "John Hurliman", | ||
"email": "jhurliman@jhurliman.org" | ||
}, | ||
{ | ||
"name": "Jimmy Mabey" | ||
}, | ||
{ | ||
"name": "Gregory Tomlinson" | ||
}, | ||
{ | ||
"name": "Jason Davies", | ||
"url": "http://www.jasondavies.com/" | ||
}, | ||
{ | ||
"name": "Josh Marshall", | ||
"url": "http://www.ponderingtheobvious.com/" | ||
}, | ||
{ | ||
"name" : "Jason Priestley", | ||
"url" : "https://github.com/jhp" | ||
}, | ||
{ | ||
"name" : "Derek Lindahl", | ||
"url" : "https://github.com/dlindahl" | ||
}, | ||
{ | ||
"name" : "Chris Roebuck", | ||
"email" : "chris@quillu.com", | ||
"url" : "http://www.quillu.com" | ||
}, | ||
{ | ||
"name" : "Avi Deitcher", | ||
"url" : "https://github.com/deitch" | ||
}, | ||
{ | ||
"name": "Nao Iizuka", | ||
"email": "iizuka@kyu-mu.net", | ||
"url": "https://github.com/iizukanao" | ||
}, | ||
{ | ||
"name" : "Peter Perenyi", | ||
"web" : "https://github.com/sinegar" | ||
}, | ||
{ | ||
"name" : "Tiago Rodrigues", | ||
"email" : "tmcrodrigues@gmail.com", | ||
"web" : "http://trodrigues.net" | ||
}, | ||
{ | ||
"name" : "Samori Gorse", | ||
"email" : "samorigorse@gmail.com", | ||
"web" : "http://github.com/shinuza" | ||
}, | ||
{ | ||
"name" : "John Roberts", | ||
"email" : "jroberts@logitech.com" | ||
}, | ||
{ | ||
"name" : "Chad Walker", | ||
"email" : "chad@chad-cat-lore-eddie.com", | ||
"url" : "https://github.com/chad3814" | ||
}, | ||
{ | ||
"name": "Zach Smith", | ||
"email": "x.coder.zach@gmail.com", | ||
"url": "https://github.com/xcoderzach" | ||
} | ||
"Vincent Greene <ulteriorlife@gmail.com>", | ||
"Dav Glass <davglass@gmail.com>", | ||
"Felix Gnass <fgnass@gmail.com>", | ||
"Charlie Robbins <charlie.robbins@gmail.com>", | ||
"Aria Stewart <aredridel@nbtsc.org>", | ||
"Matthew <N.A.> (http://github.com/matthewpflueger/)", | ||
"Olivier El Mekki <unknown> (http://blog.olivier-elmekki.com/)", | ||
"Shimon Dookdin <helpmepro1@gmail.com>", | ||
"Daniel Cassidy <mail@danielcassidy.me.uk> (http://www.danielcassidy.me.uk/)", | ||
"Sam Ruby (http://intertwingly.net/blog/)", | ||
"hij1nx (http://github.com/hij1nx)", | ||
"Yonathan Randolph (http://github.com/yonran)", | ||
"Martin Davis (http://github.com/waslogic)", | ||
"Andreas Lind Petersen <andreas@one.com>", | ||
"d-ash (http://github.com/d-ash)", | ||
"Robin Zhong <fbzhong@gmail.com>", | ||
"Alexander Flatter <flatter@gmail.com>", | ||
"Heng Liu <liucougar@gmail.com>", | ||
"Brian McDaniel (http://github.com/brianmcd)", | ||
"John Hurliman <jhurliman@jhurliman.org>", | ||
"Jimmy Mabey", | ||
"Gregory Tomlinson", | ||
"Jason Davies (http://www.jasondavies.com/)", | ||
"Josh Marshall (http://www.ponderingtheobvious.com/)", | ||
"Jason Priestley (https://github.com/jhp)", | ||
"Derek Lindahl (https://github.com/dlindahl)", | ||
"Chris Roebuck <chris@quillu.com> (http://www.quillu.com)", | ||
"Avi Deitcher (https://github.com/deitch)", | ||
"Nao Iizuka <iizuka@kyu-mu.net> (https://github.com/iizukanao)", | ||
"Peter Perenyi (https://github.com/sinegar)", | ||
"Tiago Rodrigues <tmcrodrigues@gmail.com> (http://trodrigues.net)", | ||
"Samori Gorse <samorigorse@gmail.com> (http://github.com/shinuza)", | ||
"John Roberts <jroberts@logitech.com>", | ||
"Chad Walker <chad@chad-cat-lore-eddie.com> (https://github.com/chad3814)", | ||
"Zach Smith <x.coder.zach@gmail.com> (https://github.com/xcoderzach)" | ||
], | ||
@@ -184,3 +60,3 @@ "bugs": { | ||
"type": "git", | ||
"url": "http://github.com/tmpvar/jsdom.git" | ||
"url": "git://github.com/tmpvar/jsdom.git" | ||
} | ||
@@ -192,14 +68,13 @@ ], | ||
"dependencies": { | ||
"htmlparser" : "1.x", | ||
"nwmatcher" : ">=1.3.1", | ||
"request" : "2.14", | ||
"cssom" : "0.2.x", | ||
"cssstyle" : ">=0.2.3", | ||
"contextify" : "0.1.x" | ||
"htmlparser": "1.x", | ||
"nwmatcher": ">=1.3.1", | ||
"request": "2.x", | ||
"cssom": "0.2.x", | ||
"cssstyle": ">=0.2.3", | ||
"contextify": "0.1.x" | ||
}, | ||
"devDependencies" : { | ||
"nodeunit" : ">=0.5.x", | ||
"console.log" : "*", | ||
"html5" : ">=0.3.8", | ||
"optimist" : "*" | ||
"nodeunit": ">=0.5.x", | ||
"html5": ">=0.3.8", | ||
"optimist": "*" | ||
}, | ||
@@ -206,0 +81,0 @@ "directories": { |
@@ -122,2 +122,3 @@ # jsdom | ||
- `config.scripts`: see `scripts` above. | ||
- `config.url`: the URL for `location.href` if `config.html` is not a file path or URL. (Relative `<a href>` and `<img src>` values are evaluated relative to this.) | ||
- `config.src`: an array of JavaScript strings that will be evaluated against the resulting document. Similar to `scripts`, but it accepts JavaScript instead of paths/URLs. | ||
@@ -281,3 +282,3 @@ - `config.done`: see `callback` above. | ||
level2/core 283/283 100% | ||
level2/html 700/700 100% | ||
level2/html 701/701 100% | ||
level2/style 13/13 100% | ||
@@ -296,3 +297,3 @@ level2/extra 4/4 100% | ||
------------------------------------------------------ | ||
TOTALS: 0/2583 failed; 100% success | ||
TOTALS: 0/2584 failed; 100% success | ||
``` | ||
@@ -299,0 +300,0 @@ |
Sorry, the diff of this file is too big to display
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
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
3
10065
336
346334
24
+ Addedajv@6.12.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.10.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)
- Removedrequest@2.14.0(transitive)
Updatedrequest@2.x