Closed bingeling closed 3 years ago
Hi,
thanks for reporting this. Could you please try to reproduce this with the latest version? And add some code/test case to show how to trigger it? Please forgive us for taking this long to respond.
I have since switched jobs and no longer have access to the code base. I'll pass it on to the company, but can't promise that they'll get back to you.
Thanks for the update @bingeling !
General information
embetty
version: v1.0.6Steps to reproduce the behaviour
Create a build of embetty and add it to a web project (in this case a Ruby on Rails project, but should be irrelevant) that is running unrelated JavaScript code which makes use of Promises.
Expected behaviour
Embetty should stay in its lane. No error should occur.
Actual behaviour
Embetty tries to resolve Promises from unrelated parts of the codebase, then throws an error because it doesn't know what to do with the result of the Promise. Happens only in browsers listed above.
One example from our image lazy loading logic is:
As far as we have been able to debug this issue, this is caused by the shadydom code that is bundled with embetty as part of the webcomponents polyfill. And so this issue only occurs in browsers that don't natively support Shadow DOM.
We can't determine why it would do that or how it does that. We can't even determine which part of the code does it, since all embetty dependencies are transpiled/minified, even when we debugged the issue with a not-transpiled/not-minified test-build of embetty. We just saw that the error occurred in the webcomponent polyfill part of the code.