Socket
Socket
Sign inDemoInstall

jsdom

Package Overview
Dependencies
111
Maintainers
6
Versions
258
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 21.1.1 to 21.1.2

23

lib/jsdom/living/events/MouseEvent-impl.js

@@ -8,3 +8,2 @@ "use strict";

const MouseEventInit = require("../generated/MouseEventInit");
const { wrapperForImpl } = require("../generated/utils");

@@ -19,25 +18,15 @@ class MouseEventImpl extends UIEventImpl {

get pageX() {
if (this._dispatchFlag) {
return 0;
}
const offset = wrapperForImpl(this.view)?.scrollX || 0;
return offset + this.clientX;
// TODO: consider dispatch flag and return page-relative event coordinate once layout is supported
return this.clientX; // TODO: add horizontal scroll offset once jsdom implements scrolling support
}
get pageY() {
if (this._dispatchFlag) {
return 0;
}
const offset = wrapperForImpl(this.view)?.scrollY || 0;
return offset + this.clientY;
// TODO: consider dispatch flag and return page-relative event coordinate once layout is supported
return this.clientY; // TODO: add vertical scroll offset once jsdom implements scrolling support
}
get offsetX() {
if (this._dispatchFlag) {
return 0;
}
// TODO: consider dispatch flag and return target-relative event coordinate once layout is supported
return this.pageX;
}
get offsetY() {
if (this._dispatchFlag) {
return 0;
}
// TODO: consider dispatch flag and return target-relative event coordinate once layout is supported
return this.pageY;

@@ -44,0 +33,0 @@ }

@@ -599,3 +599,3 @@ "use strict";

_dispatchSelectEvent() {
fireAnEvent("select", this, undefined, { bubbles: true, cancelable: true });
setTimeout(() => fireAnEvent("select", this, undefined, { bubbles: true, cancelable: false }), 0);
}

@@ -698,3 +698,3 @@

const newEnd = start + this.value.length;
const newEnd = start + repl.length;

@@ -701,0 +701,0 @@ if (selectionMode === "select") {

@@ -97,3 +97,3 @@ "use strict";

_dispatchSelectEvent() {
fireAnEvent("select", this, undefined, { bubbles: true, cancelable: true });
setTimeout(() => fireAnEvent("select", this, undefined, { bubbles: true, cancelable: false }), 0);
}

@@ -160,3 +160,3 @@

const newEnd = start + this.value.length;
const newEnd = start + repl.length;

@@ -163,0 +163,0 @@ if (selectionMode === "select") {

{
"name": "jsdom",
"version": "21.1.1",
"version": "21.1.2",
"description": "A JavaScript implementation of many web standards",

@@ -36,3 +36,3 @@ "keywords": [

"is-potential-custom-element-name": "^1.0.1",
"nwsapi": "^2.2.2",
"nwsapi": "^2.2.4",
"parse5": "^7.1.2",

@@ -39,0 +39,0 @@ "rrweb-cssom": "^0.6.0",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc