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

improvement: support multi window apps when detecting if target is <canvas> element #584

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pie6k
Copy link

@pie6k pie6k commented Mar 9, 2025

It is possible that the app is rendered inside another window via react portals. (https://pietrasiak.com/creating-multi-window-electron-apps-using-react-portals)

If this is the case, it is owned by a different document, so will be instance of otherDocument.defaultView.HTMLCanvasElement instead of simply HTMLCanvasElement.
(defaultView is the window object of the other document)

@trezy trezy added enhancement New feature or request v8 Issues related to Pixi React v8 labels Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v8 Issues related to Pixi React v8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants