Bug 239610
Summary: | [model] How can we query availability of <model> reliably? | ||
---|---|---|---|
Product: | WebKit | Reporter: | Thomas Kumlehn <pixelpartner> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Enhancement | CC: | dino, graouts, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari Technology Preview | ||
Hardware: | Mac (Apple Silicon) | ||
OS: | macOS 12 |
Thomas Kumlehn
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
I believe this does the trick:
function supportsModel () {
return "HTMLModelElement" in window;
}
Thomas Kumlehn
Thank you very much
Radar WebKit Bug Importer
<rdar://problem/92470985>