<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-16263</id>
	<title>Nabble - MochiKit</title>
	<updated>2009-11-28T14:18:38Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/MochiKit-f16263.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MochiKit-f16263.html" />
	<subtitle type="html">Discussions related to development of and with the MochiKit JavaScript library.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26557445</id>
	<title>JSON.parse &amp; MochiKit.Base.evalJSON</title>
	<published>2009-11-28T14:18:38Z</published>
	<updated>2009-11-28T14:18:38Z</updated>
	<author>
		<name>Per Cederberg-2</name>
	</author>
	<content type="html">I just tried to modify MochiKit.Base.evalJSON() to use the new
&lt;br&gt;JSON.parse() function when available. This would give us the following
&lt;br&gt;advantages:
&lt;br&gt;&lt;br&gt;1. Speed (but, well... eval() is probably fast enough already)
&lt;br&gt;2. Security
&lt;br&gt;&lt;br&gt;Unfortunately we would also get a nasty regression issue due to the
&lt;br&gt;stricter syntax enforcement in JSON.parse() vs. eval(). It seems that
&lt;br&gt;at least the Firefox parser doesn't accept constructs like these:
&lt;br&gt;&lt;br&gt;&amp;nbsp; { a: 1 }
&lt;br&gt;&lt;br&gt;since the correct JSON syntax would be:
&lt;br&gt;&lt;br&gt;&amp;nbsp; { &amp;quot;a&amp;quot;: 1 }
&lt;br&gt;&lt;br&gt;Hmm... So what to do? Just skip this altogether? And add a note in the
&lt;br&gt;docs that people should use JSON.parse() themselves if worried about
&lt;br&gt;security or speed?
&lt;br&gt;&lt;br&gt;Any thoughts are welcome.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;/Per
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26557445&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26557445&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/JSON.parse---MochiKit.Base.evalJSON-tp26557445p26557445.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26224523</id>
	<title>Google Closure includes MochiKit</title>
	<published>2009-11-05T15:54:32Z</published>
	<updated>2009-11-05T15:54:32Z</updated>
	<author>
		<name>Fredrik-23</name>
	</author>
	<content type="html">&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;Google recently announced their core javascript library - Closure.
&lt;br&gt;&lt;a href=&quot;http://code.google.com/closure/library/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/closure/library/&lt;/a&gt;&lt;br&gt;&lt;br&gt;When browsing the code I noticed it uses parts of MochiKit:
&lt;br&gt;&lt;a href=&quot;http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/dom/dom.js&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/dom/dom.js&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://code.google.com/p/closure-library/source/browse/#svn/trunk/third_party/closure/goog/mochikit/async&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/closure-library/source/browse/#svn/trunk/third_party/closure/goog/mochikit/async&lt;/a&gt;&lt;br&gt;There's also very similar bind, partial, array utils, an iter module
&lt;br&gt;etc.
&lt;br&gt;&lt;br&gt;Overall the style is similar, i.e functional, Python.
&lt;br&gt;Apparently they've got good taste in Mountain View :)
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;// Fredrik Blomqvist
&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224523&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26224523&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Google-Closure-includes-MochiKit-tp26224523p26224523.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26222752</id>
	<title>Re: MochiKit.DOM.getElementsByTagAndClassName performance</title>
	<published>2009-11-05T13:42:41Z</published>
	<updated>2009-11-05T13:42:41Z</updated>
	<author>
		<name>Alex Russell</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;On Nov 5, 2009, at 1:32 AM, Fredrik wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I created a getElementsByClassName based on this code:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://robertnyman.com/2008/05/27/the-ultimate-getelementsbyclassname-anno-2008/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://robertnyman.com/2008/05/27/the-ultimate-getelementsbyclassname-anno-2008/&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://code.google.com/p/getelementsbyclassname/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/getelementsbyclassname/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Pending a full selector integration something like this should be an
&lt;br&gt;&amp;gt; easy drop-in
&lt;br&gt;&amp;gt; solution to optimize getElementsByTagAndClassName.
&lt;br&gt;&amp;gt; (IE really needs some speedup here..)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; // Fredrik Blomqvist
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 5, 7:45 am, Amit Mendapara &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26222752&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mendapara.a...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Look at my mochikit-ext project athttps://launchpad.net/mochikit-ext.
&lt;br&gt;&amp;gt;&amp;gt; I have implemented a jQuery style API in MochiKit.Query module &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; (http://
&lt;br&gt;&amp;gt;&amp;gt; bazaar.launchpad.net/~amit-mendapara/mochikit-ext/trunk/files) which
&lt;br&gt;&amp;gt;&amp;gt; is based on Sizzle.js (&lt;a href=&quot;http://github.com/jeresig/sizzle&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/jeresig/sizzle&lt;/a&gt;).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; MochiKit.DOM.getElementsByTagAndClassName(&amp;quot;div&amp;quot;, &amp;quot;some-class&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; can be replaced with
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; MochiKit.Query(&amp;quot;div.some-class&amp;quot;).get()
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The Sizzle.js is the fastest selector engine out there. Seehttp://www.hvergi.net/arnar/public/sizzle/speed/#for 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;the speed tests.
&lt;/div&gt;&lt;br&gt;Actually, it's not. The Acme engine in Dojo beats it by a fair bit on &amp;nbsp;
&lt;br&gt;most real-world selectors. It's stand-alone and can be easily imported &amp;nbsp;
&lt;br&gt;(like Sizzle).
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26222752&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26222752&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MochiKit.DOM.getElementsByTagAndClassName-performance-tp26187832p26222752.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26221790</id>
	<title>Re: MochiKit.DOM.getElementsByTagAndClassName performance</title>
	<published>2009-11-05T01:32:21Z</published>
	<updated>2009-11-05T01:32:21Z</updated>
	<author>
		<name>Fredrik-23</name>
	</author>
	<content type="html">&lt;br&gt;I created a getElementsByClassName based on this code:
&lt;br&gt;&lt;a href=&quot;http://robertnyman.com/2008/05/27/the-ultimate-getelementsbyclassname-anno-2008/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://robertnyman.com/2008/05/27/the-ultimate-getelementsbyclassname-anno-2008/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://code.google.com/p/getelementsbyclassname/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/getelementsbyclassname/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Pending a full selector integration something like this should be an
&lt;br&gt;easy drop-in
&lt;br&gt;solution to optimize getElementsByTagAndClassName.
&lt;br&gt;(IE really needs some speedup here..)
&lt;br&gt;&lt;br&gt;// Fredrik Blomqvist
&lt;br&gt;&lt;br&gt;On Nov 5, 7:45 am, Amit Mendapara &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26221790&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mendapara.a...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Look at my mochikit-ext project athttps://launchpad.net/mochikit-ext.
&lt;br&gt;&amp;gt; I have implemented a jQuery style API in MochiKit.Query module (http://
&lt;br&gt;&amp;gt; bazaar.launchpad.net/~amit-mendapara/mochikit-ext/trunk/files) which
&lt;br&gt;&amp;gt; is based on Sizzle.js (&lt;a href=&quot;http://github.com/jeresig/sizzle&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/jeresig/sizzle&lt;/a&gt;).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     MochiKit.DOM.getElementsByTagAndClassName(&amp;quot;div&amp;quot;, &amp;quot;some-class&amp;quot;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; can be replaced with
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     MochiKit.Query(&amp;quot;div.some-class&amp;quot;).get()
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The Sizzle.js is the fastest selector engine out there. Seehttp://www.hvergi.net/arnar/public/sizzle/speed/#for the speed tests.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Amit Mendapara
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 4, 9:22 pm, Bob Ippolito &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26221790&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;b...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; At least with recent browsers there are better ways to speed this up,
&lt;br&gt;&amp;gt; &amp;gt; e.g. by leveraging more native code (getElementsByClassName and/or
&lt;br&gt;&amp;gt; &amp;gt; XPath). None of them did this when the code was written in 2005 but I
&lt;br&gt;&amp;gt; &amp;gt; think all of them do now (except maybe IE).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Tue, Nov 3, 2009 at 11:14 PM, Per Cederberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26221790&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Generally, I think some of these optimizations make sense. Like using
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;quot;===&amp;quot; instead of &amp;quot;==&amp;quot; in code like this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;   typeof(x) === &amp;quot;string&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; But I think the optimizations where variables are moved outside code
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; blocks and where array lengths are stored to variables should be used
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; with extreme caution. These are the type of things that people used to
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; recommend for Java code, but nowadays the virtual machines optimize
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; these things better by themselves. And what used to be a speedup
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; actually often leads to decreased performance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; For JavaScript, the VM:s are much more immature. But they are rapidly
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; becoming faster and more advanced. So low-level code optimizations
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; that result in a speedup today, might not do so just a year or two
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; down the road.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I think our focus here should be on clarity of intention. If some
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; critical-path function is extremely slow, we might want to have a look
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; at optimizing that specific function. But in general I think we should
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; refrain from low-level code optimizations that doesn't also improve
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; code readabilty and reduce the frequency of bugs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Also, if speed is a problem, most serious speedups come from changes
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; to the algorithms and data structures involved. In this case for
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; instance, it might be faster to first find elements by class and then
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; filter out the ones with the correct tag. Or by using an
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; indexOf(&amp;quot;class&amp;quot;) on the className field before splitting it up. These
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; kind of optimizations will probably result in higher gains with less
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; reduction to the code readability.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Just my 2 cents.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; /Per
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; On Tue, Nov 3, 2009 at 23:23, takashi mizohata &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26221790&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bea...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Forgive me, if this is a recurring argument.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Today I was looking at Firebug profiler and I realize that
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; getElementsByTagAndClassName takes certain percentages of processing
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; time.  And I took a look at the code, and I did a little bit of hand
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; optimization.  It doesn't change any semantics of code, but just
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; organizing code.  It does pass the tests of course.  And i got around
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; 6% better performance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Well the down side of this tweak may be the decrease of readability.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Since you need to carefully type comma between local variables.  I
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; usually check it with jslint before commit in order to find those
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; potential mistakes.  And obviously I don't much about coding
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; convention of MochiKit and I might need to edit the style of it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Here I attached .patch file for this issue.  Please try it and let me
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; know what you think. if somebody's interested in, I can contribute
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; some more performance tweaks in MochiKit.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; Takashi M
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26221790&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26221790&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MochiKit.DOM.getElementsByTagAndClassName-performance-tp26187832p26221790.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26209966</id>
	<title>Re: MochiKit.DOM.getElementsByTagAndClassName performance</title>
	<published>2009-11-04T22:45:39Z</published>
	<updated>2009-11-04T22:45:39Z</updated>
	<author>
		<name>Amit Mendapara</name>
	</author>
	<content type="html">&lt;br&gt;Look at my mochikit-ext project at &lt;a href=&quot;https://launchpad.net/mochikit-ext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://launchpad.net/mochikit-ext&lt;/a&gt;.
&lt;br&gt;I have implemented a jQuery style API in MochiKit.Query module (http://
&lt;br&gt;bazaar.launchpad.net/~amit-mendapara/mochikit-ext/trunk/files) which
&lt;br&gt;is based on Sizzle.js (&lt;a href=&quot;http://github.com/jeresig/sizzle&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/jeresig/sizzle&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; MochiKit.DOM.getElementsByTagAndClassName(&amp;quot;div&amp;quot;, &amp;quot;some-class&amp;quot;)
&lt;br&gt;&lt;br&gt;can be replaced with
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; MochiKit.Query(&amp;quot;div.some-class&amp;quot;).get()
&lt;br&gt;&lt;br&gt;The Sizzle.js is the fastest selector engine out there. See
&lt;br&gt;&lt;a href=&quot;http://www.hvergi.net/arnar/public/sizzle/speed/#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hvergi.net/arnar/public/sizzle/speed/#&lt;/a&gt;&amp;nbsp;for the speed tests.
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;--
&lt;br&gt;Amit Mendapara
&lt;br&gt;&lt;br&gt;On Nov 4, 9:22 pm, Bob Ippolito &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209966&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;b...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; At least with recent browsers there are better ways to speed this up,
&lt;br&gt;&amp;gt; e.g. by leveraging more native code (getElementsByClassName and/or
&lt;br&gt;&amp;gt; XPath). None of them did this when the code was written in 2005 but I
&lt;br&gt;&amp;gt; think all of them do now (except maybe IE).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Nov 3, 2009 at 11:14 PM, Per Cederberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209966&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Generally, I think some of these optimizations make sense. Like using
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;===&amp;quot; instead of &amp;quot;==&amp;quot; in code like this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;   typeof(x) === &amp;quot;string&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; But I think the optimizations where variables are moved outside code
&lt;br&gt;&amp;gt; &amp;gt; blocks and where array lengths are stored to variables should be used
&lt;br&gt;&amp;gt; &amp;gt; with extreme caution. These are the type of things that people used to
&lt;br&gt;&amp;gt; &amp;gt; recommend for Java code, but nowadays the virtual machines optimize
&lt;br&gt;&amp;gt; &amp;gt; these things better by themselves. And what used to be a speedup
&lt;br&gt;&amp;gt; &amp;gt; actually often leads to decreased performance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; For JavaScript, the VM:s are much more immature. But they are rapidly
&lt;br&gt;&amp;gt; &amp;gt; becoming faster and more advanced. So low-level code optimizations
&lt;br&gt;&amp;gt; &amp;gt; that result in a speedup today, might not do so just a year or two
&lt;br&gt;&amp;gt; &amp;gt; down the road.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I think our focus here should be on clarity of intention. If some
&lt;br&gt;&amp;gt; &amp;gt; critical-path function is extremely slow, we might want to have a look
&lt;br&gt;&amp;gt; &amp;gt; at optimizing that specific function. But in general I think we should
&lt;br&gt;&amp;gt; &amp;gt; refrain from low-level code optimizations that doesn't also improve
&lt;br&gt;&amp;gt; &amp;gt; code readabilty and reduce the frequency of bugs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Also, if speed is a problem, most serious speedups come from changes
&lt;br&gt;&amp;gt; &amp;gt; to the algorithms and data structures involved. In this case for
&lt;br&gt;&amp;gt; &amp;gt; instance, it might be faster to first find elements by class and then
&lt;br&gt;&amp;gt; &amp;gt; filter out the ones with the correct tag. Or by using an
&lt;br&gt;&amp;gt; &amp;gt; indexOf(&amp;quot;class&amp;quot;) on the className field before splitting it up. These
&lt;br&gt;&amp;gt; &amp;gt; kind of optimizations will probably result in higher gains with less
&lt;br&gt;&amp;gt; &amp;gt; reduction to the code readability.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Just my 2 cents.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; /Per
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Tue, Nov 3, 2009 at 23:23, takashi mizohata &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209966&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bea...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Forgive me, if this is a recurring argument.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Today I was looking at Firebug profiler and I realize that
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; getElementsByTagAndClassName takes certain percentages of processing
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; time.  And I took a look at the code, and I did a little bit of hand
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; optimization.  It doesn't change any semantics of code, but just
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; organizing code.  It does pass the tests of course.  And i got around
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 6% better performance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Well the down side of this tweak may be the decrease of readability.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Since you need to carefully type comma between local variables.  I
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; usually check it with jslint before commit in order to find those
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; potential mistakes.  And obviously I don't much about coding
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; convention of MochiKit and I might need to edit the style of it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Here I attached .patch file for this issue.  Please try it and let me
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; know what you think. if somebody's interested in, I can contribute
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; some more performance tweaks in MochiKit.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Takashi M
&lt;/div&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209966&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26209966&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MochiKit.DOM.getElementsByTagAndClassName-performance-tp26187832p26209966.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26199523</id>
	<title>Re: MochiKit.DOM.getElementsByTagAndClassName  performance</title>
	<published>2009-11-04T08:22:12Z</published>
	<updated>2009-11-04T08:22:12Z</updated>
	<author>
		<name>Bob Ippolito</name>
	</author>
	<content type="html">&lt;br&gt;At least with recent browsers there are better ways to speed this up,
&lt;br&gt;e.g. by leveraging more native code (getElementsByClassName and/or
&lt;br&gt;XPath). None of them did this when the code was written in 2005 but I
&lt;br&gt;think all of them do now (except maybe IE).
&lt;br&gt;&lt;br&gt;On Tue, Nov 3, 2009 at 11:14 PM, Per Cederberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26199523&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederberg@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Generally, I think some of these optimizations make sense. Like using
&lt;br&gt;&amp;gt; &amp;quot;===&amp;quot; instead of &amp;quot;==&amp;quot; in code like this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   typeof(x) === &amp;quot;string&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; But I think the optimizations where variables are moved outside code
&lt;br&gt;&amp;gt; blocks and where array lengths are stored to variables should be used
&lt;br&gt;&amp;gt; with extreme caution. These are the type of things that people used to
&lt;br&gt;&amp;gt; recommend for Java code, but nowadays the virtual machines optimize
&lt;br&gt;&amp;gt; these things better by themselves. And what used to be a speedup
&lt;br&gt;&amp;gt; actually often leads to decreased performance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For JavaScript, the VM:s are much more immature. But they are rapidly
&lt;br&gt;&amp;gt; becoming faster and more advanced. So low-level code optimizations
&lt;br&gt;&amp;gt; that result in a speedup today, might not do so just a year or two
&lt;br&gt;&amp;gt; down the road.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think our focus here should be on clarity of intention. If some
&lt;br&gt;&amp;gt; critical-path function is extremely slow, we might want to have a look
&lt;br&gt;&amp;gt; at optimizing that specific function. But in general I think we should
&lt;br&gt;&amp;gt; refrain from low-level code optimizations that doesn't also improve
&lt;br&gt;&amp;gt; code readabilty and reduce the frequency of bugs.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Also, if speed is a problem, most serious speedups come from changes
&lt;br&gt;&amp;gt; to the algorithms and data structures involved. In this case for
&lt;br&gt;&amp;gt; instance, it might be faster to first find elements by class and then
&lt;br&gt;&amp;gt; filter out the ones with the correct tag. Or by using an
&lt;br&gt;&amp;gt; indexOf(&amp;quot;class&amp;quot;) on the className field before splitting it up. These
&lt;br&gt;&amp;gt; kind of optimizations will probably result in higher gains with less
&lt;br&gt;&amp;gt; reduction to the code readability.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Just my 2 cents.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Per
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Nov 3, 2009 at 23:23, takashi mizohata &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26199523&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;beatak@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Forgive me, if this is a recurring argument.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Today I was looking at Firebug profiler and I realize that
&lt;br&gt;&amp;gt;&amp;gt; getElementsByTagAndClassName takes certain percentages of processing
&lt;br&gt;&amp;gt;&amp;gt; time.  And I took a look at the code, and I did a little bit of hand
&lt;br&gt;&amp;gt;&amp;gt; optimization.  It doesn't change any semantics of code, but just
&lt;br&gt;&amp;gt;&amp;gt; organizing code.  It does pass the tests of course.  And i got around
&lt;br&gt;&amp;gt;&amp;gt; 6% better performance.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Well the down side of this tweak may be the decrease of readability.
&lt;br&gt;&amp;gt;&amp;gt; Since you need to carefully type comma between local variables.  I
&lt;br&gt;&amp;gt;&amp;gt; usually check it with jslint before commit in order to find those
&lt;br&gt;&amp;gt;&amp;gt; potential mistakes.  And obviously I don't much about coding
&lt;br&gt;&amp;gt;&amp;gt; convention of MochiKit and I might need to edit the style of it.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Here I attached .patch file for this issue.  Please try it and let me
&lt;br&gt;&amp;gt;&amp;gt; know what you think. if somebody's interested in, I can contribute
&lt;br&gt;&amp;gt;&amp;gt; some more performance tweaks in MochiKit.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Takashi M
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26199523&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26199523&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MochiKit.DOM.getElementsByTagAndClassName-performance-tp26187832p26199523.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26191953</id>
	<title>Re: MochiKit.DOM.getElementsByTagAndClassName performance</title>
	<published>2009-11-03T23:14:04Z</published>
	<updated>2009-11-03T23:14:04Z</updated>
	<author>
		<name>Per Cederberg-2</name>
	</author>
	<content type="html">&lt;br&gt;Generally, I think some of these optimizations make sense. Like using
&lt;br&gt;&amp;quot;===&amp;quot; instead of &amp;quot;==&amp;quot; in code like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;typeof(x) === &amp;quot;string&amp;quot;
&lt;br&gt;&lt;br&gt;But I think the optimizations where variables are moved outside code
&lt;br&gt;blocks and where array lengths are stored to variables should be used
&lt;br&gt;with extreme caution. These are the type of things that people used to
&lt;br&gt;recommend for Java code, but nowadays the virtual machines optimize
&lt;br&gt;these things better by themselves. And what used to be a speedup
&lt;br&gt;actually often leads to decreased performance.
&lt;br&gt;&lt;br&gt;For JavaScript, the VM:s are much more immature. But they are rapidly
&lt;br&gt;becoming faster and more advanced. So low-level code optimizations
&lt;br&gt;that result in a speedup today, might not do so just a year or two
&lt;br&gt;down the road.
&lt;br&gt;&lt;br&gt;I think our focus here should be on clarity of intention. If some
&lt;br&gt;critical-path function is extremely slow, we might want to have a look
&lt;br&gt;at optimizing that specific function. But in general I think we should
&lt;br&gt;refrain from low-level code optimizations that doesn't also improve
&lt;br&gt;code readabilty and reduce the frequency of bugs.
&lt;br&gt;&lt;br&gt;Also, if speed is a problem, most serious speedups come from changes
&lt;br&gt;to the algorithms and data structures involved. In this case for
&lt;br&gt;instance, it might be faster to first find elements by class and then
&lt;br&gt;filter out the ones with the correct tag. Or by using an
&lt;br&gt;indexOf(&amp;quot;class&amp;quot;) on the className field before splitting it up. These
&lt;br&gt;kind of optimizations will probably result in higher gains with less
&lt;br&gt;reduction to the code readability.
&lt;br&gt;&lt;br&gt;Just my 2 cents.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;/Per
&lt;br&gt;&lt;br&gt;On Tue, Nov 3, 2009 at 23:23, takashi mizohata &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26191953&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;beatak@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Forgive me, if this is a recurring argument.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Today I was looking at Firebug profiler and I realize that
&lt;br&gt;&amp;gt; getElementsByTagAndClassName takes certain percentages of processing
&lt;br&gt;&amp;gt; time.  And I took a look at the code, and I did a little bit of hand
&lt;br&gt;&amp;gt; optimization.  It doesn't change any semantics of code, but just
&lt;br&gt;&amp;gt; organizing code.  It does pass the tests of course.  And i got around
&lt;br&gt;&amp;gt; 6% better performance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well the down side of this tweak may be the decrease of readability.
&lt;br&gt;&amp;gt; Since you need to carefully type comma between local variables.  I
&lt;br&gt;&amp;gt; usually check it with jslint before commit in order to find those
&lt;br&gt;&amp;gt; potential mistakes.  And obviously I don't much about coding
&lt;br&gt;&amp;gt; convention of MochiKit and I might need to edit the style of it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here I attached .patch file for this issue.  Please try it and let me
&lt;br&gt;&amp;gt; know what you think. if somebody's interested in, I can contribute
&lt;br&gt;&amp;gt; some more performance tweaks in MochiKit.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Takashi M
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26191953&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26191953&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MochiKit.DOM.getElementsByTagAndClassName-performance-tp26187832p26191953.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26187832</id>
	<title>MochiKit.DOM.getElementsByTagAndClassName performance</title>
	<published>2009-11-03T14:23:09Z</published>
	<updated>2009-11-03T14:23:09Z</updated>
	<author>
		<name>takashi mizohata</name>
	</author>
	<content type="html">Hi All,
&lt;br&gt;&lt;br&gt;Forgive me, if this is a recurring argument.
&lt;br&gt;&lt;br&gt;Today I was looking at Firebug profiler and I realize that
&lt;br&gt;getElementsByTagAndClassName takes certain percentages of processing
&lt;br&gt;time. &amp;nbsp;And I took a look at the code, and I did a little bit of hand
&lt;br&gt;optimization. &amp;nbsp;It doesn't change any semantics of code, but just
&lt;br&gt;organizing code. &amp;nbsp;It does pass the tests of course. &amp;nbsp;And i got around
&lt;br&gt;6% better performance.
&lt;br&gt;&lt;br&gt;Well the down side of this tweak may be the decrease of readability.
&lt;br&gt;Since you need to carefully type comma between local variables. &amp;nbsp;I
&lt;br&gt;usually check it with jslint before commit in order to find those
&lt;br&gt;potential mistakes. &amp;nbsp;And obviously I don't much about coding
&lt;br&gt;convention of MochiKit and I might need to edit the style of it.
&lt;br&gt;&lt;br&gt;Here I attached .patch file for this issue. &amp;nbsp;Please try it and let me
&lt;br&gt;know what you think. if somebody's interested in, I can contribute
&lt;br&gt;some more performance tweaks in MochiKit.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Takashi M
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26187832&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26187832&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;getElementsByTagAndClassName.patch&lt;/strong&gt; (2K) &lt;a href=&quot;http://old.nabble.com/attachment/26187832/0/getElementsByTagAndClassName.patch&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MochiKit.DOM.getElementsByTagAndClassName-performance-tp26187832p26187832.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25613760</id>
	<title>Lets flirt or...</title>
	<published>2009-09-25T00:16:49Z</published>
	<updated>2009-09-25T00:16:49Z</updated>
	<author>
		<name>Bob Ivor</name>
	</author>
	<content type="html">&lt;br&gt;Hello to this group, Im newbie here.
&lt;br&gt;Life is boring and uninteresting, entertain me :)
&lt;br&gt;&lt;br&gt;Lets flirt or maybe something more?
&lt;br&gt;Im here:
&lt;br&gt;&lt;a href=&quot;http://camelliaelfr.150m.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://camelliaelfr.150m.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25613760&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25613760&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Lets-flirt-or...-tp25613760p25613760.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24771929</id>
	<title>Re: MochiTAL</title>
	<published>2009-08-01T12:22:15Z</published>
	<updated>2009-08-01T12:22:15Z</updated>
	<author>
		<name>bkc-2</name>
	</author>
	<content type="html">&lt;br&gt;I can't answer the question directly about MochiTAL, but when I saw
&lt;br&gt;MochiTAL more than a year ago I decided to write a more complete
&lt;br&gt;implementation of TAL in javascript called jstal.
&lt;br&gt;&lt;br&gt;I have combined jstal with an XSLT implementation (tal2xslt) into a
&lt;br&gt;single package ATALi (Alternate TAL Implementations) which you can
&lt;br&gt;find at &lt;a href=&quot;https://launchpad.net/atali&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://launchpad.net/atali&lt;/a&gt;&lt;br&gt;&lt;br&gt;(apache license)
&lt;br&gt;&lt;br&gt;Hmm, there's no docs and no examples, so this post is probably wasting
&lt;br&gt;your time.
&lt;br&gt;&lt;br&gt;I use both jstal and tal2xslt every day in production. I really need
&lt;br&gt;to finish this project up.
&lt;br&gt;&lt;br&gt;Is anyone interested?
&lt;br&gt;&lt;br&gt;The one thing that is holding me up is lack of tests. I need a good
&lt;br&gt;xml diff tool so I can write tests for tal2xslt, and I would need
&lt;br&gt;something similar for jstal in javascript. (rhino?)
&lt;br&gt;&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24771929&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24771929&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MochiTAL-tp24757452p24771929.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24757452</id>
	<title>MochiTAL</title>
	<published>2009-07-30T08:55:31Z</published>
	<updated>2009-07-30T08:55:31Z</updated>
	<author>
		<name>ss-26</name>
	</author>
	<content type="html">&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; I am new to JavaScript and to Mochikit, but I've seen enough of it
&lt;br&gt;(Mochikit) to get very much interested about it. I am currently
&lt;br&gt;looking into the Ajax Tables example from the Mochikit web site, and I
&lt;br&gt;have to confess that I am a little bit confused about the MochiTAL
&lt;br&gt;processing. So, I thought I'd drop a line to check if anyone is kind
&lt;br&gt;enough to help understand what happens behind the scenes.
&lt;br&gt;&amp;nbsp; &amp;nbsp; I'm particularly confused about the valueForKeyPath processing
&lt;br&gt;which take as parameter the 'domains' string from mochi:repeat
&lt;br&gt;property, if I got it right... So, &amp;quot;name&amp;quot; will receive the value
&lt;br&gt;'item' but I can't get what values will be returned to 'lst' in the
&lt;br&gt;example.
&lt;br&gt;&amp;nbsp; &amp;nbsp; I am sorry if this sounds basic, and do appreciate any support.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;ss.
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24757452&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24757452&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MochiTAL-tp24757452p24757452.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24662557</id>
	<title>Re: Defered.setFinal</title>
	<published>2009-07-25T15:51:59Z</published>
	<updated>2009-07-25T15:51:59Z</updated>
	<author>
		<name>Giulio Cesare Solaroli</name>
	</author>
	<content type="html">&lt;br&gt;Hello all,
&lt;br&gt;&lt;br&gt;On Tue, Feb 10, 2009 at 6:48 PM, Bob Ippolito&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24662557&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bob@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Finalizing a Deferred should ensure that no further callback/errbacks
&lt;br&gt;&amp;gt; are registered and it should attach a default error handler (success
&lt;br&gt;&amp;gt; should be no-op). The most common problem I've seen with Deferreds is
&lt;br&gt;&amp;gt; that an error occurs but nobody attached an error handler that far
&lt;br&gt;&amp;gt; down the stack. [...]
&lt;br&gt;&lt;br&gt;In order to handle this case, we have overwrote the 'callback' method
&lt;br&gt;in our subclass of the Deferred class, to add a default Errback that
&lt;br&gt;at least logs the error.
&lt;br&gt;&lt;br&gt;A similar solution could be probably used also in MochiKit, allowing
&lt;br&gt;the user to optionally specify a specific error handler / finalizer.
&lt;br&gt;This will allow any further check, as once the Deferred is triggered
&lt;br&gt;it is already impossible to add further callback/errback.
&lt;br&gt;&lt;br&gt;I will check anyway the fix added to the repository to see how to
&lt;br&gt;improve our current extension with the committed fix.
&lt;br&gt;&lt;br&gt;Giulio Cesare
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24662557&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24662557&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defered.setFinal-tp21933645p24662557.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24583186</id>
	<title>Ticket #352: Adding MochiKit.DateTime.toISOTime arguments to the API</title>
	<published>2009-07-21T00:41:22Z</published>
	<updated>2009-07-21T00:41:22Z</updated>
	<author>
		<name>Per Cederberg-2</name>
	</author>
	<content type="html">&lt;br&gt;In ticket #352 the realISO parameter in the
&lt;br&gt;MochiKit.DateTime.toISOTime() function is discussed:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://trac.mochikit.com/ticket/352&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://trac.mochikit.com/ticket/352&lt;/a&gt;&lt;br&gt;&lt;br&gt;It was introduced by Bob in r377 (some 4 years ago), but never added
&lt;br&gt;to the documentation or the official API:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://trac.mochikit.com/changeset/377&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://trac.mochikit.com/changeset/377&lt;/a&gt;&lt;br&gt;&lt;br&gt;Is it time that we now add it? Or is it just one of those hacks that
&lt;br&gt;we should just hide away? Opinons?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;/Per
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24583186&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24583186&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ticket--352%3A-Adding-MochiKit.DateTime.toISOTime-arguments-to-the-API-tp24583186p24583186.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24566964</id>
	<title>Re: Defered.setFinal</title>
	<published>2009-07-20T03:03:55Z</published>
	<updated>2009-07-20T03:03:55Z</updated>
	<author>
		<name>Amit Mendapara</name>
	</author>
	<content type="html">&lt;br&gt;Hi Per,
&lt;br&gt;&lt;br&gt;I have just tested the changes with the Ajax extension module and it
&lt;br&gt;works as expected. Thanks for considering adding this feature. This
&lt;br&gt;would help me creating jQuery compatible Ajax module for Mochikit
&lt;br&gt;extensions project.
&lt;br&gt;&lt;br&gt;Currently, I'm quite busy with some another work but supposed to come
&lt;br&gt;back on MochiKit Extensions soon...
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;--
&lt;br&gt;Amit Mendapara
&lt;br&gt;&lt;br&gt;On Jul 20, 2:26 pm, Per Cederberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566964&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Slow response here, but I finally got around to committing this to
&lt;br&gt;&amp;gt; Subversion (r1533):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;  &lt;a href=&quot;http://trac.mochikit.com/changeset/1533&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://trac.mochikit.com/changeset/1533&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Modified the patch a bit further to account for some additional cases.
&lt;br&gt;&amp;gt; Also added tests and documentation.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; @Bob: Can you please review this change? I have the feeling that I've
&lt;br&gt;&amp;gt; still missed one or two corner cases... Also, the mochikit.com and
&lt;br&gt;&amp;gt; trac.mochikit.com site seems slow from here... High server load
&lt;br&gt;&amp;gt; recently?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; @Amit: Please check that my additional controls doesn't break you use case.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Per
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Wed, Feb 11, 2009 at 14:52, Amit Mendapara&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566964&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mendapara.a...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Even better...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; if (this.chain.length == 0 &amp;&amp; this._finalizer) {
&lt;br&gt;&amp;gt; &amp;gt;    this._finalized = this._finalizer(res);
&lt;br&gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This will allow us to finalize the deferred based on some
&lt;br&gt;&amp;gt; &amp;gt; conditions...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; - Amit
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Feb 11, 12:52 am, Per Cederberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566964&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; You mean like this?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;     setFinalizer: function(cb) {
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;         this._finalizer = cb;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;     }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;     ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;     if (this.chain.length == 0 &amp;&amp; this._finalizer) {
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;         this.finalized = true;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;         if (res instanceof Error) {
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;             this._finalizer(res);
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;         }
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;     }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Would that be acceptable to Amit as well? In that case we would add a
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; default error handler (called a &amp;quot;finalizer&amp;quot;), which would also be what
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I'm planning to use this for.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Other opinions?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; /Per
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Tue, Feb 10, 2009 at 5:48 PM, Bob Ippolito &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566964&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;b...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Finalizing a Deferred should ensure that no further callback/errbacks
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; are registered and it should attach a default error handler (success
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; should be no-op). The most common problem I've seen with Deferreds is
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; that an error occurs but nobody attached an error handler that far
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; down the stack. In Python they work around this by having a finalizer
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; so that you see the error when the object gets GC'ed, but that's not
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; really possible in JS since you don't have finalizers or weak
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; references.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; On Tue, Feb 10, 2009 at 8:04 AM, Per Cederberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566964&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; I think this is a good idea. I needed something similar too, so I
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; ended up writing an ugly hack that worked most of the time...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;    d.addBoth(function (res) {d.addBoth(finalFunc); return res; });
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; It adds new callback once the first deferred result drops in,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; hopefully after all the other callbacks have been added...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; But a more formally correct solution would probably be a good idea.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; /Per
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; On Tue, Feb 10, 2009 at 2:30 PM, Amit Mendapara
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566964&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mendapara.a...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Hi Per,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; I have just started again improving the MochiKit Extensions. While
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; creating tests for the Ajax module, I found one problem (not bug, but
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; specific to the feature I'm trying to implement). I registered a
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; callback which should be fired at the end of all registered callbacks.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; I achieved by modifying Async.js with a new method `setFinal` (not
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; addFinal as there should be only one finalizer)  which gets fired when
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; `chain.length == 0`. It's simple. I would we happy if you add one such
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; function in MochiKit.Async.Defered...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Regards
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Amit
&lt;/div&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566964&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566964&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defered.setFinal-tp21933645p24566964.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24566498</id>
	<title>Re: Defered.setFinal</title>
	<published>2009-07-20T02:26:12Z</published>
	<updated>2009-07-20T02:26:12Z</updated>
	<author>
		<name>Per Cederberg-2</name>
	</author>
	<content type="html">&lt;br&gt;Slow response here, but I finally got around to committing this to
&lt;br&gt;Subversion (r1533):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://trac.mochikit.com/changeset/1533&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://trac.mochikit.com/changeset/1533&lt;/a&gt;&lt;br&gt;&lt;br&gt;Modified the patch a bit further to account for some additional cases.
&lt;br&gt;Also added tests and documentation.
&lt;br&gt;&lt;br&gt;@Bob: Can you please review this change? I have the feeling that I've
&lt;br&gt;still missed one or two corner cases... Also, the mochikit.com and
&lt;br&gt;trac.mochikit.com site seems slow from here... High server load
&lt;br&gt;recently?
&lt;br&gt;&lt;br&gt;@Amit: Please check that my additional controls doesn't break you use case.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;/Per
&lt;br&gt;&lt;br&gt;On Wed, Feb 11, 2009 at 14:52, Amit Mendapara&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566498&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mendapara.amit@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Even better...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; if (this.chain.length == 0 &amp;&amp; this._finalizer) {
&lt;br&gt;&amp;gt;    this._finalized = this._finalizer(res);
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This will allow us to finalize the deferred based on some
&lt;br&gt;&amp;gt; conditions...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - Amit
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Feb 11, 12:52 am, Per Cederberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566498&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; You mean like this?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;     setFinalizer: function(cb) {
&lt;br&gt;&amp;gt;&amp;gt;         this._finalizer = cb;
&lt;br&gt;&amp;gt;&amp;gt;     }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;     ...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;     if (this.chain.length == 0 &amp;&amp; this._finalizer) {
&lt;br&gt;&amp;gt;&amp;gt;         this.finalized = true;
&lt;br&gt;&amp;gt;&amp;gt;         if (res instanceof Error) {
&lt;br&gt;&amp;gt;&amp;gt;             this._finalizer(res);
&lt;br&gt;&amp;gt;&amp;gt;         }
&lt;br&gt;&amp;gt;&amp;gt;     }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Would that be acceptable to Amit as well? In that case we would add a
&lt;br&gt;&amp;gt;&amp;gt; default error handler (called a &amp;quot;finalizer&amp;quot;), which would also be what
&lt;br&gt;&amp;gt;&amp;gt; I'm planning to use this for.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Other opinions?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; /Per
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Tue, Feb 10, 2009 at 5:48 PM, Bob Ippolito &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566498&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;b...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Finalizing a Deferred should ensure that no further callback/errbacks
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; are registered and it should attach a default error handler (success
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; should be no-op). The most common problem I've seen with Deferreds is
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; that an error occurs but nobody attached an error handler that far
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; down the stack. In Python they work around this by having a finalizer
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; so that you see the error when the object gets GC'ed, but that's not
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; really possible in JS since you don't have finalizers or weak
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; references.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; On Tue, Feb 10, 2009 at 8:04 AM, Per Cederberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566498&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; I think this is a good idea. I needed something similar too, so I
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; ended up writing an ugly hack that worked most of the time...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;    d.addBoth(function (res) {d.addBoth(finalFunc); return res; });
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; It adds new callback once the first deferred result drops in,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; hopefully after all the other callbacks have been added...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; But a more formally correct solution would probably be a good idea.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; /Per
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; On Tue, Feb 10, 2009 at 2:30 PM, Amit Mendapara
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566498&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mendapara.a...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Hi Per,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; I have just started again improving the MochiKit Extensions. While
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; creating tests for the Ajax module, I found one problem (not bug, but
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; specific to the feature I'm trying to implement). I registered a
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; callback which should be fired at the end of all registered callbacks.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; I achieved by modifying Async.js with a new method `setFinal` (not
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; addFinal as there should be only one finalizer)  which gets fired when
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; `chain.length == 0`. It's simple. I would we happy if you add one such
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; function in MochiKit.Async.Defered...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Regards
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Amit
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566498&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24566498&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Defered.setFinal-tp21933645p24566498.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24562821</id>
	<title>Re: Base.js unescape reassignment and intrusion protection systems</title>
	<published>2009-07-19T18:59:27Z</published>
	<updated>2009-07-19T18:59:27Z</updated>
	<author>
		<name>Michael-530</name>
	</author>
	<content type="html">&lt;br&gt;Thanks Per for your analysis. I think your suggestion will work. Who
&lt;br&gt;will try it? I am not a MochiKit user directly. I'm a MarkMail user
&lt;br&gt;who investigated why he can't view articles at work.
&lt;br&gt;&lt;br&gt;At work I am getting an exception made to allow JavaScript from
&lt;br&gt;markmail.org. But that doesn't help anyone else wanting to use a site
&lt;br&gt;using MochiKit inside a similarly-protected environment.
&lt;br&gt;&lt;br&gt;The IDS information I have is that a Proventia device scans JavaScript
&lt;br&gt;files. It truncates any that contain a reassignment of the unescape()
&lt;br&gt;function to a variable because that is considered a vulnerability. I
&lt;br&gt;have tested at work with a minimal JavaScript file and found that
&lt;br&gt;Per's suggested modification is not blocked.
&lt;br&gt;&lt;br&gt;—Michael
&lt;br&gt;&lt;br&gt;On Jul 17, 4:07 pm, Per Cederberg &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24562821&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Now that I'm awake, it strikes me that this might be the obvious solution:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;    function decode(text) {
&lt;br&gt;&amp;gt;        if (typeof(decodeURIComponent) != &amp;quot;undefined&amp;quot;) {
&lt;br&gt;&amp;gt;            return decodeURIComponent(text);
&lt;br&gt;&amp;gt;        } else {
&lt;br&gt;&amp;gt;            return unescape(text);
&lt;br&gt;&amp;gt;        }
&lt;br&gt;&amp;gt;    }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Try to patch it in a repackage the source code and let us know how it
&lt;br&gt;&amp;gt; works. It's slightly less efficient code, but we might optimize some
&lt;br&gt;&amp;gt; of that away if it works.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Per
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Fri, Jul 17, 2009 at 05:19, Bob Ippolito&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24562821&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;b...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; There are various ways it could be rewritten, but without knowing
&lt;br&gt;&amp;gt; &amp;gt; exactly how stupid the IPS is it's hard to say which permutation would
&lt;br&gt;&amp;gt; &amp;gt; pass its test. Someone who can reproduce this issue should spend some
&lt;br&gt;&amp;gt; &amp;gt; time with it and produce a patch.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Thu, Jul 16, 2009 at 6:34 PM, Michael&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24562821&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mstras...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I have found a problem with MochiKit Base.js and the intrusion
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; protection system at work. The IPS truncates Base.js because it
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; assigns the unescape() function to a variable (in parseQueryString(),
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; line 1225 in version 1.4.2 of Base.js). The IPS response is documented
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; here:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&lt;a href=&quot;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape&lt;/a&gt;...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Has anybody else seen this behaviour? Could the code be re-written to
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; not use that reassignment?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; (I discovered this because MarkMail does not work, and it uses a
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; compressed version of MochiKit 1.4.)
&lt;/div&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24562821&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24562821&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Base.js-unescape-reassignment-and-intrusion-protection-systems-tp24527926p24562821.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24529078</id>
	<title>Re: Base.js unescape reassignment and intrusion  protection systems</title>
	<published>2009-07-16T23:07:12Z</published>
	<updated>2009-07-16T23:07:12Z</updated>
	<author>
		<name>Per Cederberg-2</name>
	</author>
	<content type="html">&lt;br&gt;Now that I'm awake, it strikes me that this might be the obvious solution:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;function decode(text) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (typeof(decodeURIComponent) != &amp;quot;undefined&amp;quot;) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return decodeURIComponent(text);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return unescape(text);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;Try to patch it in a repackage the source code and let us know how it
&lt;br&gt;works. It's slightly less efficient code, but we might optimize some
&lt;br&gt;of that away if it works.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;/Per
&lt;br&gt;&lt;br&gt;On Fri, Jul 17, 2009 at 05:19, Bob Ippolito&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24529078&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bob@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There are various ways it could be rewritten, but without knowing
&lt;br&gt;&amp;gt; exactly how stupid the IPS is it's hard to say which permutation would
&lt;br&gt;&amp;gt; pass its test. Someone who can reproduce this issue should spend some
&lt;br&gt;&amp;gt; time with it and produce a patch.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Thu, Jul 16, 2009 at 6:34 PM, Michael&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24529078&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mstrasser@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have found a problem with MochiKit Base.js and the intrusion
&lt;br&gt;&amp;gt;&amp;gt; protection system at work. The IPS truncates Base.js because it
&lt;br&gt;&amp;gt;&amp;gt; assigns the unescape() function to a variable (in parseQueryString(),
&lt;br&gt;&amp;gt;&amp;gt; line 1225 in version 1.4.2 of Base.js). The IPS response is documented
&lt;br&gt;&amp;gt;&amp;gt; here:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape_Obfuscation.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape_Obfuscation.htm&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Has anybody else seen this behaviour? Could the code be re-written to
&lt;br&gt;&amp;gt;&amp;gt; not use that reassignment?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; (I discovered this because MarkMail does not work, and it uses a
&lt;br&gt;&amp;gt;&amp;gt; compressed version of MochiKit 1.4.)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24529078&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24529078&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Base.js-unescape-reassignment-and-intrusion-protection-systems-tp24527926p24529078.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24527988</id>
	<title>Re: Base.js unescape reassignment and intrusion protection systems</title>
	<published>2009-07-16T20:19:26Z</published>
	<updated>2009-07-16T20:19:26Z</updated>
	<author>
		<name>Bob Ippolito</name>
	</author>
	<content type="html">&lt;br&gt;There are various ways it could be rewritten, but without knowing
&lt;br&gt;exactly how stupid the IPS is it's hard to say which permutation would
&lt;br&gt;pass its test. Someone who can reproduce this issue should spend some
&lt;br&gt;time with it and produce a patch.
&lt;br&gt;&lt;br&gt;On Thu, Jul 16, 2009 at 6:34 PM, Michael&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24527988&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mstrasser@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have found a problem with MochiKit Base.js and the intrusion
&lt;br&gt;&amp;gt; protection system at work. The IPS truncates Base.js because it
&lt;br&gt;&amp;gt; assigns the unescape() function to a variable (in parseQueryString(),
&lt;br&gt;&amp;gt; line 1225 in version 1.4.2 of Base.js). The IPS response is documented
&lt;br&gt;&amp;gt; here:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape_Obfuscation.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape_Obfuscation.htm&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Has anybody else seen this behaviour? Could the code be re-written to
&lt;br&gt;&amp;gt; not use that reassignment?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (I discovered this because MarkMail does not work, and it uses a
&lt;br&gt;&amp;gt; compressed version of MochiKit 1.4.)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24527988&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24527988&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Base.js-unescape-reassignment-and-intrusion-protection-systems-tp24527926p24527988.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24527987</id>
	<title>Re: Base.js unescape reassignment and intrusion protection systems</title>
	<published>2009-07-16T20:18:35Z</published>
	<updated>2009-07-16T20:18:35Z</updated>
	<author>
		<name>Per Cederberg-2</name>
	</author>
	<content type="html">&lt;br&gt;The reassignment is for backwards compability if I understand it correctly:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (typeof(decodeURIComponent) != &amp;quot;undefined&amp;quot;) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; decode = decodeURIComponent;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; decode = unescape;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;From the JavaScript 1.5 guide at Mozilla:
&lt;br&gt;&lt;br&gt;The escape and unescape functions do not work properly for non-ASCII
&lt;br&gt;characters and have been deprecated. In JavaScript 1.5 and later, use
&lt;br&gt;encodeURI, decodeURI, encodeURIComponent, and decodeURIComponent.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide/Predefined_Functions/Escape_and_unescape_Functions&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide/Predefined_Functions/Escape_and_unescape_Functions&lt;/a&gt;&lt;br&gt;&lt;br&gt;I don't see any good alternative solutions here. Perhaps the IDS
&lt;br&gt;should be forced to allow a few exceptions?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;/Per
&lt;br&gt;&lt;br&gt;On Fri, Jul 17, 2009 at 03:34, Michael&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24527987&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mstrasser@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have found a problem with MochiKit Base.js and the intrusion
&lt;br&gt;&amp;gt; protection system at work. The IPS truncates Base.js because it
&lt;br&gt;&amp;gt; assigns the unescape() function to a variable (in parseQueryString(),
&lt;br&gt;&amp;gt; line 1225 in version 1.4.2 of Base.js). The IPS response is documented
&lt;br&gt;&amp;gt; here:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape_Obfuscation.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape_Obfuscation.htm&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Has anybody else seen this behaviour? Could the code be re-written to
&lt;br&gt;&amp;gt; not use that reassignment?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (I discovered this because MarkMail does not work, and it uses a
&lt;br&gt;&amp;gt; compressed version of MochiKit 1.4.)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24527987&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24527987&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Base.js-unescape-reassignment-and-intrusion-protection-systems-tp24527926p24527987.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24527926</id>
	<title>Base.js unescape reassignment and intrusion protection systems</title>
	<published>2009-07-16T18:34:17Z</published>
	<updated>2009-07-16T18:34:17Z</updated>
	<author>
		<name>Michael-530</name>
	</author>
	<content type="html">&lt;br&gt;I have found a problem with MochiKit Base.js and the intrusion
&lt;br&gt;protection system at work. The IPS truncates Base.js because it
&lt;br&gt;assigns the unescape() function to a variable (in parseQueryString(),
&lt;br&gt;line 1225 in version 1.4.2 of Base.js). The IPS response is documented
&lt;br&gt;here:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape_Obfuscation.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.iss.net/security_center/reference/vuln/JavaScript_Unescape_Obfuscation.htm&lt;/a&gt;&lt;br&gt;&lt;br&gt;Has anybody else seen this behaviour? Could the code be re-written to
&lt;br&gt;not use that reassignment?
&lt;br&gt;&lt;br&gt;&lt;br&gt;(I discovered this because MarkMail does not work, and it uses a
&lt;br&gt;compressed version of MochiKit 1.4.)
&lt;br&gt;&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24527926&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24527926&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Base.js-unescape-reassignment-and-intrusion-protection-systems-tp24527926p24527926.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24443211</id>
	<title>Re: Error running tests with Opera 10</title>
	<published>2009-07-11T12:30:07Z</published>
	<updated>2009-07-11T12:30:07Z</updated>
	<author>
		<name>Giulio Cesare Solaroli</name>
	</author>
	<content type="html">&lt;br&gt;Hello Per,
&lt;br&gt;&lt;br&gt;I agree with you about trying to avoid work-arounds; but I haven't
&lt;br&gt;found any way to report a 'simple' Javascript issue to Opera itself.
&lt;br&gt;&lt;br&gt;I have investigated if the problem is caused by a different toString()
&lt;br&gt;implementation, but I don't think so, as the extra stack info is
&lt;br&gt;appended to the 'name' and 'message' extension property also.
&lt;br&gt;&lt;br&gt;Giulio Cesare
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Sat, Jul 11, 2009 at 8:57 PM, Per Cederberg&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24443211&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cederberg@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is the type of stuff one would rather not add to work-arounds in
&lt;br&gt;&amp;gt; the JavaScript code. Don't understand why Opera can't add stacktraces
&lt;br&gt;&amp;gt; as separate properties to their exception objects instead? Or is it
&lt;br&gt;&amp;gt; just that they've modified the toString() implementation?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Per
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Sat, Jul 11, 2009 at 18:57, Giulio Cesare
&lt;br&gt;&amp;gt; Solaroli&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24443211&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;giulio.cesare@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I was having some issues running Clipperz test suite with Opera 10.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Looking closer at the failed tests, I have find out that Opera 10 is
&lt;br&gt;&amp;gt;&amp;gt; returning a messed up name and description for Exceptions.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This problem is triggered also running the default MochiKit tests; in
&lt;br&gt;&amp;gt;&amp;gt; MochiKit.Async test actually.
&lt;br&gt;&amp;gt;&amp;gt; The test expects an error with message &amp;quot;foo&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; (test_MochiKit-Async.html, line 300; trunk version 1525), but the
&lt;br&gt;&amp;gt;&amp;gt; actual value is &amp;quot;foo\r\nstacktrace: n/a; see
&lt;br&gt;&amp;gt;&amp;gt; opera:config#UserPrefs|Exceptions Have Stacktrace&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Opera 10 is appending some extra values to the exception message,
&lt;br&gt;&amp;gt;&amp;gt; screwing up the test; in my case, it alters the behaviour of the whole
&lt;br&gt;&amp;gt;&amp;gt; application, as some execution paths are based on the value of the
&lt;br&gt;&amp;gt;&amp;gt; returned error name.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Any idea on how to fix this problem? or just report it to Opera so
&lt;br&gt;&amp;gt;&amp;gt; that they can fix it for the next release?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Giulio Cesare
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24443211&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24443211&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Error-running-tests-with-Opera-10-tp24441992p24443211.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24443004</id>
	<title>Re: Error running tests with Opera 10</title>
	<published>2009-07-11T11:57:30Z</published>
	<updated>2009-07-11T11:57:30Z</updated>
	<author>
		<name>Per Cederberg-2</name>
	</author>
	<content type="html">&lt;br&gt;This is the type of stuff one would rather not add to work-arounds in
&lt;br&gt;the JavaScript code. Don't understand why Opera can't add stacktraces
&lt;br&gt;as separate properties to their exception objects instead? Or is it
&lt;br&gt;just that they've modified the toString() implementation?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;/Per
&lt;br&gt;&lt;br&gt;On Sat, Jul 11, 2009 at 18:57, Giulio Cesare
&lt;br&gt;Solaroli&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24443004&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;giulio.cesare@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I was having some issues running Clipperz test suite with Opera 10.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Looking closer at the failed tests, I have find out that Opera 10 is
&lt;br&gt;&amp;gt; returning a messed up name and description for Exceptions.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This problem is triggered also running the default MochiKit tests; in
&lt;br&gt;&amp;gt; MochiKit.Async test actually.
&lt;br&gt;&amp;gt; The test expects an error with message &amp;quot;foo&amp;quot;
&lt;br&gt;&amp;gt; (test_MochiKit-Async.html, line 300; trunk version 1525), but the
&lt;br&gt;&amp;gt; actual value is &amp;quot;foo\r\nstacktrace: n/a; see
&lt;br&gt;&amp;gt; opera:config#UserPrefs|Exceptions Have Stacktrace&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Opera 10 is appending some extra values to the exception message,
&lt;br&gt;&amp;gt; screwing up the test; in my case, it alters the behaviour of the whole
&lt;br&gt;&amp;gt; application, as some execution paths are based on the value of the
&lt;br&gt;&amp;gt; returned error name.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any idea on how to fix this problem? or just report it to Opera so
&lt;br&gt;&amp;gt; that they can fix it for the next release?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Giulio Cesare
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24443004&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24443004&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Error-running-tests-with-Opera-10-tp24441992p24443004.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24441992</id>
	<title>Error running tests with Opera 10</title>
	<published>2009-07-11T09:57:52Z</published>
	<updated>2009-07-11T09:57:52Z</updated>
	<author>
		<name>Giulio Cesare Solaroli</name>
	</author>
	<content type="html">&lt;br&gt;Hello,
&lt;br&gt;&lt;br&gt;I was having some issues running Clipperz test suite with Opera 10.
&lt;br&gt;&lt;br&gt;Looking closer at the failed tests, I have find out that Opera 10 is
&lt;br&gt;returning a messed up name and description for Exceptions.
&lt;br&gt;&lt;br&gt;This problem is triggered also running the default MochiKit tests; in
&lt;br&gt;MochiKit.Async test actually.
&lt;br&gt;The test expects an error with message &amp;quot;foo&amp;quot;
&lt;br&gt;(test_MochiKit-Async.html, line 300; trunk version 1525), but the
&lt;br&gt;actual value is &amp;quot;foo\r\nstacktrace: n/a; see
&lt;br&gt;opera:config#UserPrefs|Exceptions Have Stacktrace&amp;quot;.
&lt;br&gt;&lt;br&gt;Opera 10 is appending some extra values to the exception message,
&lt;br&gt;screwing up the test; in my case, it alters the behaviour of the whole
&lt;br&gt;application, as some execution paths are based on the value of the
&lt;br&gt;returned error name.
&lt;br&gt;&lt;br&gt;Any idea on how to fix this problem? or just report it to Opera so
&lt;br&gt;that they can fix it for the next release?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Giulio Cesare
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24441992&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24441992&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Error-running-tests-with-Opera-10-tp24441992p24441992.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24395625</id>
	<title>Re: Firefox 3.5 and XmlHttpRequest</title>
	<published>2009-07-08T10:10:40Z</published>
	<updated>2009-07-08T10:10:40Z</updated>
	<author>
		<name>Eoghan Murray</name>
	</author>
	<content type="html">&lt;br&gt;Thanks for reproducing :)
&lt;br&gt;&lt;br&gt;I've originally encountered the bug with a packed version of MochiKit;
&lt;br&gt;in that case, Signal.connect firing implies that the rest of MochiKit
&lt;br&gt;is available including logging.
&lt;br&gt;&lt;br&gt;I've also tested it with connect(window, 'onload', ... ) &amp;nbsp;where it
&lt;br&gt;occurs less frequently.
&lt;br&gt;&lt;br&gt;I've quite a number of images on the page, and it seems to occur more
&lt;br&gt;frequently if I do a full cache reload of the page.
&lt;br&gt;&lt;br&gt;Here it is 'in the wild': &lt;a href=&quot;http://gs.statcounter.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gs.statcounter.com/&lt;/a&gt;&lt;br&gt;(MochiKit.Logging is not enabled; if the bug occurs the flash graph
&lt;br&gt;will not load)
&lt;br&gt;&lt;br&gt;Eoghan
&lt;br&gt;&lt;br&gt;On Jul 8, 5:11 pm, Karl Norby &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24395625&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Karl.No...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I ran your test in FF3.5, and I ended up seeing no log entry in about
&lt;br&gt;&amp;gt; 1 of every 10 trials, although I saw the request every time in
&lt;br&gt;&amp;gt; firebug. I changed your test around to use body onload instead, and it
&lt;br&gt;&amp;gt; works fine every time I test it. Since the requests seem to be going
&lt;br&gt;&amp;gt; through, signal.js is loading every time before signal is called, but
&lt;br&gt;&amp;gt; logging probably is not (loaded much later than signal). If I change
&lt;br&gt;&amp;gt; 'log' to 'alert' in your example, the problem doesn't persist.
&lt;br&gt;&amp;gt; So, even if FF loads all of the scripts in head in the correct order,
&lt;br&gt;&amp;gt; script tags in body can be loaded at any point of that process, thus
&lt;br&gt;&amp;gt; creating the race condition. That's probably a bug in firefox then, as
&lt;br&gt;&amp;gt; I can't think of why that behavior would be desirable.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Karl
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Jul 8, 9:59 am, Eoghan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24395625&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eoghanomur...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I'm noticing a problem using a deferred with firefox 3.5.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I have a bit of javascript at the bottom of the html to synthesize a
&lt;br&gt;&amp;gt; &amp;gt; domload event (but I have also reproduced this behaviour with a plain
&lt;br&gt;&amp;gt; &amp;gt; window.onload event) and fire off an AJAX request :
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;     ....
&lt;br&gt;&amp;gt; &amp;gt;     &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;signal(window, 'onDOMload');&amp;lt;/
&lt;br&gt;&amp;gt; &amp;gt; script&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;     &amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; file.js :
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;     connect(window, 'onDOMload', function(e){
&lt;br&gt;&amp;gt; &amp;gt;         var loadc = loadJSONDoc(&amp;quot;/test&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt;         loadc.addCallback(function(r){ log('success'); });
&lt;br&gt;&amp;gt; &amp;gt;         loadc.addErrback(function(r){ log('error'); });
&lt;br&gt;&amp;gt; &amp;gt;     });
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Most of the time in firefox 3.5 nothing at all gets logged ... you can
&lt;br&gt;&amp;gt; &amp;gt; see that the JSON response was returned correctly in firebug, but
&lt;br&gt;&amp;gt; &amp;gt; neither the callback or errback fires. The status of 'loadc' is
&lt;br&gt;&amp;gt; &amp;gt; 'success'.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; It appears to work correctly in both Chrome and IE8.
&lt;br&gt;&amp;gt; &amp;gt; When I downgrade firefox to 3.0.11 it also runs as expected.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Anyone else seeing anything similar?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I have a feeling that it has something to do with that I'm firing off
&lt;br&gt;&amp;gt; &amp;gt; the request early, while the rest of the page is loading... I've used
&lt;br&gt;&amp;gt; &amp;gt; callLater to delay the request, and see the same behaviour but much
&lt;br&gt;&amp;gt; &amp;gt; less freequently.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Eoghan
&lt;/div&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24395625&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24395625&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Firefox-3.5-and-XmlHttpRequest-tp24393254p24395625.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24395007</id>
	<title>Re: Firefox 3.5 and XmlHttpRequest</title>
	<published>2009-07-08T09:11:34Z</published>
	<updated>2009-07-08T09:11:34Z</updated>
	<author>
		<name>Karl Norby-2</name>
	</author>
	<content type="html">&lt;br&gt;I ran your test in FF3.5, and I ended up seeing no log entry in about
&lt;br&gt;1 of every 10 trials, although I saw the request every time in
&lt;br&gt;firebug. I changed your test around to use body onload instead, and it
&lt;br&gt;works fine every time I test it. Since the requests seem to be going
&lt;br&gt;through, signal.js is loading every time before signal is called, but
&lt;br&gt;logging probably is not (loaded much later than signal). If I change
&lt;br&gt;'log' to 'alert' in your example, the problem doesn't persist.
&lt;br&gt;So, even if FF loads all of the scripts in head in the correct order,
&lt;br&gt;script tags in body can be loaded at any point of that process, thus
&lt;br&gt;creating the race condition. That's probably a bug in firefox then, as
&lt;br&gt;I can't think of why that behavior would be desirable.
&lt;br&gt;&lt;br&gt;Cheers!
&lt;br&gt;&lt;br&gt;-Karl
&lt;br&gt;&lt;br&gt;On Jul 8, 9:59 am, Eoghan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24395007&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eoghanomur...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I'm noticing a problem using a deferred with firefox 3.5.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a bit of javascript at the bottom of the html to synthesize a
&lt;br&gt;&amp;gt; domload event (but I have also reproduced this behaviour with a plain
&lt;br&gt;&amp;gt; window.onload event) and fire off an AJAX request :
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     ....
&lt;br&gt;&amp;gt;     &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;signal(window, 'onDOMload');&amp;lt;/
&lt;br&gt;&amp;gt; script&amp;gt;
&lt;br&gt;&amp;gt;     &amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; file.js :
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     connect(window, 'onDOMload', function(e){
&lt;br&gt;&amp;gt;         var loadc = loadJSONDoc(&amp;quot;/test&amp;quot;);
&lt;br&gt;&amp;gt;         loadc.addCallback(function(r){ log('success'); });
&lt;br&gt;&amp;gt;         loadc.addErrback(function(r){ log('error'); });
&lt;br&gt;&amp;gt;     });
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Most of the time in firefox 3.5 nothing at all gets logged ... you can
&lt;br&gt;&amp;gt; see that the JSON response was returned correctly in firebug, but
&lt;br&gt;&amp;gt; neither the callback or errback fires. The status of 'loadc' is
&lt;br&gt;&amp;gt; 'success'.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It appears to work correctly in both Chrome and IE8.
&lt;br&gt;&amp;gt; When I downgrade firefox to 3.0.11 it also runs as expected.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anyone else seeing anything similar?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a feeling that it has something to do with that I'm firing off
&lt;br&gt;&amp;gt; the request early, while the rest of the page is loading... I've used
&lt;br&gt;&amp;gt; callLater to delay the request, and see the same behaviour but much
&lt;br&gt;&amp;gt; less freequently.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Eoghan
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24395007&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24395007&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Firefox-3.5-and-XmlHttpRequest-tp24393254p24395007.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24393254</id>
	<title>Firefox 3.5 and XmlHttpRequest</title>
	<published>2009-07-08T07:59:17Z</published>
	<updated>2009-07-08T07:59:17Z</updated>
	<author>
		<name>Eoghan Murray</name>
	</author>
	<content type="html">&lt;br&gt;I'm noticing a problem using a deferred with firefox 3.5.
&lt;br&gt;&lt;br&gt;I have a bit of javascript at the bottom of the html to synthesize a
&lt;br&gt;domload event (but I have also reproduced this behaviour with a plain
&lt;br&gt;window.onload event) and fire off an AJAX request :
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;signal(window, 'onDOMload');&amp;lt;/
&lt;br&gt;script&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;
&lt;br&gt;&lt;br&gt;file.js :
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; connect(window, 'onDOMload', function(e){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var loadc = loadJSONDoc(&amp;quot;/test&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loadc.addCallback(function(r){ log('success'); });
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loadc.addErrback(function(r){ log('error'); });
&lt;br&gt;&amp;nbsp; &amp;nbsp; });
&lt;br&gt;&lt;br&gt;Most of the time in firefox 3.5 nothing at all gets logged ... you can
&lt;br&gt;see that the JSON response was returned correctly in firebug, but
&lt;br&gt;neither the callback or errback fires. The status of 'loadc' is
&lt;br&gt;'success'.
&lt;br&gt;&lt;br&gt;It appears to work correctly in both Chrome and IE8.
&lt;br&gt;When I downgrade firefox to 3.0.11 it also runs as expected.
&lt;br&gt;&lt;br&gt;Anyone else seeing anything similar?
&lt;br&gt;&lt;br&gt;I have a feeling that it has something to do with that I'm firing off
&lt;br&gt;the request early, while the rest of the page is loading... I've used
&lt;br&gt;callLater to delay the request, and see the same behaviour but much
&lt;br&gt;less freequently.
&lt;br&gt;&lt;br&gt;Eoghan
&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24393254&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24393254&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Firefox-3.5-and-XmlHttpRequest-tp24393254p24393254.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24312667</id>
	<title>Ajax post request, not finding correct url - 404</title>
	<published>2009-07-02T12:13:58Z</published>
	<updated>2009-07-02T12:13:58Z</updated>
	<author>
		<name>Adam Yee</name>
	</author>
	<content type="html">&lt;br&gt;I'm in the process of putting my site into production state on Apache
&lt;br&gt;2.2.11 with mod_wsgi 2.5 (using TG1.1). &amp;nbsp;The Ajax request works fine
&lt;br&gt;in the development server, but it doesn't for Apache. &amp;nbsp;Keeps looking
&lt;br&gt;to the document root '/var/www/html' for the server-side script '/
&lt;br&gt;login_json' as seen in Apache the error_log.
&lt;br&gt;&lt;br&gt;[Thu Jul 02 11:17:52 2009] [error] [client 192.168.1.164] File does
&lt;br&gt;not exist: /var/www/html/login_json, referer: &lt;a href=&quot;http://192.168.1.164/interview/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://192.168.1.164/interview/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Here is my javascript and server-side script &lt;a href=&quot;http://dpaste.com/hold/62591/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dpaste.com/hold/62591/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Other standard http requests to different pages are working
&lt;br&gt;correctly. &amp;nbsp;How do I get my javascript to look to the correct URL?
&lt;br&gt;I've tried replacing '/login_json' with '&lt;a href=&quot;http://192.168.1.164/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://192.168.1.164/&lt;/a&gt;&lt;br&gt;interview/login_json' (also used 127.0.0.1) but no change.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Adam
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24312667&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24312667&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ajax-post-request%2C-not-finding-correct-url---404-tp24312667p24312667.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24254228</id>
	<title>Re: bind() / memory leak?</title>
	<published>2009-06-29T06:33:32Z</published>
	<updated>2009-06-29T06:33:32Z</updated>
	<author>
		<name>Kevin Kaiser</name>
	</author>
	<content type="html">&lt;br&gt;Thanks for the insight. I solved part of the problem by changing how
&lt;br&gt;MochiKit.Base.bind stores the bound object (im_self); instead of
&lt;br&gt;returning a function with the bound object as a direct property of the
&lt;br&gt;function, it stores a numeric index to a table of objects instead.
&lt;br&gt;When binding, if your target object has already been bound before, bind
&lt;br&gt;() just reuses the existing index. It's significantly reduced the
&lt;br&gt;amount of memory being used, although long-term usage of the app still
&lt;br&gt;builds a large table of objects which needs pruned from time to time.
&lt;br&gt;Our app has a state manager built in so I use it to prune the bound
&lt;br&gt;objects list of things that got set up in a given state, upon exiting
&lt;br&gt;that state.
&lt;br&gt;&lt;br&gt;Anyways, here's the updated MochiKit.Base.bind() if anybody is
&lt;br&gt;interested:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; window.onunload = function () {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; delete MochiKit.Base.bindings;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; delete MochiKit.Base.bound_objects;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MochiKit.Base.bindings &amp;nbsp; &amp;nbsp; &amp;nbsp;= [];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MochiKit.Base.bound_objects = [];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /** @id MochiKit.Base.bind */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MochiKit.Base.bind = function (func, self/* args... */) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (typeof(func) == &amp;quot;string&amp;quot;) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; func = self[func];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var im_func = func.im_func;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var im_preargs = func.im_preargs;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var im_self = func.im_self;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var m = MochiKit.Base;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (typeof(func) == &amp;quot;function&amp;quot; &amp;&amp; typeof(func.apply) ==
&lt;br&gt;&amp;quot;undefined&amp;quot;) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // this is for cases where JavaScript sucks ass and
&lt;br&gt;gives you a
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // really dumb built-in function like alert() that
&lt;br&gt;doesn't have
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // an apply
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; func = m._wrapDumbFunction(func);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (typeof(im_func) != 'function') {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; im_func = func;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (typeof(self) != 'undefined') {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; im_self = self;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; im_self_index = null;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var i = 0; i &amp;lt; MochiKit.Base.bound_objects.length; i
&lt;br&gt;++) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (MochiKit.Base.bound_objects[i] === im_self) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; im_self_index = i;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } // end if
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } // end for
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (im_self_index == null) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MochiKit.Base.bound_objects.push(im_self);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; im_self_index = MochiKit.Base.bound_objects.length -
&lt;br&gt;1;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } // end if
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; im_self = MochiKit.Base.bound_objects[im_self_index];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (typeof(im_preargs) == 'undefined') {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; im_preargs = [];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; im_preargs = im_preargs.slice();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; m.extend(im_preargs, arguments, 2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var newfunc = function () {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var args = arguments;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var me = arguments.callee;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (MochiKit.Base.bindings
&lt;br&gt;[me.index].im_preargs.length &amp;gt; 0) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; args = m.concat(MochiKit.Base.bindings
&lt;br&gt;[me.index].im_preargs, args);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var self = MochiKit.Base.bindings[me.index].im_self;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!self) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self = this;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return MochiKit.Base.bindings[me.index].im_func.apply
&lt;br&gt;(self, args);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; newfunc.index = MochiKit.Base.bindings.length;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MochiKit.Base.bindings.push({&amp;quot;im_self&amp;quot; &amp;nbsp; &amp;nbsp;: im_self,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;im_func&amp;quot; &amp;nbsp; &amp;nbsp;: im_func,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;im_preargs&amp;quot; :
&lt;br&gt;im_preargs});
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return newfunc;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };
&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24254228&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24254228&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bind%28%29---memory-leak--tp24114006p24254228.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24122553</id>
	<title>Re: bind() / memory leak?</title>
	<published>2009-06-19T23:39:14Z</published>
	<updated>2009-06-19T23:39:14Z</updated>
	<author>
		<name>Per Cederberg-2</name>
	</author>
	<content type="html">&lt;br&gt;Mostly, these issues are caused by lingering references to the removed
&lt;br&gt;DOM nodes (lookup tables, etc). In this case, since you use MochiKit,
&lt;br&gt;you might want to look at the MochKit.Signal.disconnectAll().
&lt;br&gt;It might also be helpful for some older browsers to tear down the DOM tree.
&lt;br&gt;&lt;br&gt;Here's a helper function that I've used to achieve these two aims:
&lt;br&gt;&lt;br&gt;/**
&lt;br&gt;* Destroys a widget or a DOM node. This function will remove the DOM
&lt;br&gt;* node from the tree, disconnect all signals and call all widget
&lt;br&gt;* destructor functions. The same procedure will also be applied
&lt;br&gt;* recursively to all child nodes. Once destroyed, all references to
&lt;br&gt;* the widget object should be cleared in order for the browser to
&lt;br&gt;* be able to reclaim the memory used.
&lt;br&gt;*
&lt;br&gt;* @param {Widget/Node/Array} node the (widget) DOM node or list
&lt;br&gt;*
&lt;br&gt;* @static
&lt;br&gt;*/
&lt;br&gt;MochiKit.Widget.destroyWidget = function (node) {
&lt;br&gt;    if (node.nodeType != null) {
&lt;br&gt;        if (typeof(node.destroy) == &amp;quot;function&amp;quot;) {
&lt;br&gt;            node.destroy();
&lt;br&gt;        }
&lt;br&gt;        if (node.parentNode != null) {
&lt;br&gt;            MochiKit.DOM.removeElement(node);
&lt;br&gt;        }
&lt;br&gt;        MochiKit.Signal.disconnectAll(node);
&lt;br&gt;        while (node.firstChild != null) {
&lt;br&gt;            MochiKit.Widget.destroyWidget(node.firstChild);
&lt;br&gt;        }
&lt;br&gt;    } else if (MochiKit.Base.isArrayLike(node)) {
&lt;br&gt;        for (var i = node.length - 1; i &amp;gt;= 0; i--) {
&lt;br&gt;            MochiKit.Widget.destroyWidget(node[i]);
&lt;br&gt;        }
&lt;br&gt;    }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;/Per
&lt;br&gt;&lt;br&gt;On Fri, Jun 19, 2009 at 17:34, Kevin Kaiser &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24122553&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kevinsync@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've built a rather complicated web app that makes heavy use of
&lt;br&gt;&amp;gt; MochiKit.Base.bind() and partial(). There are no page refreshes in the
&lt;br&gt;&amp;gt; app and the majority of the page content between areas of the UI is
&lt;br&gt;&amp;gt; dynamically created / removed via DOM methods. A user might spend
&lt;br&gt;&amp;gt; considerable time inside the app and it leaks memory like I've never
&lt;br&gt;&amp;gt; seen.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I suspect it has a lot to do with the fact that the majority of the
&lt;br&gt;&amp;gt; data in browser memory is inside of a single, potentially-large
&lt;br&gt;&amp;gt; object / data structure, and most bind() or partial() calls pass along
&lt;br&gt;&amp;gt; this object as a parameter, which ends up set as the im_self attribute
&lt;br&gt;&amp;gt; on the resulting bound function.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A lot of my bound functions end up set as event handlers and things
&lt;br&gt;&amp;gt; like that, so when the app tears down part of the screen to display
&lt;br&gt;&amp;gt; new stuff, those functions just get popped out of the DOM but aren't
&lt;br&gt;&amp;gt; garbage collected by the browser since the page never reloads.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there any way to force garbage collection while a page is still
&lt;br&gt;&amp;gt; loaded in any of the browsers?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I may need to build some kind of explicit cleanup functions that
&lt;br&gt;&amp;gt; attach to an element and clean these references upon the element's
&lt;br&gt;&amp;gt; removal from the DOM, except I fear it being really slow due to the
&lt;br&gt;&amp;gt; fact that if you remove a parent element that has a huge amount of
&lt;br&gt;&amp;gt; [great-great][grand]child nodes, I'll have to walk the whole tree and
&lt;br&gt;&amp;gt; clean each individual node..
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anyhow, any ideas would be wonderful.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt; &amp;gt;
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24122553&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24122553&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bind%28%29---memory-leak--tp24114006p24122553.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24120641</id>
	<title>Re: bind() / memory leak?</title>
	<published>2009-06-19T17:24:50Z</published>
	<updated>2009-06-19T17:24:50Z</updated>
	<author>
		<name>David Barnett-4</name>
	</author>
	<content type="html">Isn&amp;#39;t jProbe specifically for profiling Java code? I don&amp;#39;t understand how that would help. Or is Java just the implementation language?&lt;br&gt;&lt;br&gt;David&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Jun 19, 2009 at 12:10 PM, Jeryl Cook &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24120641&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;twoencore@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;br&gt;
Have you tried jProbe? it will help you figure out where the memory&lt;br&gt;
leak is..it could be anywhere not necessarily MochiKit.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.quest.com/jprobe/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.quest.com/jprobe/&lt;/a&gt;&lt;br&gt;
its commercial but there is a trial.&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
On Fri, Jun 19, 2009 at 11:34 AM, Kevin Kaiser&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24120641&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kevinsync@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I&amp;#39;ve built a rather complicated web app that makes heavy use of&lt;br&gt;
&amp;gt; MochiKit.Base.bind() and partial(). There are no page refreshes in the&lt;br&gt;
&amp;gt; app and the majority of the page content between areas of the UI is&lt;br&gt;
&amp;gt; dynamically created / removed via DOM methods. A user might spend&lt;br&gt;
&amp;gt; considerable time inside the app and it leaks memory like I&amp;#39;ve never&lt;br&gt;
&amp;gt; seen.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I suspect it has a lot to do with the fact that the majority of the&lt;br&gt;
&amp;gt; data in browser memory is inside of a single, potentially-large&lt;br&gt;
&amp;gt; object / data structure, and most bind() or partial() calls pass along&lt;br&gt;
&amp;gt; this object as a parameter, which ends up set as the im_self attribute&lt;br&gt;
&amp;gt; on the resulting bound function.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; A lot of my bound functions end up set as event handlers and things&lt;br&gt;
&amp;gt; like that, so when the app tears down part of the screen to display&lt;br&gt;
&amp;gt; new stuff, those functions just get popped out of the DOM but aren&amp;#39;t&lt;br&gt;
&amp;gt; garbage collected by the browser since the page never reloads.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Is there any way to force garbage collection while a page is still&lt;br&gt;
&amp;gt; loaded in any of the browsers?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I may need to build some kind of explicit cleanup functions that&lt;br&gt;
&amp;gt; attach to an element and clean these references upon the element&amp;#39;s&lt;br&gt;
&amp;gt; removal from the DOM, except I fear it being really slow due to the&lt;br&gt;
&amp;gt; fact that if you remove a parent element that has a huge amount of&lt;br&gt;
&amp;gt; [great-great][grand]child nodes, I&amp;#39;ll have to walk the whole tree and&lt;br&gt;
&amp;gt; clean each individual node..&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Anyhow, any ideas would be wonderful.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks!&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;font color=&quot;#888888&quot;&gt;Jeryl Cook&lt;br&gt;
/^\ Pharaoh /^\&lt;br&gt;
&lt;a href=&quot;http://pharaohofkush.blogspot.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://pharaohofkush.blogspot.com/&lt;/a&gt;&lt;br&gt;
I have long since come to believe that people never mean half of what&lt;br&gt;
they say, and that it is best to disregard their talk and judge only&lt;br&gt;
their actions.&lt;br&gt;
-Dorothy Day&lt;br&gt;
&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group. &lt;br&gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24120641&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt; &lt;br&gt; To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24120641&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt; &lt;br&gt; For more options, visit this group at http://groups.google.com/group/mochikit?hl=en&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bind%28%29---memory-leak--tp24114006p24120641.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24119702</id>
	<title>Re: bind() / memory leak?</title>
	<published>2009-06-19T09:10:09Z</published>
	<updated>2009-06-19T09:10:09Z</updated>
	<author>
		<name>Jeryl Cook-2</name>
	</author>
	<content type="html">&lt;br&gt;Have you tried jProbe? it will help you figure out where the memory
&lt;br&gt;leak is..it could be anywhere not necessarily MochiKit.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.quest.com/jprobe/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.quest.com/jprobe/&lt;/a&gt;&lt;br&gt;its commercial but there is a trial.
&lt;br&gt;&lt;br&gt;On Fri, Jun 19, 2009 at 11:34 AM, Kevin Kaiser&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24119702&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kevinsync@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've built a rather complicated web app that makes heavy use of
&lt;br&gt;&amp;gt; MochiKit.Base.bind() and partial(). There are no page refreshes in the
&lt;br&gt;&amp;gt; app and the majority of the page content between areas of the UI is
&lt;br&gt;&amp;gt; dynamically created / removed via DOM methods. A user might spend
&lt;br&gt;&amp;gt; considerable time inside the app and it leaks memory like I've never
&lt;br&gt;&amp;gt; seen.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I suspect it has a lot to do with the fact that the majority of the
&lt;br&gt;&amp;gt; data in browser memory is inside of a single, potentially-large
&lt;br&gt;&amp;gt; object / data structure, and most bind() or partial() calls pass along
&lt;br&gt;&amp;gt; this object as a parameter, which ends up set as the im_self attribute
&lt;br&gt;&amp;gt; on the resulting bound function.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A lot of my bound functions end up set as event handlers and things
&lt;br&gt;&amp;gt; like that, so when the app tears down part of the screen to display
&lt;br&gt;&amp;gt; new stuff, those functions just get popped out of the DOM but aren't
&lt;br&gt;&amp;gt; garbage collected by the browser since the page never reloads.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there any way to force garbage collection while a page is still
&lt;br&gt;&amp;gt; loaded in any of the browsers?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I may need to build some kind of explicit cleanup functions that
&lt;br&gt;&amp;gt; attach to an element and clean these references upon the element's
&lt;br&gt;&amp;gt; removal from the DOM, except I fear it being really slow due to the
&lt;br&gt;&amp;gt; fact that if you remove a parent element that has a huge amount of
&lt;br&gt;&amp;gt; [great-great][grand]child nodes, I'll have to walk the whole tree and
&lt;br&gt;&amp;gt; clean each individual node..
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anyhow, any ideas would be wonderful.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jeryl Cook
&lt;br&gt;/^\ Pharaoh /^\
&lt;br&gt;&lt;a href=&quot;http://pharaohofkush.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pharaohofkush.blogspot.com/&lt;/a&gt;&lt;br&gt;I have long since come to believe that people never mean half of what
&lt;br&gt;they say, and that it is best to disregard their talk and judge only
&lt;br&gt;their actions.
&lt;br&gt;-Dorothy Day
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24119702&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24119702&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bind%28%29---memory-leak--tp24114006p24119702.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24114006</id>
	<title>bind() / memory leak?</title>
	<published>2009-06-19T08:34:14Z</published>
	<updated>2009-06-19T08:34:14Z</updated>
	<author>
		<name>Kevin Kaiser</name>
	</author>
	<content type="html">&lt;br&gt;I've built a rather complicated web app that makes heavy use of
&lt;br&gt;MochiKit.Base.bind() and partial(). There are no page refreshes in the
&lt;br&gt;app and the majority of the page content between areas of the UI is
&lt;br&gt;dynamically created / removed via DOM methods. A user might spend
&lt;br&gt;considerable time inside the app and it leaks memory like I've never
&lt;br&gt;seen.
&lt;br&gt;&lt;br&gt;I suspect it has a lot to do with the fact that the majority of the
&lt;br&gt;data in browser memory is inside of a single, potentially-large
&lt;br&gt;object / data structure, and most bind() or partial() calls pass along
&lt;br&gt;this object as a parameter, which ends up set as the im_self attribute
&lt;br&gt;on the resulting bound function.
&lt;br&gt;&lt;br&gt;A lot of my bound functions end up set as event handlers and things
&lt;br&gt;like that, so when the app tears down part of the screen to display
&lt;br&gt;new stuff, those functions just get popped out of the DOM but aren't
&lt;br&gt;garbage collected by the browser since the page never reloads.
&lt;br&gt;&lt;br&gt;Is there any way to force garbage collection while a page is still
&lt;br&gt;loaded in any of the browsers?
&lt;br&gt;&lt;br&gt;I may need to build some kind of explicit cleanup functions that
&lt;br&gt;attach to an element and clean these references upon the element's
&lt;br&gt;removal from the DOM, except I fear it being really slow due to the
&lt;br&gt;fact that if you remove a parent element that has a huge amount of
&lt;br&gt;[great-great][grand]child nodes, I'll have to walk the whole tree and
&lt;br&gt;clean each individual node..
&lt;br&gt;&lt;br&gt;Anyhow, any ideas would be wonderful.
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24114006&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24114006&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bind%28%29---memory-leak--tp24114006p24114006.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24094392</id>
	<title>Re: Async help, loadJSONdoc and evalJSONrequest</title>
	<published>2009-06-18T05:44:24Z</published>
	<updated>2009-06-18T05:44:24Z</updated>
	<author>
		<name>Bugzilla from lorgandon@gmail.com</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;Hi&lt;br&gt;Try to do the connect after the page has loaded. Use addLoadEvent for that.&lt;br&gt;So your code will look something like that:&lt;br&gt;&lt;br&gt;function bla() {&lt;br&gt;    connect(...);&lt;br&gt;}&lt;br&gt;&lt;br&gt;addLoadEvent(bla);&lt;br&gt;
&lt;br&gt;Some other issues:&lt;br&gt;If you are using ajax, you don&amp;#39;t really need form actions, the clicking submit will do a regular (non-ajax) POST.&lt;br&gt;I usually connect to onclick if I want ajax.&lt;br&gt;&lt;br&gt;It seems that you are using turbogears 2. I&amp;#39;m using turbogears1, so take my advice with a grain of salt, but in tg1 you can do expose(&amp;quot;json&amp;quot;), and return a regular dict.&lt;br&gt;
&lt;br&gt;If you need further help with that, I&amp;#39;ll be glad to help you off-list.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;Imri&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Jun 18, 2009 at 12:48 AM, Adam Yee &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24094392&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;adamjyee@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;br&gt;
Hi all, I&amp;#39;m a newbie to MochiKit and JS, so bare with me if there are&lt;br&gt;
syntax errors or design flaws.&lt;br&gt;
&lt;br&gt;
I&amp;#39;m trying to achieve simple AJAX functionality (using JSON) by&lt;br&gt;
submitting a single form input and displaying the input asynchronously&lt;br&gt;
with .innerHTML.&lt;br&gt;
&lt;br&gt;
My code (testpage.html and controllers.py):&lt;br&gt;
&lt;a href=&quot;http://dpaste.com/hold/56577/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dpaste.com/hold/56577/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
The connect(&amp;#39;form&amp;#39;, &amp;#39;onsubmit&amp;#39;, submitClicked) doesn&amp;#39;t seem to be&lt;br&gt;
doing anything.  The json.dumps(d) is doing its job - when submit is&lt;br&gt;
clicked, the page refreshes with only {&amp;quot;insert&amp;quot;: &amp;quot;whatever text&lt;br&gt;
here&amp;quot;}.  I can&amp;#39;t figure out how to json.loads properly, but if I can&amp;#39;t&lt;br&gt;
get the JS to work, the the server side script won&amp;#39;t receive any&lt;br&gt;
json.  So my struggle is in sending the xmlhttprequest.&lt;br&gt;
&lt;br&gt;
Thank you for helping,&lt;br&gt;
Adam&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Imri Goldberg&lt;br&gt;--------------------------------------&lt;br&gt;&lt;a href=&quot;http://www.algorithm.co.il/blogs/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;www.algorithm.co.il/blogs/&lt;/a&gt;&lt;br&gt;--------------------------------------&lt;br&gt;
-- insert signature here ----&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;
You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group. &lt;br&gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24094392&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt; &lt;br&gt; To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24094392&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt; &lt;br&gt; For more options, visit this group at http://groups.google.com/group/mochikit?hl=en&lt;br&gt;
-~----------~----~----~----~------~----~------~--~---&lt;br&gt;
&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Async-help%2C-loadJSONdoc-and-evalJSONrequest-tp24085312p24094392.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24085312</id>
	<title>Async help, loadJSONdoc and evalJSONrequest</title>
	<published>2009-06-17T14:48:40Z</published>
	<updated>2009-06-17T14:48:40Z</updated>
	<author>
		<name>Adam Yee</name>
	</author>
	<content type="html">&lt;br&gt;Hi all, I'm a newbie to MochiKit and JS, so bare with me if there are
&lt;br&gt;syntax errors or design flaws.
&lt;br&gt;&lt;br&gt;I'm trying to achieve simple AJAX functionality (using JSON) by
&lt;br&gt;submitting a single form input and displaying the input asynchronously
&lt;br&gt;with .innerHTML.
&lt;br&gt;&lt;br&gt;My code (testpage.html and controllers.py):
&lt;br&gt;&lt;a href=&quot;http://dpaste.com/hold/56577/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dpaste.com/hold/56577/&lt;/a&gt;&lt;br&gt;&lt;br&gt;The connect('form', 'onsubmit', submitClicked) doesn't seem to be
&lt;br&gt;doing anything. &amp;nbsp;The json.dumps(d) is doing its job - when submit is
&lt;br&gt;clicked, the page refreshes with only {&amp;quot;insert&amp;quot;: &amp;quot;whatever text
&lt;br&gt;here&amp;quot;}. &amp;nbsp;I can't figure out how to json.loads properly, but if I can't
&lt;br&gt;get the JS to work, the the server side script won't receive any
&lt;br&gt;json. &amp;nbsp;So my struggle is in sending the xmlhttprequest.
&lt;br&gt;&lt;br&gt;Thank you for helping,
&lt;br&gt;Adam
&lt;br&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24085312&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24085312&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Async-help%2C-loadJSONdoc-and-evalJSONrequest-tp24085312p24085312.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23807535</id>
	<title>Re: Widgets in mochikit-patches</title>
	<published>2009-05-31T15:23:26Z</published>
	<updated>2009-05-31T15:23:26Z</updated>
	<author>
		<name>Per Cederberg-2</name>
	</author>
	<content type="html">&lt;br&gt;I think the current location is quite fine, if not in the MochiKit
&lt;br&gt;repo itself. Should perhaps add a link from the Wiki pages, though...
&lt;br&gt;&lt;br&gt;If you'd like to contribute new widgets, I'd love to include them!
&lt;br&gt;Just fork the git repo and send me a pull request when done.
&lt;br&gt;&lt;br&gt;Regarding other widget solutions, my personal motivations for
&lt;br&gt;implementing yet-another-JavaScript-widget-library are:
&lt;br&gt;&lt;br&gt;1. Using a mix-in approach instead of wrapper objects, the code
&lt;br&gt;becomes more light-weight.
&lt;br&gt;2. Creating a UI from XML instead of code makes for easier maintenance.
&lt;br&gt;3. With a nice default look and simple API:s, the widgets become easy to use.
&lt;br&gt;4. Unlimited open source license to avoid legal and commercial hassles.
&lt;br&gt;&lt;br&gt;All of the above can be argued back and forth, of course. I see #1
&lt;br&gt;above as the main point with this effort, since both the others could
&lt;br&gt;equally well be patched into some other widget library. And I see no
&lt;br&gt;point in doing something that isn't sufficiently different from other
&lt;br&gt;efforts in this area. I know lots of you just want to avoid using
&lt;br&gt;another JS library for your widgets, but is that really such a big
&lt;br&gt;problem? In fact, YUI is pretty configurable in that way if I recall
&lt;br&gt;correctly.
&lt;br&gt;&lt;br&gt;Which kind of resonates with my reasons for staying with MochiKit in
&lt;br&gt;spite of the jQuery popularity surge (and actually using it a bit at
&lt;br&gt;work from time to time). That it does things differently from other JS
&lt;br&gt;libraries. For good or bad.
&lt;br&gt;&lt;br&gt;Anyway. These are just my ramblings on the JS widget topic. Feel free
&lt;br&gt;to disagree.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;/Per
&lt;br&gt;&lt;br&gt;On Sun, May 31, 2009 at 23:23, Ryan Wilcox &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23807535&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ryanwilcox@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Per,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If not in the standard MochiKit package, maybe in a centralized place/
&lt;br&gt;&amp;gt; repo &amp;quot;blessed&amp;quot; by the MochiKit team as the &amp;quot;Widgets 4 MochiKit&amp;quot;
&lt;br&gt;&amp;gt; project, for example??
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'd be willing to contribute a few controls (a multi-select/shuffle
&lt;br&gt;&amp;gt; take-options-from-this-select-and-put-in-that-one widget, for example.
&lt;br&gt;&amp;gt; Available at &amp;lt;&lt;a href=&quot;http://bitbucket.org/rwilcox/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bitbucket.org/rwilcox/&lt;/a&gt;&lt;br&gt;&amp;gt; mochikit_multiselecttransfer/&amp;gt;).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Usually I'll use YUI framework for the big-gun widgets, but yes a
&lt;br&gt;&amp;gt; MochiKit widgets package would be _excellent_. It feels annoying, for
&lt;br&gt;&amp;gt; example, when I see a widget that's just perfect for what I need,
&lt;br&gt;&amp;gt; except it requires JQuery (and I don't want to pull in a second or
&lt;br&gt;&amp;gt; third JS library into the mix...)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So, +1 from me,
&lt;br&gt;&amp;gt; _Ryan Wilcox
&lt;/div&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~
&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;MochiKit&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23807535&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit@...&lt;/a&gt;
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23807535&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mochikit+unsubscribe@...&lt;/a&gt;
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/mochikit?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/mochikit?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Widgets-in-mochikit-patches-tp23691799p23807535.html" />
</entry>

</feed>
