#11964 closed defect (patchwelcome)
[Patch] dojox.html._snarfScripts() should use dojo._getText() instead of dojo.xhrGet()
Reported by: | Thomas Bachem | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.13 |
Component: | Dojox | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
dojox.html._snarfScripts() (which is used by dojox.html.set()) does currently use dojo.xhrGet() to download external Javascript files. It does however not work for cross-domain XHR file retrieval that way.
It should be changed to make use of dojo._getText() instead which is typically used for Javascript file retrieval in Dojo and supports cross-domain XHR calls.
See attached patch, which is already in use at our site.
Attachments (2)
Change History (8)
Changed 10 years ago by
Attachment: | dojoxHtmlSnarfScriptsGetText.patch added |
---|
comment:1 Changed 10 years ago by
Owner: | changed from Adam Peller to Sam Foster |
---|
comment:2 Changed 9 years ago by
comment:3 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Owner: | changed from Sam Foster to bill |
Status: | new → assigned |
OK, that code gets hit by dojox/layout/tests/ContentPane.html.
comment:4 Changed 9 years ago by
Milestone: | 1.8 → future |
---|---|
Owner: | bill deleted |
Status: | assigned → open |
Hmm, but I start getting test errors in dojox/layout/tests/ContentPane.html after updating the code. Both before and after the patch, onLoadDeferred.reject(err) is getting called twice, which causes another exception, but before the patch the exception was suppressed and now after the patch it isn't.
This dojox/layout/ContentPane code seems very fragile, so I'm bailing out of this ticket.
comment:5 Changed 5 years ago by
Milestone: | future → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | open → closed |
At this point (after 3 years since the last effort), we would need an updated patch to consider this. Closing as patchwelcome.
comment:6 Changed 5 years ago by
Given that no one has shown interest in creating a patch in the past 4+ years, I'm closing this as patchwelcome.
I updated the patch but not sure how to test; the regression tests don't seem to call that method at all.