Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Along these lines, one pattern is to build a widget or page that renders in straight html and has links to take you to pages to perform actions. If javascript exists, scoop up the html and introspect it to build your rich widget. If the javascript never loads, you have a working page.

This, I believe is a good use of custom data attributes. When your JS introspects the html, it can use data here for configuration and setting values. It's messy and often impossible to use the same values you output to html in your javascript models. (For instance you might have a Number with arbitrary percision on your model, but only spit it onto the page with decimal points.)

But, yeah sure. It's a some extra work and planning we don't always have time for.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: