0

Dojo's tutorial calls for using topic.subscribe to catch the onHashChange event - use of topic is heavy and is frowned upon within the organization, is there any way I can use dojo/on to catch and handle onHashChange?

antonpug
  • 11,964
  • 27
  • 76
  • 120

1 Answers1

0

You could find out where the onHashChange publish event is triggered within the dojo / hash code and use dojo/stateful to link to that property.

Dojo already uses topic.publish to publish the change. So you are already make unwanted use of the bad (?) topic module. If you don't want to use it, maybe you have to look into the dojo/hash module and check out how they extract the hash change from the browser...

Lucian Depold
  • 1,963
  • 2
  • 14
  • 25