quick-lint-js icon indicating copy to clipboard operation
quick-lint-js copied to clipboard

7$: web demo: Show browser-not-supported error if WASM or syntax isn't supported

Open strager opened this issue 3 years ago • 5 comments

https://quick-lint-js.com/demo/

On EdgeHTML 13, this page doesn't load (because of async IIRC).

On browsers not supported wasm, this page doesn't load.

Show a message if the page couldn't be loaded. Otherwise, people will edit text but be confused why nothing happens.

strager avatar Jun 04 '21 08:06 strager

Something which might be useful for it is the wasm-feature-detect library, used on this page: https://webassembly.org/roadmap/ In "Your browser" it dynamically shows which features are supported. At page load, it could be determined which features quicklint js needs, and then the same JavaScript mechanism the website uses, in combination with the wasm-feature-detect library, could show the warning. Note: despite the Firefox column, with Firefox 78.13 on Debian, "Threads and atomics" and "Fixed-width SIMD" is not supported, but Chrome supports it.

Or do just a test call at page load and check the result. But this would require, that all wasm functionality for all possible text inputs is used by this test call.

Frank-Buss avatar Sep 10 '21 14:09 Frank-Buss

@Frank-Buss Thanks for the info. I didn't think to test individual features of WebAssembly.

I wonder if we could tune emscripten compilation to provide fallbacks or to target older WebAssembly versions.

Or do just a test call at page load and check the result.

Good idea. I think this approach makes sense.

strager avatar Sep 10 '21 21:09 strager

I will try to do this

Erik-Daniel avatar Dec 16 '21 06:12 Erik-Daniel

@Erik-Daniel Are you going to work on this task?

strager avatar Jul 26 '22 08:07 strager

@strager I don't think I will be able to, sorry.

Erik-Daniel avatar Jul 26 '22 09:07 Erik-Daniel