WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
239610
[model] How can we query availability of <model> reliably?
https://bugs.webkit.org/show_bug.cgi?id=239610
Summary
[model] How can we query availability of <model> reliably?
Thomas Kumlehn
Reported
2022-04-21 09:59:36 PDT
If the HTML model feature is deactivated, document.createElement("model") neither triggers an exception, nor does it return HTMLUnknownElement like other browsers do. On all Safari platforms. What would be a valid way to use Javascript to query this feature reliably? I assume, the standards conform way should be to return HTMLUnknownElement.
Attachments
Add attachment
proposed patch, testcase, etc.
Antoine Quint
Comment 1
2022-04-22 02:54:18 PDT
I believe this does the trick: function supportsModel () { return "HTMLModelElement" in window; }
Thomas Kumlehn
Comment 2
2022-04-22 03:18:20 PDT
Thank you very much
Radar WebKit Bug Importer
Comment 3
2022-04-28 10:00:18 PDT
<
rdar://problem/92470985
>
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