Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

happy-dom

Package Overview
Dependencies
Maintainers
1
Versions
593
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

happy-dom - npm Package Compare versions

Comparing version 15.8.2 to 15.8.3

4

cjs/nodes/html-details-element/HTMLDetailsElement.d.ts

@@ -30,3 +30,7 @@ import Event from '../../event/Event.cjs';

[PropertySymbol.onRemoveAttribute](removedAttribute: Attr): void;
/**
* @override
*/
dispatchEvent(event: Event): boolean;
}
//# sourceMappingURL=HTMLDetailsElement.d.ts.map

@@ -30,3 +30,7 @@ import Event from '../../event/Event.js';

[PropertySymbol.onRemoveAttribute](removedAttribute: Attr): void;
/**
* @override
*/
dispatchEvent(event: Event): boolean;
}
//# sourceMappingURL=HTMLDetailsElement.d.ts.map
import Event from '../../event/Event.js';
import HTMLElement from '../html-element/HTMLElement.js';
import * as PropertySymbol from '../../PropertySymbol.js';
import EventPhaseEnum from '../../event/EventPhaseEnum.js';
import MouseEvent from '../../event/events/MouseEvent.js';
/**

@@ -51,3 +53,17 @@ * HTMLDetailsElement

}
/**
* @override
*/
dispatchEvent(event) {
const returnValue = super.dispatchEvent(event);
if (!event[PropertySymbol.defaultPrevented] &&
event[PropertySymbol.target]?.[PropertySymbol.localName] === 'summary' &&
event.type === 'click' &&
event.eventPhase === EventPhaseEnum.bubbling &&
event instanceof MouseEvent) {
this.open = !this.open;
}
return returnValue;
}
}
//# sourceMappingURL=HTMLDetailsElement.js.map

2

package.json
{
"name": "happy-dom",
"version": "15.8.2",
"version": "15.8.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/capricorn86/happy-dom",

@@ -5,2 +5,4 @@ import Event from '../../event/Event.js';

import Attr from '../attr/Attr.js';
import EventPhaseEnum from '../../event/EventPhaseEnum.js';
import MouseEvent from '../../event/events/MouseEvent.js';

@@ -60,2 +62,21 @@ /**

}
/**
* @override
*/
public override dispatchEvent(event: Event): boolean {
const returnValue = super.dispatchEvent(event);
if (
!event[PropertySymbol.defaultPrevented] &&
event[PropertySymbol.target]?.[PropertySymbol.localName] === 'summary' &&
event.type === 'click' &&
event.eventPhase === EventPhaseEnum.bubbling &&
event instanceof MouseEvent
) {
this.open = !this.open;
}
return returnValue;
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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