Make a public facing page to check for WebKit features
<rdar://problem/29488535>
Created attachment 295990 [details] Patch
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())`.
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.
Committed r209287: <http://trac.webkit.org/changeset/209287>