Skip to content
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

Capture globals generically #719

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

jonathanKingston
Copy link
Collaborator

@jonathanKingston jonathanKingston commented Sep 5, 2023

See: https://app.asana.com/0/72649045549333/1204999114961040/f

Also resolves the core issue of: https://app.asana.com/0/892838074342800/1205340475534185/f

  • To test this part you have to revert the fix @sammacbeth made and do the testing steps there including using a VPN.

Copy link
Collaborator

@shakyShane shakyShane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathanKingston I know we've been over this problem a few times and this implementation looks fine from a code POV.

The only reason I didn't give an explicit approval is based on not knowing the scope of testing before merging? For instance, is this something you intend to test cross-platform before we merge, or did you want to cut a release and test as each platforms updates?

I don't have any preferences here, just curious what the plan is there (if you have one yet :))

@@ -89,7 +89,7 @@ function injectFeatures (args) {
${codeFeatures.join('\n')}
})();`
script.src = 'data:text/javascript;base64,' + btoa(code)
getInjectionElement().appendChild(script)
getInjectionElement()?.appendChild(script)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this just noticed during testing and fixed on the fly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the method signature to return null also.

The reason this was added is the utils.js is used within the extension testing which doesn't have a DOM, so the code falls back to just using the existing global (under a different alias so still some slight improvements).

@jonathanKingston
Copy link
Collaborator Author

The only reason I didn't give an explicit approval is based on not knowing the scope of testing before merging? For instance, is this something you intend to test cross-platform before we merge, or did you want to cut a release and test as each platforms updates?

There's been a fair amount of testing on each platform locally, some changes have happened since though so happy to just verify as we roll out.
I don't think there's significant risk on other platforms other than Firefox, which I've just retested and spotted issues again :/

@jonathanKingston
Copy link
Collaborator Author

Marking as on draft as on hold right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants