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

Maybe throw NotSupportedError for createEvent('touchevent') #1071

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

zcorpan
Copy link
Member

@zcorpan zcorpan commented Apr 8, 2022

See w3c/touch-events#64

Depends on w3c/touch-events#111

Closes #952

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

See w3c/touch-events#64

The term "expose legacy touch event APIs" was introduced in w3c/touch-events#111
The TouchEvent interface is still exposed.
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this!

dom.bs Outdated Show resolved Hide resolved
zcorpan added a commit to web-platform-tests/wpt that referenced this pull request Apr 27, 2022
dom.bs Outdated Show resolved Hide resolved
@zcorpan
Copy link
Member Author

zcorpan commented Apr 27, 2022

Via BrowserStack, I checked the tests in Safari 15.4 on an iPhone 13, Chrome and Firefox on Android 12 on a Google Pixel 6. There were no surprises other than a test bug which I've submitted a fix for at web-platform-tests/wpt#33811

I haven't checked Deno or Node, other than the results for the relevant tests are MISSING for Deno on wpt.fyi: https://wpt.fyi/results/dom/nodes/Document-createEvent.https.html?sha=937311ebfd&label=master&max-count=1&product=chrome&product=edge&product=firefox&product=safari&product=deno

@zcorpan
Copy link
Member Author

zcorpan commented Apr 27, 2022

When at least one of w3c/touch-events#115 and w3c/touch-events#114 are merged (and the term flows through to be visible to the bikeshed build server), the build error should go away.

DanielRyanSmith pushed a commit to DanielRyanSmith/wpt that referenced this pull request Apr 27, 2022
@zcorpan
Copy link
Member Author

zcorpan commented May 2, 2022

CI is green now

@annevk
Copy link
Member

annevk commented May 3, 2022

Does this close #952? What about https://bugzilla.mozilla.org/show_bug.cgi?id=1693172?

@zcorpan
Copy link
Member Author

zcorpan commented May 3, 2022

Does this close #952?

Yes.

What about https://bugzilla.mozilla.org/show_bug.cgi?id=1693172?

Hmm. I thought Firefox exposed window.TouchEvent, since it passes the relevant test in https://wpt.fyi/results/touch-events/idlharness.window.html?label=experimental&label=master&aligned

But running the test locally on macOS desktop Firefox it's not exposed. Maybe it's a difference between Linux and macOS?

In any case, we should indeed make a decision whether window.TouchEvent should exist when "expose legacy touch event APIs" is false.

What's specified now in the touch events spec + this PR matches Chromium, but seemingly not Safari or Firefox.

@zcorpan zcorpan added the do not merge yet Pull request must not be merged per rationale in comment label May 3, 2022
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 16, 2022
…nt'), a=testonly

Automatic update from web-platform-tests
DOM: Test document.createEvent('touchevent')

See whatwg/dom#1071

Co-authored-by: Anne van Kesteren <[email protected]>
--

wpt-commits: 75e0de2aa153aea2e31860cd6ec4628b7b673011
wpt-pr: 33605
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request May 25, 2022
…nt'), a=testonly

Automatic update from web-platform-tests
DOM: Test document.createEvent('touchevent')

See whatwg/dom#1071

Co-authored-by: Anne van Kesteren <[email protected]>
--

wpt-commits: 75e0de2aa153aea2e31860cd6ec4628b7b673011
wpt-pr: 33605
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge yet Pull request must not be merged per rationale in comment
Development

Successfully merging this pull request may close these issues.

document.createEvent() should maybe not be conditional upon exposure
2 participants