Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#9708 closed task (invalid)

[patch/cla] dijit.getEnclosingWidget using dojo.query

Reported by: Les Owned by:
Priority: low Milestone: tbd
Component: Dijit Version: 1.3.2
Keywords: getEnclosingWidget Cc:
Blocked By: Blocking:

Description

I'm not sure if this would be acceptable since dojo.NodeList?-traverse is required.

dojo.require("dojo.NodeList-traverse");

dijit.getEnclosingWidget = function(/* DOMNode */ node){
	// summary:
	//		Returns the widget whose DOM tree contains the specified DOMNode, or null if
	//		the node is not contained within the DOM tree of any widget
	
	var widgetId = dojo.query(node).closest("[widgetId]").attr("widgetId")[0];
	return dijit.byId(widgetId)
};

Change History (2)

comment:1 Changed 10 years ago by James Burke

Resolution: invalid
Status: newclosed

I am not sure this is needed? There is already a dijit.getEnclosingWidget defined, and while the body of that method is a bit larger than the above call, I believe it will be perform better overall and it also does not require the inclusion of dojo.NodeList?-traverse.

Feel free to reopen if you have other feedback.

comment:2 Changed 10 years ago by bill

Type: enhancementtask

seems like these aren't really enhancements from the users' point of view, labeling as tasks instead

Note: See TracTickets for help on using tickets.