Easyui Study Summary (iv)--parser source analysis

Source: Internet
Author: User

Easyui Study Summary (iv)--parser source analysis

The parser module is the first loaded module of Easyloader, and its main function is to scan the class tag at the beginning of Easyui on the page and initialize it as a Easyui control.

 1/** 2 * Parser module is mainly to parse the page Easyui control 3 */4 $.parser = {5//whether automatic resolution 6 Auto:true, 7 8 The control can be parsed 9 plugins:[' LinkButton ', ' menu ', ' Menubutton ', ' SplitButton ', ' layout ', ' Tree ', ' Window ', ' dialog ', ' DataGrid ', One ' ComboBox ', ' Combotree ', ' numberbox ', ' Validatebox ', ' Cal '             Endar ', ' datebox ', ' Panel ', ' tabs ', ' accordion ' 13],14 15//Analytic function parse:function (context) {17 if ($.parser.auto) {(var i=0; i<$.parser.plugins.length; i++) {(functi                         On () {20//control name var name = $.parser.plugins[i];22                         Find the JQ object with Class easyui-control name, for example, easyui-layout23 var r = $ ('. easyui-' + name, context); 24 25 if (r.length) {26//If there is this object, then determine if it has an initialization function, if (r [Name])              {28                   If there is a direct call to R[name] (), and the Else if (window . easyloader) {31//If the module's JS file is not loaded in Easyloader, then call the Easyl                             Oader.load (name, function () {r[name] (); 34}) 35         }36}37}); 38}39}40 }41};42 43//Call the Parse method, actually the Easyloader has already been called, I estimate this is to give not easyloader load when used by the $ (function () {$.parser . Parse (); (););) (jQuery);

Easyui Study Summary (iv)--parser source analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.