Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

JavaScript usage guide: Difference between revisions

From MoodleDocs
No edit summary
(Replaced content with "{{obsolete}} The text for this page has been deleted because it was out of date and no longer relevant. See Javascript_Modules for information on Javascript coding gu...")
 
(12 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Work in progress}}
{{obsolete}}
{{Infobox Project
|name = Javascript usage guide
|state = Work in progress
|tracker = MDL-21240
|discussion = n/a, developer chat only
|assignee = [[User:Petr Škoda (škoďák)|Petr Škoda (škoďák)]] + feedback and ideas from Sam and Dongsheng, based on previous work of Nicolas and Tim
}}
{{Moodle 2.0}}


 
The text for this page has been deleted because it was out of date and no longer relevant. See [[Javascript_Modules]] for information on Javascript coding guidelines in Moodle. To view the previous text for this page check the history.
=Goals=
* standardised usage of Javascript code in Moodle
* improved performance
* improve and simplify JS related APIs
 
=API overview=
 
Types of JS code in 1.9:
* JS scripts linked from page head
* JS linked and executed from page head
* inline Javascript
* global JS variables
 
 
Overview of JavaScript usage in 2.0
* all JS stored in one global M namespace
* majority of JS logic moved into page footer
* loading of javascript modules handled by YUI3 loader
* all plugins support module.js files
* most JS is initialised through $PAGE->requires->js_init_call()
* full migration to YUI3, YUI2 modules are loaded on demand only
 
=Sample usage of JavaScript in module=
 
 
=Description of M namespace=
 
 
=Performance improvements=
 
 
=Migration and code upgrade steps=
 
 
==Deprecated coding style==
 
=Links=
* [[Create_YUI3_Module_For_Moodle]]

Latest revision as of 02:22, 20 June 2017

Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.


The text for this page has been deleted because it was out of date and no longer relevant. See Javascript_Modules for information on Javascript coding guidelines in Moodle. To view the previous text for this page check the history.