Changes between Initial Version and Version 1 of Ticket #9850


Ignore:
Timestamp:
Sep 8, 2009, 7:23:38 PM (10 years ago)
Author:
Eugene Lazutkin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9850

    • Property Owner changed from anonymous to alex
  • Ticket #9850 – Description

    initial v1  
    1 The following simple snippet of code does not work in ff3.5:[[BR]]
    2 dojo.query("> [widgetId]", undefined);[[BR]]
     1The following simple snippet of code does not work in ff3.5:
    32
    4 The error you get is "tret is undefined".[[BR]]
    5 When no node is provided to dojo.query it takes the dojo.doc instead which is fine in earlier versions of ff. But, in ff3.5 the childNodesName is detected to be "children" instead of "childNodes" The check is for children being available on the firstChild of dojo.doc, but when dojo.query is called it must be available on dojo.doc directly which it isn't (no idea why ff3.5 works this way though).[[BR]]
     3{{{
     4#!js
     5dojo.query("> [widgetId]", undefined);
     6}}}
    67
    7 This appeared for me when I had constructed a dijit with a grid inside without a explicit containerNode. On startup when getChildren is called on the grid it calls dojo.query without a node (since this.containerNode is not defined) and the error occurs.[[BR]]
     8The error you get is {{{"tret is undefined"}}}.
     9
     10When no node is provided to dojo.query it takes the dojo.doc instead which is fine in earlier versions of ff. But, in ff3.5 the childNodesName is detected to be "children" instead of "childNodes" The check is for children being available on the firstChild of dojo.doc, but when dojo.query is called it must be available on dojo.doc directly which it isn't (no idea why ff3.5 works this way though).
     11
     12This appeared for me when I had constructed a dijit with a grid inside without a explicit containerNode. On startup when getChildren is called on the grid it calls dojo.query without a node (since this.containerNode is not defined) and the error occurs.
    813
    914Hence, there is a simple workaround, make sure dojo.query is never called wihout a node, in my case it was enough to make sure the containerNode is defined. But dojo.query should not break down so easily.