WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
238369
navigator.share does not trigger TypeError even if the url is invalid.
https://bugs.webkit.org/show_bug.cgi?id=238369
Summary
navigator.share does not trigger TypeError even if the url is invalid.
Takao Baba
Reported
2022-03-25 04:02:15 PDT
# Steps to reproduce: 1. Open
https://jsbin.com/yevuhebadu/edit?html,js,output
2. Click "share" button # Expected behavior: "TypeError: Failed to execute 'share' on 'Navigator': Invalid URL" should be shown. As the spec described in here (
https://w3c.github.io/web-share/#share-method
https://w3c.github.io/web-share/#dfn-validate-share-data
), if the "url" is present and it is invalid, "validate share data" must return false. Thus, "share()" should return a promise rejected with a TypeError. # Actual behavior: Sharing succeeded with text "foo". The invalid URL was just ignored. # Note Chrome 99 works correctly (returns TypeError). I've confirmed this issue on Safari (15.4 on mac and 14.7 on iPad).
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-03-28 06:40:47 PDT
<
rdar://problem/90919392
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug