canvas: Remove probablySupportsContext from the spec.#1459
canvas: Remove probablySupportsContext from the spec.#1459domenic merged 1 commit intowhatwg:masterfrom
Conversation
|
cc @Ms2ger |
|
The rationale from Mozilla seems pretty compelling. Change LGTM too. Going to ask @junov to take a look too, just in case. |
|
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. |
It hasn't been ever implemented by neither Mozilla (see [1]), nor Chromium (see [2]). [1]: https://wiki.mozilla.org/Platform/GFX/CanvasThingsWeDontPlanToSupport [2]: https://bugs.chromium.org/p/chromium/issues/detail?id=251027
7ac2c5f to
c7909c9
Compare
|
IIRC the purpose of this API is mostly in support of WebGL feature detection. |
|
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. |
|
|
|
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. |
|
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. |
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.