question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PointerEvent constructor not available in window

See original GitHub issue

Basic info:

  • Node.js version: 10.15.2
  • jsdom version: 13.2.0

Minimal reproduction case

const {JSDOM} = require('jsdom');
const dom = new JSDOM();
new dom.window.PointerEvent('pointerup', {button: 0});

This throws TypeError: dom.window.PointerEvent is not a constructor

How does similar code behave in browsers?

image

Standard: https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:36
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
wthocommented, Mar 21, 2020
3reactions
jasedwardscommented, Apr 9, 2021

Is this still being worked on?

Read more comments on GitHub >

github_iconTop Results From Across the Web

PointerEvent() - Web APIs - MDN Web Docs
The PointerEvent() constructor creates a new synthetic and untrusted PointerEvent object instance.
Read more >
javascript - How to substitute the PointerEvent in Jest ...
In my react app I test for different event constructors in a switch case statement. Something like that: switch (event.constructor) { case ...
Read more >
Pointer Events - W3C
Abstract. The features in this specification extend or modify those found in Pointer Events, a W3C Recommendation that describes events and ...
Read more >
PointerEvent | typescript - v3.7.7
Returns the type of event, e.g. "click", "hashchange", or "submit". view. view: Window | null. Inherited from UIEvent.view.
Read more >
Maps JavaScript API | Google Developers
If a FeatureLayer of the specified FeatureType does not exist on this map, ... The click event is not fired if a marker...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found