patternlab-node icon indicating copy to clipboard operation
patternlab-node copied to clipboard

Syntax Error Script5022 on Edge 18

Open OktarinTentakel opened this issue 4 years ago • 3 comments

Using my local installation of Patternlab Node with Uikit Workshop as well as your own example

https://patternlab-handlebars-preview.netlify.com/

Edge throws SCRIPT0522: SCRIPT0522: Syntax error on the first template line.

As far as I can see this error only appears on Edge and Pattern Lab stays functional, but nonetheless, it would be nice to get to the bottom of this and have a clean console again.

I did some research into this, but did not come up with any findings yet.

OktarinTentakel avatar Feb 11 '20 09:02 OktarinTentakel

Seems like this could be postMessage related when using a wrong/too modern origin:

https://stackoverflow.com/questions/52878769/script5022-syntax-error-in-microsoft-edge-during-postmessage

OktarinTentakel avatar Feb 11 '20 09:02 OktarinTentakel

I could have reproduced the error on console, but window.origin is actually defined, so it might be a little bit more complex.

On the other hand, with the switch to Chromium rendering engine the error disappeared in newer MS Edge versions.

mfranzke avatar Jun 18 '20 21:06 mfranzke

@mfranzke The idea with origin was just a first thought. Since the error never occurred on Chrome it's no surprise that the new Edge does not do this, but the old one will stay relevant for maybe another year in corporate environments as a default browser and thereby also as a viewing browser for PL.

If this error truly does not break anything, hooray (if still ugly). If this breaks something because JS might not get fully executed this might still be worth looking into.

OktarinTentakel avatar Jun 19 '20 07:06 OktarinTentakel