We previously had a global Y (simpleyui) and a separate Y created
to put Y in scope for all our modules. This meant that we had 2
separate sandboxes for YUI, which means that modules are duplicated,
and events do not fire across YUI instances.
This change merges the 2 instances, so any code refering to Y will
get the same instance of YUI (amd code, yui modules, static init code etc).
Thanks to Andrew Nicols!
$jsinit = $this->get_javascript_init_code();
$handlersjs = $this->get_event_handler_code();
- // There is no global Y, make sure it is available in your scope.
- $js = "YUI().use('node', function(Y) {\n{$inyuijs}{$ondomreadyjs}{$jsinit}{$handlersjs}\n});";
+ // There is a global Y, make sure it is available in your scope.
+ $js = "(function() {{$inyuijs}{$ondomreadyjs}{$jsinit}{$handlersjs}})();";
$output .= html_writer::script($js);
https://docs.moodle.org/dev/version.php for details (MDL-48494).
* PHPUnit is upgraded to 4.7. Some tests using deprecated assertions etc may need changes to work correctly.
* Users of the text editor API to manually create a text editor should call set_text before calling use_editor.
+* Javascript - SimpleYUI and the Y instance used for modules have been merged. Y is now always the same instance of Y.
* get_referer() has been deprecated, please use the get_local_referer function instead.
* \core\progress\null is renamed to \core\progress\none for improved PHP7 compatibility as null is a reserved word (see MDL-50453).
* \webservice_xmlrpc_client now respects proxy server settings. If your XMLRPC server is available on your local network and not via your proxy server, you may need to add it to the list of proxy