Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#14960 closed feature (fixed)

function to instantiate a node with a specified constructor

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.8
Component: Parser Version: 1.7.2
Keywords: Cc: ykami, Douglas Hays
Blocked By: Blocking:

Description

Add a function to the parser that takes a constructor and a DOMNode, and turns the DOMNode into a widget by reading the widget parameters from the node, excluding data-dojo-type and data-dojo-mixins.

Change History (4)

comment:1 Changed 7 years ago by bill

Milestone: tbd1.8

comment:2 Changed 7 years ago by bill

In [28094]:

Store parser's lowercase --> mixed case map as property of each widget's constructor, rather than in a global _nameMap[] hash.

This is necessary for #14960, since the constructor may have no string ID, and also fixes a subtle bug with the data-dojo-mixins feature #14716: for a node with data-dojo-type="A" and data-dojo-mixins="B, C, D", the parser was still doing a lookup as _nameMap[A], thus not finding the mixed-case methods from B, C, D.

Refs #14716, #14960 !strict.

comment:4 Changed 7 years ago by bill

Resolution: fixed
Status: newclosed

In [28102]:

Refactor parser to expose construct() method for instantiating a single node with a specified class. Fixes #14960 !strict.

comment:5 Changed 7 years ago by bill

Cc: ykami Douglas Hays added
Summary: function to instantiate a single nodefunction to instantiate a node with a specified constructor
Note: See TracTickets for help on using tickets.