Bug 165331

Summary: Make a public facing page to check for WebKit features
Product: WebKit Reporter: Dean Jackson <dino>
Component: New BugsAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch graouts: review+

Dean Jackson
Reported 2016-12-02 13:44:58 PST
Make a public facing page to check for WebKit features
Attachments
Patch (6.36 KB, patch)
2016-12-02 13:51 PST, Dean Jackson
graouts: review+
Radar WebKit Bug Importer
Comment 1 2016-12-02 13:49:59 PST
Dean Jackson
Comment 2 2016-12-02 13:51:18 PST
Antoine Quint
Comment 3 2016-12-02 14:24:47 PST
Comment on attachment 295990 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295990&action=review > Websites/webkit.org/experimental-features.html:79 > + return canvas.getContext("webgl2"); Either make this a one-liner or use `const`. > Websites/webkit.org/experimental-features.html:111 > + Array.from(document.querySelectorAll(".test")).forEach(element => { you can just use `for … of` to iterate these items. > Websites/webkit.org/experimental-features.html:114 > + element.classList.add(testFunction() ? "enabled" : "disabled"); If you used a single class, and assume the absence of it is the inverse, then you could just do `element.classList.toggle("enabled", testFunction())`.
Dean Jackson
Comment 4 2016-12-02 16:32:22 PST
Comment on attachment 295990 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295990&action=review >> Websites/webkit.org/experimental-features.html:79 >> + return canvas.getContext("webgl2"); > > Either make this a one-liner or use `const`. ok >> Websites/webkit.org/experimental-features.html:111 >> + Array.from(document.querySelectorAll(".test")).forEach(element => { > > you can just use `for … of` to iterate these items. cool >> Websites/webkit.org/experimental-features.html:114 >> + element.classList.add(testFunction() ? "enabled" : "disabled"); > > If you used a single class, and assume the absence of it is the inverse, then you could just do `element.classList.toggle("enabled", testFunction())`. There are three states: enabled, disabled and unknown.
Dean Jackson
Comment 5 2016-12-02 17:21:20 PST
Note You need to log in before you can comment on or make changes to this bug.