-
Notifications
You must be signed in to change notification settings - Fork 2k
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
createElement-wrapped <img> throws TypeError on <canvas> drawImage #316
Comments
ShadowDOM polyfill produces virtualized nodes from JavaScript apis, so that your programming interface is to the 'enhanced' tree. The upshot of this is that your
Try doing this instead: |
I'm experiencing the same problem when loading image textures with three.js library (both canvas2d and webgl context). It returns type error on |
Same issue here with three.js + polymer as well : |
Looks like googlearchive/ShadowDOM#274 should wrap 2d and 3d canvas operations. |
@azakus @arv I tried building the latest polymer to confirm this was fixed but now I can't create WebGL renderer (three.js) from within the shadow dom. http://arodic.github.com/temp/polymer-bug/webgl-bug.html
|
It looks like the latest release (0.0.20131025) shipped with this bug so three.js renderer does not work with polymer elements anymore: |
https://github.com/Polymer/ShadowDOM/issues/283 On Mon, Oct 28, 2013 at 1:12 AM, arodic notifications@github.com wrote:
erik |
It appears that some canvas2D calls are still missing from polymer-wrapped canvas: context.font(), context.fillStyle() and possibly others... http://jsfiddle.net/xWRgY/5/ |
On Mon, Nov 4, 2013 at 7:46 PM, arodic notifications@github.com wrote:
erik |
Fixed |
I'm trying to draw an image I created with document.createElement('img') to a canvas, but Polymer is getting in the way. Polymer's createElement wrapper causes a typeError on drawImage.
Here's a jsfiddle. When I remove the Polymer import the problem goes away:
http://jsfiddle.net/LbZES/
The text was updated successfully, but these errors were encountered: