Skip to content

Comments

canvas: Remove probablySupportsContext from the spec.#1459

Merged
domenic merged 1 commit intowhatwg:masterfrom
emilio:remove-probablysupportscontext
Jun 24, 2016
Merged

canvas: Remove probablySupportsContext from the spec.#1459
domenic merged 1 commit intowhatwg:masterfrom
emilio:remove-probablysupportscontext

Conversation

@emilio
Copy link
Contributor

@emilio emilio commented Jun 23, 2016

It hasn't been ever implemented by neither Mozilla (see 1), nor Chromium (see
2).

Not sure what the status in other browsers is, but two major platforms have already marked it as wontfix.

@emilio
Copy link
Contributor Author

emilio commented Jun 23, 2016

cc @Ms2ger

@annevk
Copy link
Member

annevk commented Jun 23, 2016

The rationale from Mozilla seems pretty compelling. Change LGTM too. Going to ask @junov to take a look too, just in case.

@annevk
Copy link
Member

annevk commented Jun 23, 2016

Oh also, thank you for creating this PR and reporting the problem. Feel free to add your name to the acknowledgments as mentioned by our README.

@emilio emilio force-pushed the remove-probablysupportscontext branch from 7ac2c5f to c7909c9 Compare June 23, 2016 10:13
@zcorpan zcorpan added the removal/deprecation Removing or deprecating a feature label Jun 23, 2016
@junov
Copy link
Member

junov commented Jun 23, 2016

IIRC the purpose of this API is mostly in support of WebGL feature detection.
Pinging @kenrussell for WebGL spec expertise.

@domenic
Copy link
Member

domenic commented Jun 23, 2016

Edge does not support this either. I don't have Safari Tech Preview with me today, but apparently it's in WebKit according to the Chromium bug linked... Or at least supportsContext is in WebKit?

If Chrome is interested in implementing we should keep it, although it sounds like from that bug they are not? It was closed WontFix without justification a while ago.

@annevk
Copy link
Member

annevk commented Jun 23, 2016

var c= document.createElement("canvas");w("supportsContext" in c) -> false in Safari Technology Preview.

@domenic
Copy link
Member

domenic commented Jun 24, 2016

So let's merge this removal, since apparently it's implemented in zero browsers, although I'd still be interested in hearing @kenrussell's thoughts.

@domenic domenic merged commit 2cfb8e3 into whatwg:master Jun 24, 2016
@kenrussell
Copy link
Member

Sorry for not replying before. I think this entrypoint was redundant. It was originally added for feature and fallback detection, for web pages that wanted e.g. both WebGL and 2D Canvas code paths. The fact is though that these web pages can try creating a WebGL context, and if that doesn't work, fall back to creating a 2D context. This technique has been used by many web pages to date and seems to be working fine; the cost of (failed) context creation isn't that high, and the only way to really know whether you'll get a context of a certain type is to try creating it, not to ask whether it's "probably" supported.

@emilio emilio deleted the remove-probablysupportscontext branch June 24, 2016 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

removal/deprecation Removing or deprecating a feature

Development

Successfully merging this pull request may close these issues.

6 participants