#15216 closed task (fixed)
reduce/eliminate dependence on dojo/_base/window::doc "global"
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8 |
Component: | Dijit | Version: | 1.7.2 |
Keywords: | Cc: | Akira Sudoh | |
Blocked By: | Blocking: |
Description (last modified by )
There are lots of places in dijit that reference dojo/_base/window::doc (aka win.doc or dojo.doc) either directly, or indirectly, for example win.body(). But each widget essentially has a document that is set at construction time, usually implied by srcNodeRef.ownerDocument. So, widgets' references to win.doc typically create an unnecessary dependency on dojo/_base/window, and also preclude creating those widgets in another frame.
Most of the code in core doesn't have this problem. dom.byId(), for example, takes an optional document argument, and domConstruct.place() can infer the document via the refNode However, there are a few places in core that should be cleaned as it makes unnecessary assumptions about which document to use.
So, this ticket covers adding a this.doc member to _WidgetBase to point to the widget's document, removing unnecessary references to win.doc for dijit widgets, and cleaning up a few spots in core.
See spreadsheet from Akira for list of places to update.
Attachments (1)
Change History (29)
comment:1 Changed 9 years ago by
Cc: | Akira Sudoh added |
---|---|
Milestone: | tbd → 1.8 |
Owner: | set to bill |
Status: | new → assigned |
Type: | defect → task |
comment:2 Changed 9 years ago by
Changed 9 years ago by
Attachment: | selectionWindowParam.patch added |
---|
patch against [28413] to add window param to selection API methods that don't have a DOMNode, saved for posterity
comment:14 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In [28401]: