[whatwg] new constructor method for Path2D

Ian Hickson ian at hixie.ch
Wed Mar 5 14:34:57 PST 2014

On Wed, 5 Mar 2014, Rik Cabanier wrote:
> To work around this, we could add a couple of constructor methods to the 
> 2D context:
> Path2D createPath();
> Creates a new empty Path object [...]

This used to be how many Web APIs worked, but over the years we've 
received enormous volumes of feedback to the effect that constructor-based 
APIs are way better than factory-based APIs. Is there no way we could at 
least have all the canvases within a Document in Firefox use the same 
backend? It would be really unfortunate to have to use factories here to 
get around an implementation detail in one browser.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list