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

Default global Page event bindings prevent other Page instances events from working correctly #508

Closed
kaisermann opened this issue Oct 1, 2018 · 0 comments
Labels
bug page.create() Using the page.create() API

Comments

@kaisermann
Copy link
Contributor

kaisermann commented Oct 1, 2018

If you try to create a instance with the createPage method instead of using the global page instance, since the this.configure runs at the new Page() step AND at the page.start, you end up with two event handlers running at the same time.

Also, the options object passed onto createPage is currently not used

Edit:

My bad, the bindings are not duplicated. The problem is that the default globalPage bindings aren't working well with another instance of page, even if you don't use it.

The current workaround to this is to call globalPage.start() and then globalPage.stop() which removes the listeners.

Edit 2:

A simple globalPage.stop() won't work because it checks for this._running which is set only inside .start()

@kaisermann kaisermann changed the title Duplicated bindings when using createPage Default global Page event bindings prevent other page instances from working correctly Oct 2, 2018
@kaisermann kaisermann changed the title Default global Page event bindings prevent other page instances from working correctly Default global Page event bindings prevent other page instances events from working correctly Oct 2, 2018
@kaisermann kaisermann changed the title Default global Page event bindings prevent other page instances events from working correctly Default global Page event bindings prevent other Page instances events from working correctly Oct 2, 2018
@matthewp matthewp added the page.create() Using the page.create() API label Oct 2, 2018
@matthewp matthewp added the bug label Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug page.create() Using the page.create() API
Projects
None yet
Development

No branches or pull requests

2 participants