Opened 10 years ago

Last modified 7 years ago

#15216 closed task

reduce/eliminate dependence on dojo/_base/window::doc "global" — at Initial Version

Reported by: bill Owned by:
Priority: undecided Milestone: 1.8
Component: Dijit Version: 1.7.2
Keywords: Cc: Akira Sudoh
Blocked By: Blocking:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.