
noreply at github
Mar 19, 2010, 3:35 PM
Post #1 of 1
(391 views)
Permalink
|
|
[bricoleurs/bricolage] 3b86f7: Replace `getElementsByClassName()` with `select()`...
|
|
Branch: refs/heads/master Home: http://github.com/bricoleurs/bricolage Commit: 3b86f7b068fe40012df853460a67485dc679440f http://github.com/bricoleurs/bricolage/commit/3b86f7b068fe40012df853460a67485dc679440f Author: David E. Wheeler <david [at] justatheory> Date: 2010-03-19 (Fri, 19 Mar 2010) Changed paths: M comp/media/js/lib.js M comp/widgets/media_prof/edit_meta.html M comp/widgets/story_prof/edit_meta.html M lib/Bric/Changes.pod Log Message: ----------- Replace `getElementsByClassName()` with `select()`. Adrian Yee pointed out that `getElementsByClassName()` will find all elements with that class in the entire document, whereas calling Prototype's `select()` with a class name selector on a single element will find only elements with that class name under the element. This is more efficient, and much more likely to be correct.
|