[Dojo-interest] remove node from parser?

Karl Tiedt ktiedt at gmail.com
Sat Aug 9 03:37:51 UTC 2008


If you are calling the parser (dojo.parser.parse(); ... it is impossible
AFAIK... if you want to get creative you could do a query yourself and
instantiate each dijit manually via a forEach across the nodelist and during
the forEach compare the node to a "ignore list" and skip it....

-Karl Tiedt


On Fri, Aug 8, 2008 at 10:22 PM, Maulin Shah <maulinpshah at gmail.com> 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>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
>>
>>
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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/1955991a/attachment.html 


More information about the Dojo-interest mailing list