prototype/src/dom.js

30 lines
918 B
JavaScript
Raw Normal View History

2009-03-05 19:56:01 +00:00
/**
* == DOM ==
* Extensions to DOM elements, plus other utilities for DOM traversal
* and modification.
*
2009-03-07 21:44:12 +00:00
* Prototype's DOM extensions represent a large portion of where you'll spend
* your time. Prototype adds many convenience methods to elements returned by
* the [[$]] function. For instance, you can write
*
2009-03-07 21:44:12 +00:00
* $('comments').addClassName('active').show();
*
2009-03-07 21:44:12 +00:00
* to get the element with the ID of `comments`, add a class name to it, and
* show it (if it was previously hidden).
*
2009-03-07 21:44:12 +00:00
* In other words, Prototype adds "instance" methods to DOM nodes. This is
* made possible by direct extension of the backing DOM objects (in browsers
* that support it) and by manual extension of individual nodes (in browsers
* that do not).
*
2009-03-05 19:56:01 +00:00
**/
2009-01-27 21:42:32 +00:00
//= require "dom/dom"
//= require "dom/sizzle_adapter"
2009-01-27 21:42:32 +00:00
//= require "dom/selector"
//= require "dom/form"
//= require "dom/event"
Element.addMethods();