3 ms·
It would be cool if the javascript were re-written a bit to only use standard long existing javascript features so one didn't have to run a modern corporate bro
by superkuh 7mo ago
It would be cool if the javascript were re-written a bit to only use standard long existing javascript features so one didn't have to run a modern corporate browser to use the "wander" functionality. It did not work in my browser even with JS enabled.
- susam 7mo agoSorry to know it did not work in your browser and thank you for reporting the problem here. If someone is able to reproduce it and share details either here or at <https://codeberg.org/susam/wander/issues https://codeberg.org/susam/wander/issues>, especially which JavaScript features are not working, I would be happy to update the code. I am aware that I have used a number of relatively modern features. For example, I suspect `for ... of` might be one, and perhaps `Element.append()` (instead of `Node.appendChild()`) could also be an issue. Unfortunately, I do not have old browsers to test this reliably, so any help in identifying the exact constructs or functions causing problems would be very appreciated.
- exographicskip 7mo agobrowserstack might be a good option to test a bunch of browsers and their different versions on real devices. Never used it personally, but might get some mileage out of the free plan before their time-based usage expires. https://www.browserstack.com/docs/automate-self-hosted/getting-started/browsers-and-versions#Playwright https://www.browserstack.com/docs/automate-self-hosted/getti...
- susam 7mo agoHello @superkuh, if you happen to revisit this, could you let me know which browser and version you were using? It would help me decide how far back I should support.
- superkuh 7mo agoHi susam thanks for the heads up on IRC. I'm using an ancient firefox fork from ~2015 called Palemoon 26.5. I use it because it's the best available on my computer with the good screen reader and text to speech setup. I am not a javascript developer but my JS console says "SyntaxError: Missing ; before statement" on line 136: let consoles = window.wander.consoles I'd bet it's that 'let' that's emcascript6. I sort of have a polyfill extension for some things from es6 but not all.
- susam 7mo agoThank you. This makes a lot of sense. I need to think it through since 'let' is one of the things about modern JavaScript that I quite like, so I need to decide whether I really want to go back to using 'var' again. To be honest, I resisted adopting ES6 features for quite a long time because I was concerned about exactly this kind of situation, where a modern feature might not work in an older browser that is still in use. However, in 2022, prompted by ESLint's no-var rule [1], I began using ES6 features in my code [2]. Now I find myself wondering whether my earlier, more conservative approach to JavaScript might have been the better approach. In any case, thank you very much for following up on this thread. It has given me something to think about. [1] https://eslint.org/docs/latest/rules/no-var https://eslint.org/docs/latest/rules/no-var [2] https://codeberg.org/susam/texme/commit/8e31dbf https://codeberg.org/susam/texme/commit/8e31dbf