-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix: safari 9 HTMLImageElement check #473
fix: safari 9 HTMLImageElement check #473
Conversation
((typeof obj === 'object' && | ||
obj.constructor && | ||
obj.constructor.name === 'HTMLImageElement') || | ||
obj instanceof HTMLImageElement) |
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.
would it be safe/better to do the instanceof
check first?
((typeof obj === 'object' && | ||
obj.constructor && | ||
obj.constructor.name === 'HTMLImageElement') || | ||
(typeof HTMLImageElement !== 'undefined' && |
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.
Hopefully this works if we're rendering in a webworker again - though granted if we're doing offscreen rendering the chances are that we're using Canvas rendering are quite low.
That plus ThreadX being months out from a useable state again, its fine.
No description provided.