Socket
Socket
Sign inDemoInstall

jsdom

Package Overview
Dependencies
Maintainers
2
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdom - npm Package Compare versions

Comparing version 0.8.3 to 0.8.4

2

lib/jsdom.js

@@ -68,3 +68,3 @@ var fs = require('fs');

require('./jsdom/selectors/index').applyQuerySelector(doc, level);
require('./jsdom/selectors/index').applyQuerySelectorPrototype(level);

@@ -71,0 +71,0 @@ features.applyDocumentFeatures(doc, options.features);

@@ -288,3 +288,18 @@ var http = require('http'),

},
Image : NOT_IMPLEMENTED(null, 'window.Image')
Image : NOT_IMPLEMENTED(null, 'window.Image'),
// Note: these will not be necessary for newer Node.js versions, which have
// typed arrays in V8 and thus on every global object. (That is, in newer
// versions we'll get `ArrayBuffer` just as automatically as we get
// `Array`.) But to support older versions, we explicitly set them here.
Int8Array: Int8Array,
Int16Array: Int16Array,
Int32Array: Int32Array,
Float32Array: Float32Array,
Float64Array: Float64Array,
Uint8Array: Uint8Array,
Uint8ClampedArray: Uint8ClampedArray,
Uint16Array: Uint16Array,
Uint32Array: Uint32Array,
ArrayBuffer: ArrayBuffer
};

@@ -291,0 +306,0 @@

@@ -11,29 +11,22 @@ var nwmatcher = require("nwmatcher/src/nwmatcher-noqsa");

exports.applyQuerySelector = function(doc, dom) {
doc.querySelector = function(selector) {
exports.applyQuerySelectorPrototype = function(dom) {
dom.Document.prototype.querySelector = function(selector) {
return addNwmatcher(this).first(selector, this);
};
doc.querySelectorAll = function(selector) {
dom.Document.prototype.querySelectorAll = function(selector) {
return new dom.NodeList(addNwmatcher(this).select(selector, this));
};
var _createElement = doc.createElement;
doc.createElement = function() {
var element = _createElement.apply(this, arguments);
dom.Element.prototype.querySelector = function(selector) {
return addNwmatcher(this.ownerDocument).first(selector, this);
};
element.querySelector = function(selector) {
return addNwmatcher(this.ownerDocument).first(selector, this);
};
dom.Element.prototype.querySelectorAll = function(selector) {
return new dom.NodeList(addNwmatcher(this.ownerDocument).select(selector, this));
};
element.querySelectorAll = function(selector) {
return new dom.NodeList(addNwmatcher(this.ownerDocument).select(selector, this));
};
element.matchesSelector = function(selector) {
return addNwmatcher(this.ownerDocument).match(this, selector);
};
return element;
dom.Element.prototype.matchesSelector = function(selector) {
return addNwmatcher(this.ownerDocument).match(this, selector);
};
};
{
"name": "jsdom",
"version": "0.8.3",
"version": "0.8.4",
"description": "A JavaScript implementation of the W3C DOM",

@@ -5,0 +5,0 @@ "keywords": ["dom", "w3c", "html"],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc