You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the text plugin decides to load the .js version of a resource (due to useXhr returning false), load errors are not propagated back to error handler of the require call. With the current implementation users of the text plugin are at the mercy of waitSeconds, which will never timeout if set to 0.
The fix seems simple enough: the (delegate) call to req (currently at line 216 of text.js) could simply take onLoad.error as error handler.
Note: while the defect description looks very similar to #133 it is a different issue.
The text was updated successfully, but these errors were encountered:
@jrburke Could you please comment if this issue is feasible to fix anytime soon? It would severely improve the error handling path of the text plugin for CORS scenarios. (Apologies for the mention to grab your attention).
I am not very active for these projects, they are mostly in low maintenance mode. If you want to test out the change to prove out the solution you propose, feel free to put up a pull request. It sounds like the change is pretty small, so should be straightforward to merge.
If that is not an option due to any work open source policies, you could keep a fork of the project for yourself with the change. This code is very rarely modified these days.
Thank you for the quick reply. I've created Pull Request #140 for your review.
My team does not own the application hosting the component we create, nor its requirejs configuration. It's also the application that provides the version of the text plugin used. It would be best if we can simply message that team to use the latest official version of the text plugin, instead of pointing them to my fork.
When the text plugin decides to load the
.js
version of a resource (due touseXhr
returningfalse
), load errors are not propagated back to error handler of the require call. With the current implementation users of the text plugin are at the mercy ofwaitSeconds
, which will never timeout if set to0
.The fix seems simple enough: the (delegate) call to
req
(currently at line 216 of text.js) could simply takeonLoad.error
as error handler.Note: while the defect description looks very similar to #133 it is a different issue.
The text was updated successfully, but these errors were encountered: