-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue loading component via script tag in Firefox when using file URI #2582
Comments
The #2410 fix in src/compiler/output-targets/dist-lazy/generate-system.ts is causing this issue. In Firefox, when using file URI, window.location.origin is null. |
when using a data URI or file URI (stenciljs#2582), or when using iframe's `srcdoc`, the value for window.location.origin can be `null`. In these particular cases, passing `null` to `new URL(url, null)` will throw the following error: Failed to construct 'URL': Invalid base URL
In case of a iframe without |
when using a data URI or file URI (#2582), or when using iframe's `srcdoc`, the value for window.location.origin can be `null`. in these particular cases, passing `null` to `new URL(url, null)` will throw the following error: "Failed to construct 'URL': Invalid base URL"
I'm going to close this issue out. This has been fixed in #2813 and is a part of the 2.17.1 release. If the issue does not appear to be resolved, please feel free to open a new ticket. Thanks! |
Stencil version:
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
When I open the html file that loads the components in Firefox (Ex: file:///Users/test/development/test.html), I get
TypeError: null is not a valid URL.
Expected behavior:
Components loaded successfully.
Steps to reproduce:
Related code:
Other information:
In Firefox, I see the error occurs at window.location.origin in test-stencil.js and it is null.
When using @stencil/[email protected] and below, there is no window.location.origin in test-stencil.js and it works in Firefox
The text was updated successfully, but these errors were encountered: