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

Error at instanceof SVGElement in WebLayer3D #23012

Open
blairmacintyre opened this issue Mar 10, 2019 · 9 comments
Open

Error at instanceof SVGElement in WebLayer3D #23012

blairmacintyre opened this issue Mar 10, 2019 · 9 comments
Labels

Comments

@blairmacintyre
Copy link

@blairmacintyre blairmacintyre commented Mar 10, 2019

While trying to run the demo at https://argonjs.github.io/three-web-layer/ on servo for mac, I got a bunch of these errors:

ERROR 2019-03-10T19:42:56Z: script::dom::bindings::error: Error at https://argonjs.github.io/three-web-layer/app.c61986b1.js:5:4695 invalid 'instanceof' operand d(...).SVGElement

@asajeffrey suggested I post an issue.

@jdm
Copy link
Member

@jdm jdm commented Mar 10, 2019

This is caused by us not implementing the SVGElement DOM interface (since we have no SVG support), so any code using instanceof SVGElement fails.

@jdm jdm added the A-content/dom label Mar 10, 2019
@CYBAI CYBAI changed the title instanceof error in page Error at instanceof SVGElement in WebLayer3D Mar 11, 2019
@blairmacintyre
Copy link
Author

@blairmacintyre blairmacintyre commented Mar 11, 2019

Right, thanks. I think this is something deep in the HTML2Canvas package (turns out its in a ResizeObserver polyfill, will keep investigating), which is checking if there's SVG Elements so it can handle them (even if there aren't SVG elements).

Not sure what to do about this.

@blairmacintyre
Copy link
Author

@blairmacintyre blairmacintyre commented Mar 11, 2019

Ok, for fun, we added

window.SVGElement = class {}
window.SVGSVGElement = class {}

to the app, which stopped these crashes, but now html2canvas is throwing errors because canvas2d.fillText isn't implemented.

Related to issue #11681

@jdm
Copy link
Member

@jdm jdm commented Aug 21, 2019

@blairmacintyre That link no longer exists; is there a better one to use?

@blairmacintyre
Copy link
Author

@blairmacintyre blairmacintyre commented Aug 21, 2019

https://www.aelatgt.org/three-web-layer/# Moved to more appropriate org

@blairmacintyre
Copy link
Author

@blairmacintyre blairmacintyre commented Sep 20, 2019

@jdm wondered if this has an update. FWIW, the current version of servo (downloaded just now from nightly builds on the mac) gives both the SVGElement error and
canvas::canvas_data] Unimplemented canvas2d.fillText. Values received: 1 MS (1-150), 6, 4, None. errors

@jdm
Copy link
Member

@jdm jdm commented Sep 20, 2019

No update yet - there's a student just starting to work on some basic SVG support which may help eventually.

@blairmacintyre
Copy link
Author

@blairmacintyre blairmacintyre commented Sep 20, 2019

Is the fillText related? We could remove SVGs from this example I think ...

@jdm
Copy link
Member

@jdm jdm commented Sep 20, 2019

As far as I know, fillText just causes a warning to appear in the terminal but shouldn't interrupt JS execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.