Skip to content

Add cross window support#647

Open
EliasWatson wants to merge 2 commits intopixijs:mainfrom
EliasWatson:646-cross-window-support
Open

Add cross window support#647
EliasWatson wants to merge 2 commits intopixijs:mainfrom
EliasWatson:646-cross-window-support

Conversation

@EliasWatson
Copy link
Copy Markdown

Resolves #646

I added an e2e test that fails before the fix was made and passes after the fix. I have also tested this in my enterprise app and confirmed pop-out windows work.

#621 was a lot messier of a fix because I thought that we needed to handle all instanceof checks, even for internal classes. But that's not the case. When using a React portal to render into another window, all the code runs in the main window, so instanceof works fine. The issue arises when you get an HTML element or event from the other window. Those objects were created in the other window so comparing them to classes in the main window will fail.

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.

Support cross-window rendering (container in different window context)

1 participant