Actions
Bug #1429
closed
BN
KD
require() causes errors in WidgetSet mode
Bug #1429:
require() causes errors in WidgetSet mode
Start date:
09/07/2012
Due date:
% Done:
0%
Estimated time:
Description
Calling require() in WidgetSet mode prevents Wt from including internal jquery into output.
Wt 3.2.1
Files
KD Updated by Koen Deforche almost 14 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
- Target version set to 3.2.3
KD Updated by Koen Deforche almost 14 years ago
- Status changed from InProgress to Feedback
Hey,
I can't reproduce that. In either case (widgetset or plain application), the JQuery script is included as the first part of the "Wt script" ?
Perhaps there is some other reason that you get an error? Do you have a test-case or hints on how to reproduce this ?
Regards,
koen
BN Updated by Boris Nagaev almost 14 years ago
- File widget-set-require.cpp widget-set-require.cpp added
- File text-bug.js text-bug.js added
- File text-ok.js text-ok.js added
Hello!
Here is a test case for this.
If require is not commented out, the following error is produced in google chrome inspector: "Uncaught ReferenceError: $ is not defined".
Temporary workaround: add
<script> for JQuery and other "required" things alongside of <script> for widget set: <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' type='text/javascript'></script>KD Updated by Koen Deforche almost 14 years ago
- Status changed from Feedback to Resolved
Hey,
That didn't work (anymore) indeed. As mentioned elsewhere, you'll need to use requireJQuery() in Wt 3.2.3 to load the custom JQuery library.
Regards,
koen
KD Updated by Koen Deforche almost 14 years ago
- Status changed from Resolved to Closed
Actions