-
Notifications
You must be signed in to change notification settings - Fork 48
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
Experiment: Create navigation utility #1294
Experiment: Create navigation utility #1294
Conversation
Note that this demonstrates something Redpop could reasonably just do. My guess is that no one uses |
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.
me likey
API surface musings include:
|
Oh... hm. I wonder what happens when XKit Rewritten gets updated by Firefox with this code running. If I recall correctly, old event listeners in the extension sandbox are killed... but I don't think the shim that we inject here would, so unless it was written very specifically not to do this, there would be two shims, which would fire two custom events, both of which would trigger the handler in the fresh web extension context. |
Add a random string to the event name? I think we still have a good random string generator in |
Co-Authored-By: April Sylph <[email protected]>
This reverts commit 68102ae.
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.
nice
oops I should have renamed that |
Description
This implements a wrapper around window.tumblr.on('navigation') so that XKit Rewritten can subscribe to soft navigation events.
More elegant form of #453.
Potentially useful for simplifying logic where something must happen when a navigation event removes an element from the page (as one can't detect removals with
pageModifications
), but when using both one can't be sure of the order they're fired in and thus must be careful, presumably.Testing steps