Opened 7 years ago

Closed 7 years ago

#15766 closed defect (fixed)

_WidgetBase.emit fails if there is no eventObj argument in ie 8.

Reported by: mikerobi Owned by: bill
Priority: undecided Milestone: 1.8
Component: Dijit Version: 1.8.0rc1
Keywords: Cc:
Blocked By: Blocking:

Description

In browsers other than ie <= 8 it is possible to omit the eventObj argument.

This will work in Chrome, Firefox, and ie9, but generates an exception in ie8.

require(["dojo/_base/declare", "dijit/_WidgetBase"], function(declare, _WidgetBase) {
	var MyWidget = declare([_WidgetBase], {
		show: function() {
			return this.emit('show');
		  },
		  onshow: function() {}
	});
	new MyWidget({}).show()
})

Change History (2)

comment:1 Changed 7 years ago by bill

Milestone: tbd1.8
Status: newassigned

Good catch, actually the failure happens if the third argument to emit() is omitted.

comment:2 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [29396]:

apply()'s second argument needs to be an array, fixes #15766 !strict

Note: See TracTickets for help on using tickets.