Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#44 closed defect (fixed)

Request syntax sugar for pushing an onLoad event listener

Reported by: sjmiles@… Owned by: alex
Priority: low Milestone:
Component: Core Version: 0.0
Keywords: Cc:
Blocked By: Blocking:

Description

We have these options for adding a load-time event listener:

dojo.event.connect(dojo.hostenv, "loaded", "init");

or

dojo.hostenv.modulesLoadedListeners.push(init);

It would be nice to have something simpler for this particular event (as it tends to be sort of 'up front' in the app):

dojo.addOnLoad(init);

or something like that.

Change History (6)

comment:1 Changed 14 years ago by alex

Milestone: 0.1release
Owner: changed from Alex to alex

comment:2 Changed 14 years ago by alex

Component: GeneralCore

comment:3 Changed 14 years ago by alex

Milestone: 0.1release0.2release
Version: 0.0

comment:4 Changed 14 years ago by schontz@…

Milestone: 0.2release0.1release

comment:5 Changed 14 years ago by david

Resolution: fixed
Status: newclosed

(In [1224]) fixes #44, making dojo.addOnLoad available. You can call it like so:

dojo.addOnLoad(fcnPointer) dojo.addOnLoad(obj, fcnName)

comment:6 Changed 12 years ago by (none)

Milestone: 0.1release

Milestone 0.1release deleted

Note: See TracTickets for help on using tickets.