[dojo-contributors] src/html.js of revision 4507

Bryan Forbes bryan at reigndropsfall.net
Wed Jun 28 15:05:06 EDT 2006

	The only problem with not having trim at the end of getClass is that on
some browsers (not sure which off the top of my head) go haywire if you
have trailing whitespace at the end of a class attribute.

On Tue, 2006-06-27 at 00:43 +0400, Ilia Kantor wrote:
> To put things short, that's for speedup.
> I changed class-handling functions to use regular expressions instead of
> explode/join, because profiling showed that Tree creation was very slow
> because of them.
> dojo.html.getClass is still widely used, but dojo.html.getClasses is not any
> more. I removed trim from dojo.html.getClass because it is not needed there.
> Although getClasses should return array w/o empty elements, so trim is used
> there now.
> Hope that explains..
> -----Original Message-----
> From: dojo-contributors-bounces at dojotoolkit.org
> [mailto:dojo-contributors-bounces at dojotoolkit.org] On Behalf Of Bryan Forbes
> Sent: Monday, June 26, 2006 9:15 PM
> To: dojo dev.
> Subject: [dojo-contributors] src/html.js of revision 4507
> 	With this check-in, dojo.html.getClass has had dojo.string.trim
> removed
> from the return statement and moved to dojo.html.getClasses.  I don't
> understand why this happened.  I understand the rest of the code changes
> in html.js for speed-ups, but was the trim removed for a speed-up?  Does
> this break existing code?
Bryan Forbes
bryan at reigndropsfall.net

"It does not take a majority to prevail, but rather an irate, tireless
minority keen to set brush fires in people's minds."
        - Samuel Adams, an architect of the Constitution

Key fingerprint = 3D7D B728 713A BB7B B8B1  5B61 3888 17E0 70CA 0F3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20060628/e4dd4747/attachment.sig 

More information about the dojo-contributors mailing list