MDL-21405 adding global M instance, going to demonstrate how to use it soon, in theory could be reverted if too many ppl protest ;-)

This commit is contained in:
Petr Skoda
2010-01-20 20:42:23 +00:00
parent 227255b802
commit 34f76e9a7b
+9
View File
@@ -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) {