#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 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
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 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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 follow-up: 6 Changed 11 years ago by
Also wondering on/on.publish pub/sub should support wildcard topics. Might be nice.
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:6 Changed 11 years ago by
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
(In [25127]) Fix on variable references, fixes #13034 !strict