Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTMLElement should support setPointerCapture/hasPointerCapture/releasePointerCapture #1733

Open
qtn-g opened this issue Feb 18, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@qtn-g
Copy link

qtn-g commented Feb 18, 2025

Describe the bug
According to the description of the DOM Element. It should support setPointerCapture, hasPointerCapture and releasePointerCapture.

To Reproduce

const myComponent = document.createElement('div');

myComponent.addEventListener('pointerdown', (evt) => {
myComponent.setPointerCapture(evt.pointerId);
  if (myComponent.hasPointerCapture(evt.pointerId)) {
    myComponent.releasePointerCapture(evt.pointerId);
  }
});

Expected behavior
Nothing output in the console

Actual behavior
TypeError: myComponent.setPointerCapture is not a function

Device:

  • Browsers: chrome, firefox

Additional context:

  • Node version: 20.11.0
  • Happy-dom version: 17.1.0
  • Vitest version: 2.1.0
@qtn-g qtn-g added the bug Something isn't working label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant