33 ms·
Isn't it strange that searching for `unobtrusive' in Google yields "Unobtrusive Javascript" as the first result? Is Javascript the new Lisp? :) http://www.goog
by ludwigvan 15y ago
Isn't it strange that searching for `unobtrusive' in Google yields "Unobtrusive Javascript" as the first result? Is Javascript the new Lisp? :)
http://www.google.com/search?q=unobtrusive http://www.google.com/search?q=unobtrusive
PS: It was rather a tongue in cheek comment, implicating the Lispy roots of Javascript, and the increasing popularity of it among programmers.
I would bet that interest towards functional programming or Lisps will increase with such movements, and the myth might in that sense be invalid in a near future.
- graywh 15y agoUnrelated. "Unobtrusive Javascript" is about not having JS clutter your HTML.
- deleted 15y ago[deleted]
- RyanMcGreal 15y agoIn the context of javascript, "unobtrusive" means it is designed to degrade peacefully in browsers where javascript is missing or disabled. In this case, the right way to attach an event handler is to assign a class or an id to the HTML element in question and add an event handler to it using an event listener in a separate javascript file, rather than jamming an `onclick="doSomething()"` attribute into the HTML element itself.
- DavidMcLaughlin 15y ago> In the context of javascript, "unobtrusive" means it is designed to degrade peacefully Nitpicking here, but that is actually graceful degradation/progressive enhancement. Unobtrusive JavaScript is about writing JavaScript code that plays well with others. The example you gave of not having inline JavaScript in your presentation layer (HTML) is one example. Not writing JS code in the global namespace and avoiding monkey-patching built-in objects are other examples.