Opened 11 years ago

Closed 6 years ago

Last modified 6 years ago

#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:


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)

dojoxHtmlSnarfScriptsGetText.patch (546 bytes) - added by Thomas Bachem 11 years ago.
getText.patch (1.3 KB) - added by bill 10 years ago.
updated patch

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by Thomas Bachem

comment:1 Changed 11 years ago by Adam Peller

Owner: changed from Adam Peller to Sam Foster

comment:2 Changed 10 years ago by bill

I updated the patch but not sure how to test; the regression tests don't seem to call that method at all.

comment:3 Changed 10 years ago by bill

Milestone: tbd1.8
Owner: changed from Sam Foster to bill
Status: newassigned

OK, that code gets hit by dojox/layout/tests/ContentPane.html.

comment:4 Changed 10 years ago by bill

Milestone: 1.8future
Owner: bill deleted
Status: assignedopen

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.

Changed 10 years ago by bill

Attachment: getText.patch added

updated patch

comment:5 Changed 6 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: openclosed

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 6 years ago by dylan

Given that no one has shown interest in creating a patch in the past 4+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.