What web component features are not supported by Safari desktop and Safari iOS?
Asked Answered
S

3

7

Most references as below mention that Safari partially supports web components.

In detail, what web component features are not supported by Safari desktop and Safari iOS?

Is there a technical docs or specs about the issue?

https://developer.mozilla.org/en-US/docs/Web/Web_Components

https://caniuse.com/shadowdomv1

Shoshonean answered 2/5, 2022 at 17:19 Comment(0)
L
15

Burn all old blogs!

Apple Safari supports Web Components, apart from Customized Built-In Elements.

After an ongoing debate since 2013, nearly everyone, who understand what OOP means, agrees Apple engineers are right on this one, not supporting Customized Built-In Elements

NOT SUPPORTED in Safari:

Customized Built-In Elements
extend from any existing HTML Element: <p>, <input>, etc..

customElements.define( "my-element", HTMLParagraphElement, { extends: "p" } );

If you want to understand the Apple Why,
read back in time to early December 2013 - Yes! Web Components are not a new fad!


Yes it would be cool to write <img is="queen-of-hearts"> (generating an IMG)

Autonomous Elements (extend from HTMLElement)
work 100% in all Modern Browsers

customElements.define( "playing-card", extends HTMLElement{ } );

SUPPORTED in Safari:

We now have to do <playing-card is="queen-of-hearts">

  • which generates a <img> tag inside of it.
  • Or replaces the <playing-card> with an <img>

. . .

Deep dive into Web Components, React & Lit like BaseClasses:
Main differences between lit-element Web Components & React

Legged answered 2/5, 2022 at 18:10 Comment(0)
W
0

Javascript regexp variable length lookbehind is not supported by Safari but works in Chrome, Edge and Firefox. Maybe international agreements/standards say Safari doesn't need to support it (yet) but it's a pain nonetheless.

Worldlywise answered 21/6, 2022 at 12:31 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Papa
C
0

The forum post (see below) on the Apple Developer website has both requests to support customized built-in elements and formAssociated custom elements.

https://developer.apple.com/forums/thread/682165

It could be used to follow up onto when Apple will release support for those features on Safari.

Companionway answered 7/12, 2022 at 11:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.