CreateJS / EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
http://createjs.com/
MIT License
8.11k stars 1.97k forks source link

remove direct use of HTMLCanvasElement #988

Closed MarvinWilliam closed 5 years ago

MarvinWilliam commented 5 years ago

HTMLCanvasElement is interface of canvas element, it should not be used to create element.

lannymcnie commented 5 years ago

Can you re-submit without the new minified builds? Happy to merge once that's complete.

MarvinWilliam commented 5 years ago

Can you re-submit without the new minified builds? Happy to merge once that's complete.

Ok, I have re-push change.

Abrahamic-God commented 5 years ago

Would love to see this merged and have a new release published to npm! This is currently a blocking issue for me.

lannymcnie commented 5 years ago

Thanks, I can merge this shortly.

lannymcnie commented 5 years ago

Reviewing this: It does change the behaviour.

In the current version, the HTML canvas always overrides the one created using createCanvas(). Basically it creates it if it can (ie, if HTMLCanvasElement exists).

In the PR, it will only do it if the createCanvas returns null.

Not saying its a bad implementation, but its different, so I am just following up with the author on intent.