ISH-Gruppe / screenario

Screenario - The screen for every scenario
https://screenar.io
GNU General Public License v3.0
2 stars 2 forks source link

Make Stuhlkreis work in Safari #77

Closed liam-k closed 2 years ago

liam-k commented 2 years ago

Just tested it and unfortunately I can reproduce the error. Seems like an issue with an existing polyfill (last error doesn’t happen in firefox)? Unfortunately I have no idea how to debug your Angular Webcomponent, I guess we should take a day to work on this together sometime.

image

liam-k commented 2 years ago

I tried disabling the imports of that polyfills-es2015 file in StuhlkreisWrapper – didn’t help.

What seems to be happening is that \<digitaler-stuhlkreis/> doesn’t get imported at all, it’s just empty.

image

According to stackoverflow, this can happen when a "fetch" function is used somewhere in the script, which isn’t available in Safari. There’s also some other stuff that Safari doesn’t support (like some Regex stuff or invalid CSS, apparently Safari doesn’t handle those well), maybe you can check if it’s anywhere in those polyfills you imported? I think those might be the problem since digitaler-stuhlkreis.de works fine in Safari.

Things we should try:

https://stackoverflow.com/questions/37116068/react-redux-app-renders-blank-screen-on-safari

s-gbz commented 2 years ago

I'm checking if Web Components (which is the specific technique we use to import the Stuhlkreis) is supported by Safari. https://caniuse.com/?search=web%20components

I'll double check by importing a blank Hello World Angular application.

Edit: Good/ Bad news it actually works combining the plain HelloWorld projects in react

image

Edit 2: This is where it get's interesting -> Importing Stuhlkreis works too image

s-gbz commented 2 years ago

LOL @liam-k I changed the import order -> boom, problem solved. Not getting too deep into this now, but I guess this has something todo with Safari's

NotSupportedError: Cannot define multiple custom elements with the same tag name