[Dojo-interest] remove node from parser?

Peter E Higgins dante at dojotoolkit.org
Sat Aug 9 03:33:59 UTC 2008


So dojo.behavior might be something you'd like to look into ... it 
allows you to setup query-based selectors, and anytime the dom changes, 
you simply dojo.behavior.apply() the rules, and .add({}) them as you 
like, and viola ...

hope this helps ...

Regards,
Peter Higgins

Maulin Shah wrote:
> oh. actually its not so much that i thought they were listening 
> creatures as that i thought they would return the same INSTANCE of the 
> node. but so long as I know its IMPOSSIBLE, then I have plenty of ways 
> to work around the problem. 
> thanks!
>
> -maulin
> On Aug 8, 2008, at 8:11 PM, Karl Tiedt wrote:
>
>> You are assuming that a NodeList is a living creature that 
>> automatically updates anytime the DOM changes.. .and that just isnt 
>> efficient... NodeLists are static until you call a new query to the 
>> same var name...
>>
>> -Karl Tiedt
>>
>>
>> On Fri, Aug 8, 2008 at 6:36 PM, Maulin Shah, MD 
>> <maulinpshah at gmail.com <mailto:maulinpshah at gmail.com>> wrote:
>>
>>     I was afraid of that. But I still don't understand why?
>>
>>     if you do a dojo.query() and get a NodeList. call it A
>>
>>     then do a differnet dojo.query and get a different NodeList that
>>     has some intersection with the first. call it B
>>
>>     then when you change the attributes of the nodes in B that are
>>     also in B, shouldn't they also be changed in A?
>>
>>
>>     On Fri, Aug 8, 2008 at 12:04 PM, Morgan C. Benton
>>     <morgan at morphatic.com <mailto:morgan at morphatic.com>> wrote:
>>
>>         Hi Maulin,
>>
>>         When does the parser get triggered?  If you've got it in
>>         djConfig="parseOnLoad:true" then I don't think there's an
>>         easy way to
>>         exempt a node from parsing.  However, if you initiate the parser
>>         manually then you can choose when and over what scope of
>>         elements it
>>         gets called.  For example, the code below would parse any
>>         elements
>>         within the element with id="foo" when the page loads, but
>>         would not
>>         parse any elements outside of foo.
>>
>>         dojo.addOnLoad(function() {
>>            var foo = dojo.byId("foo");
>>            dojo.parser.parse(foo);
>>         });
>>
>>         Of course the other option is not to include the nodes with
>>         dojoType="..." in your HTML and add them dynamically later
>>         when you want
>>         them.
>>
>>         hth,
>>         Morgan
>>
>>
>>
>>         _______________________________________________
>>         FAQ: http://dojotoolkit.org/support/faq
>>         Book: http://dojotoolkit.org/docs/book
>>         Forums: http://dojotoolkit.org/forum
>>         Dojo-interest at dojotoolkit.org
>>         <http://dojotoolkit.org/forumDojo-interest@dojotoolkit.org>
>>         http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>>
>>
>>
>>     -- 
>>     -maulin
>>
>>     _______________________________________________
>>     FAQ: http://dojotoolkit.org/support/faq
>>     Book: http://dojotoolkit.org/docs/book
>>     Forums: http://dojotoolkit.org/forum
>>     Dojo-interest at dojotoolkit.org
>>     <http://dojotoolkit.org/forumDojo-interest@dojotoolkit.org>
>>     http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>>
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://dojotoolkit.org/docs/book
>> Forums: http://dojotoolkit.org/forum
>> Dojo-interest at dojotoolkit.org <mailto:Dojo-interest at dojotoolkit.org>
>> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at dojotoolkit.org
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>   



More information about the Dojo-interest mailing list