Opened 10 years ago

Closed 9 years ago

#14613 closed defect (wontfix)

dojo.back.init() with amd asynch mode

Reported by: wdavidw Owned by: Eugene Lazutkin
Priority: high Milestone: tbd
Component: Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:


Dojo back doesn't work as documented when async mode is set to true.

There could be an obvious way to make it work, but i could find any documentation or fix related to this bug.

Attach is the converted back.html test into async mode with what seems to be a manual fix.

The problem seems to be related to document.write called after body rendering. In this case, the console error message isn't displayed probably because dojo has not yet updated config.afterOnLoad. But i might be wrong.

I wish i could have provided a better attached path but for now, the only solutions i can imagine are:

  1. Update the doc to replace

require(["dojo/back"], function(back){back.init();}); by the 2 lines var src = require.toUrl("../resources/iframe_history.html"); `document.write('<iframe.....');

  1. Include the dojo.back.init function in 'dojo/dojo.js' since is included synchronously by a script tag like require is.
  2. Isolate dojo.back.init into its own file, eg 'dojo/back_init.js' and manually reference it from a script tag in the html page.

Hope it making sense.


Attachments (1)

back_async_mode.diff (892 bytes) - added by wdavidw 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by wdavidw

Attachment: back_async_mode.diff added

comment:1 Changed 10 years ago by bill

Component: GeneralCore
Owner: set to Eugene Lazutkin
Status: newassigned

comment:2 Changed 9 years ago by bill

Component: Core
Resolution: wontfix
Status: assignedclosed

dojo.back is deprecated by dojo.hash

Note: See TracTickets for help on using tickets.