Feature #7968
closedRevert delay of WWidget::load()
100%
Description
Issue #4888 called for the delay of WWidget::load()
until after rendering.
A common use case for load()
is to lazily create and add a widget to the widget tree, like DeferredWidget
in the widget gallery.
Some of those widgets may use require()
to load JavasScript, which when done post-render can lead to issues related to the order in which JavaScript is loaded and lead to JavaScript errors.
The original motivation for issue #4888 was that a child may be added to the parent in their constructor before the child is sufficiently initialized. This is no longer possible in Wt 4, so that reason is no longer valid.
We can prevent JavaScript issues by reversing that change in Wt 4.
Files
Updated by Roel Standaert almost 4 years ago
- File lazyMenu.cpp lazyMenu.cpp added
Attaching an example application that shows an error when clicking on the "TinyMCE" menu option.
Updated by Roel Standaert almost 4 years ago
- Status changed from New to Resolved
Updated by Roel Standaert almost 3 years ago
- Status changed from Resolved to Closed