Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13034 closed defect (fixed)

on.js refs unresolved listen variable

Reported by: bill Owned by: Kris Zyp
Priority: high Milestone: 1.7
Component: Events Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

var on = function(target, type, listener, dontFix){
	if(!listener){
		// two args, do pub/sub
		return on(listen, target, type);
	}

Presumably there's also a missing test case for that block of code

Change History (6)

comment:1 Changed 8 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

(In [25127]) Fix on variable references, fixes #13034 !strict

comment:2 Changed 8 years ago by bill

It would really be better if you had a test for publish/subscribe. You've documented the on.publish() method and using on() w/2 parameters to subscribe to published topics, yet tests/on.js doesn't have any tests for this.

comment:3 Changed 8 years ago by Kris Zyp

Resolution: fixed
Status: closedreopened

Sorry, I've been waffling on if pub/sub subscription is the best use of the 2 parameter case (vs registering a listener for the windows object). I'll make the test case.

comment:4 Changed 8 years ago by Kris Zyp

Also wondering on/on.publish pub/sub should support wildcard topics. Might be nice.

comment:5 Changed 8 years ago by Kris Zyp

Resolution: fixed
Status: reopenedclosed

(In [25139]) Added pub/sub unit test, condensed connect code a little more, fixes #13034 !strict

comment:6 in reply to:  4 Changed 8 years ago by dante

Replying to kzyp:

Also wondering on/on.publish pub/sub should support wildcard topics. Might be nice.

it's be brought up before. we decided the overhead of glob support in pub/sub would be too much, and that an extended pub/sub built on top would be better. guess it depends on how small/fast you can make glob support. but I'd say for now (1.x) lets leave it as simple parity with dojo.pub/sub and readdress globbing in 2.0

Note: See TracTickets for help on using tickets.