Bug #1429
closedrequire() causes errors in WidgetSet mode
0%
Description
Calling require() in WidgetSet mode prevents Wt from including internal jquery into output.
Wt 3.2.1
Files
Updated by Koen Deforche about 12 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
- Target version set to 3.2.3
Updated by Koen Deforche about 12 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
Updated by Boris Nagaev about 12 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
for JQuery and other "required" things alongside of
for widget set:
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' type='text/javascript'></script>
<script src='/text.js' type='text/javascript'></script>
Updated by Koen Deforche about 12 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
Updated by Koen Deforche about 12 years ago
- Status changed from Resolved to Closed