4 ms·
Isn't "essential unobtrusive javascript" an oxymoron? Unobtrusive Javascript is by definition stuff where your site is still OK without it?
by nod 17y ago
Isn't "essential unobtrusive javascript" an oxymoron? Unobtrusive Javascript is by definition stuff where your site is still OK without it?
- mdg 17y agoI always thought unobtrusive javascript refers to how it is written. For example, using the inline onClick attribute would be considered obtrusive, because it is in the HTML. On the other hand, unobtrusive javascript would assign a function to some control when the window loads, effectively making the HTML pure.
- _pius 17y agoYou're both right. By separating the Javascript from the HTML, you make it easier for the site to degrade gracefully. (Though you still have to design specifically for graceful degradation if you're serious about it)