Opened 9 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: |
Description
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:
- 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.....');
- Include the
dojo.back.init
function in 'dojo/dojo.js' since is included synchronously by a script tag like require is. - 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.
d.
Attachments (1)
Change History (3)
Changed 9 years ago by
Attachment: | back_async_mode.diff added |
---|
comment:1 Changed 9 years ago by
Component: | General → Core |
---|---|
Owner: | set to Eugene Lazutkin |
Status: | new → assigned |
comment:2 Changed 9 years ago by
Component: | Core |
---|---|
Resolution: | → wontfix |
Status: | assigned → closed |
dojo.back is deprecated by dojo.hash