Opened 8 years ago
Closed 8 years ago
#16273 closed defect (fixed)
Calling this.set() in postMixInProperties causes TypeError
Reported by: | Kris Zyp | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | Dijit | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Calling a this.set() in postMixInProperties functioned properly in 1.6, but in 1.7 this no longer works. Before the buildRendering is called and the DOM nodes are set as properties, the set() method on dijit/_WidgetBase will try to access the default node and fail in trying to iterate over the attributes.
Attachments (1)
Change History (3)
Changed 8 years ago by
Attachment: | set-postMixInProperties.patch added |
---|
comment:1 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|
Note: See
TracTickets for help on using
tickets.
Like I said in #15953, for any custom setter that accesses the DOM, calling it in postMixInProperties() has always caused an exception.
It is true about the regression where calling set("foo", "bar") fails, even though there's no custom setter for "foo".
There's also a gray area for calls like set("role", ...), where the code you mentioned tries to automatically map "role" to the this.domNode or this.focusNode, even though there's no explicit custom setter. Set() calls like that will get an exception in postMixInProperties(), rather than not doing anything. I'm not sure which way is better.