List Info

Thread: OK. I'm confused again.




OK. I'm confused again.
user name
2006-08-14 21:29:49
It looks to me like it creates a new element of that
classname.  Oh,
off-topic a little bit, if you guys are interested, a friend
of mine made
some tweaks to prototype, check out www.beauscott.com for
info.

--Will

-----Original Message-----
From: rails-spinoffs-bounceslists.rubyonrails.org
[mailto:rails-spinoffs-bounceslists.rubyonrails.org] On
Behalf Of Sam
Sent: Monday, August 14, 2006 10:55 AM
To: rails-spinoffslists.rubyonrails.org
Subject: [Rails-spinoffs] OK. I'm confused again.


Prototype.js can be humbling.  Just when I think I've got a
handle on how to
read inside-out, I find something I've never seen before
and can't get my
head around.

I am chasing down a bug in my code which uses
Element.classNames, so I
wandered off in prototype.js to see how classNames worked.

Contest: Explain clearly, with the fewest possible words,
how this function
works:


Element.Methods = {

// other methods appear here

  classNames: function(element) {
    return new Element.ClassNames(element);
  },





_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffslists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-
spinoffs

-- 
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.7/410 - Release
Date: 8/5/2006
 

-- 
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.7/410 - Release
Date: 8/5/2006
 

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffslists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-
spinoffs
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )