[Dojo-interest] remove node from parser?

Karl Tiedt ktiedt at gmail.com
Sat Aug 9 03:11:30 UTC 2008


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>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>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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://turtle.dojotoolkit.org/pipermail/dojo-interest/attachments/20080808/e5d97de6/attachment.html 


More information about the Dojo-interest mailing list