From f260850efc88c33f83f01cf17de6ebb94da181fc Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Fri, 6 Dec 2013 17:27:41 +0800 Subject: [PATCH] MDL-43243 JavaScript: Deprecate addonload --- lib/javascript-static.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 3d08f5524e0..4475f5ab020 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1182,8 +1182,11 @@ function insertAtCursor(myField, myValue) { Call instead of setting window.onload directly or setting body onload=. Adds your function to a chain of functions rather than overwriting anything that exists. + @deprecated Since Moodle 2.7. This will be removed in Moodle 2.9. */ function addonload(fn) { + Y.log('addonload has been deprecated since Moodle 2.7 and will be removed in Moodle 2.9', + 'warn', 'javascript-static.js'); var oldhandler=window.onload; window.onload=function() { if(oldhandler) oldhandler();