-
Notifications
You must be signed in to change notification settings - Fork 286
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
correctly load scripts in chrome & firefox #2501
Conversation
@@ -3,6 +3,7 @@ | |||
// TODO: make this conditional, only do it when requested. | |||
// only inject boot script when on an HTML page | |||
if (document.contentType === 'text/html') { | |||
window.EmberENV = { _DEBUG_RENDER_TREE: true }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't we want to check for existence of window.EmberENV
here too instead of setting it to our own object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed here. This really absolutely runs before anything else
@@ -273,19 +273,31 @@ module.exports = function (defaults) { | |||
|
|||
replacementPattern = replacementPattern.concat(emberInspectorVersionPattern); | |||
|
|||
const firefoxBackgroundServiceReplacement = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for? Firefox should support manifest v3, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't... Not all of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is available since manifest v3, but ignored in firefox, use wrappedJSObject for firefox https://developer.chrome.com/docs/extensions/reference/scripting/#type-ExecutionWorld
@RobbieTheWagner i found a better way for firefox |
this does not work for firefox
Also has warnings about permissions
but firefox keeps the order right for script loading
it needs to run before everything else so that ember gets the debug config. If the property is set later, component tree will not work.
this issue only happens on page refresh, then browser uses cached data and immediately runs the scripts, without waiting for the new script that have been added by extensions. this does not happen in firefox, only chrome.
https://bugs.chromium.org/p/chromium/issues/detail?id=634381
fixes #2500