Live data from Hacker News

You might not need JavaScript

youmightnotneedjs.com

31–40 of 254 posts

Re: You might not need JavaScript

#31
post #25
post #11

Since half the examples do not work on Safari, I believe the title is a bit misleading.

Safari is the new IE6, stop supporting it and let it die. It will not get any better anyway. If most of your users are on iOS, then make an app for them, it's what Apple also want you to do...

I switched from Chrome to Safari 5 months ago. The memory usage in Safari is far more superior than Chrome / Firefox on OS X. Also the CPU usage is relatively low, which means more time on battery for me.

I still use Chrome for development, though.

Safari, is not as bad as IE6 was and anyway no professional front-end developer would make a website that is not working properly on iOS Safari, so it's kinda obvious it will stay supported for a long, long time.

So I would consider what the OP is doing with the CSS, something that might also work on Safari, but with some polyfills.

Re: You might not need JavaScript

#32
post #25
post #11

Since half the examples do not work on Safari, I believe the title is a bit misleading.

Safari is the new IE6, stop supporting it and let it die. It will not get any better anyway. If most of your users are on iOS, then make an app for them, it's what Apple also want you to do...

Oh please. Safari 10 (both desktop & iOS versions) is the only browser with 100% ES6 compatibility. All browsers have some issues (e.g. Chrome still does not support 'sticky' position, Safari hasn't implemented Service Workers, etc), that's part of the multi-vendor / open-standard game.

http://kangax.github.io/compat-table/es6/

Re: You might not need JavaScript

#34
post #25
post #11

Since half the examples do not work on Safari, I believe the title is a bit misleading.

Safari is the new IE6, stop supporting it and let it die. It will not get any better anyway. If most of your users are on iOS, then make an app for them, it's what Apple also want you to do...

I have no idea why people use Chrome.

Chrome/Google has terrible/no support of many browser layout & interaction features, such as CSS Regions & scroll snap points.

Also, Safari is just a much better browser than Chrome. We need to make sure people stop using Chrome and move to the default browser in their environment - Safari & Edge.

If you support the default browser, then you're going to be fine.

Re: You might not need JavaScript

#35

Does anyone else feel that a site called "You Might Not Need Javascript", probably shouldn't use Javascript?

Do any of the examples use Javascript? Or are you saying the site shouldn't use JS for syntax highlighting or whatever, even though that's not the sort of thing it claims JS isn't needed for?

Re: You might not need JavaScript

#37
post #32
post #25

Earlier quoted context omitted.

Safari is the new IE6, stop supporting it and let it die. It will not get any better anyway. If most of your users are on iOS, then make an app for them, it's what Apple also want you to do...

Oh please. Safari 10 (both desktop & iOS versions) is the only browser with 100% ES6 compatibility. All browsers have some issues (e.g. Chrome still does not support 'sticky' position, Safari hasn't implemented Service Workers, etc), that's part of the multi-vendor / open-standard game. http://kangax.github.io/compat-table/es6/

Safari does have longer release cycle than e.g. Chrome, because Apple provides very uniform / polished support for wide range of devices (Macs, iOS devices, including very old ones such as iPhone 4S).

Re: You might not need JavaScript

#38
post #25
post #11

Since half the examples do not work on Safari, I believe the title is a bit misleading.

Safari is the new IE6, stop supporting it and let it die. It will not get any better anyway. If most of your users are on iOS, then make an app for them, it's what Apple also want you to do...

>Safari is the new IE6, stop supporting it and let it die.

Not sure what old wives tales you have heard, but actually Safari was the first browser to 100% support ES6.

And compared to Chrome, it uses 1/3 less battery...

Re: You might not need JavaScript

#39
I'm cautious about using CSS to do things that feel like actual behaviours.

For example, the modal that appears when you click on the button actually doesn't do things on "clicking" but focusing. This means if you tab over the button it'll load the modal, then tabbing away means the modal is gone. I can't tab into the content in the modal at all. How does that work with accessibility?

Though I generally dislike the idea of saying content isn't there by making it present in the document but invisible.

Edit - Some of the default behaviours are also a bit pants. In chrome, the form validation on a pattern starts working after I hit submit, then angrily shakes at me for every keypress until it's valid. Then, it ignores invalid input as I type more! Please never use this for phone numbers or credit card numbers. Stop requiring an exact format when what people type varies, and stop telling me I'm putting in something wrong when you ask for a phone number and I give you something that'll connect to me if you type into a phone.

Maxlength is not a validation it's just ignores any more letters you type. Quietly ignoring your users input is probably not what you want.

The "Would you prefer a banana or a cherry?" just shouts "Please match the requested format" if I type "a cherry". I know chrome has nothing else to go on other than "the regex wasn't matched" but it's a bad end user experience.

The tabs example is something I need to tab onto then use left and right, I assume because it's a radio box underneath, not a series of links. Are tabs really radio buttons?

The same for the accordion. Which I've found if I add any tabbable content inside them then I'm focused on a hidden item. Great. Tab onto "tab 1", hit tab, focus has disappeared and I'm now potentially going to click on random items I can't see. This is because although you want to pretend the content isn't there just because it's not visible, it's still there! It's in your document.

Sure, you might not need javascript. But maybe you should still use it.

Post reply on HN