From 34f76e9a7bb2bcece36ae88e578afd0977b5860b Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 20 Jan 2010 20:42:23 +0000 Subject: [PATCH] MDL-21405 adding global M instance, going to demonstrate how to use it soon, in theory could be reverted if too many ppl protest ;-) --- lib/javascript-static.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 2c95677addf..a82a5a98e7f 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1,6 +1,15 @@ // Miscellaneous core Javascript functions for Moodle // Global instance of YUI3 + +// Global Y instance, inilialised much later in page footer var Y = null; + +// Global M object, this helps with solving of namespace and scope issues +var M = {} + + +// === old legacy JS code, hopefully to be replaced soon by M.xx.yy and YUI3 code === + function popupchecker(msg) { var testwindow = window.open('', '', 'width=1,height=1,left=0,top=0,scrollbars=no'); if (!testwindow) {