Dojo Kernel-dojo/_base/kernel

Source: Internet
Author: User

The Dojo/_base/kernel module is the Dojo Foundation module, which contains the most basic features of dojo. When using dojo, you generally do not need to refer to the module directly unless you extend the toolbox to add additional modules to it. Most dojo core modules rely directly or indirectly on the Dojo/_base/kernel module.

1. Methods

  Deprecated (Behaviour,extra,removal)

When the Isdebug configuration item is True, the method logs a warning message in the console indicating that a behavior is declared as deprecated.

    • Behaviour-string, which is declared an API or behavior that is not approved for use.
    • Extra-string, optional, additional information typically points to APIs or behaviors that are similar to APIs or behaviors that are deprecated.
    • Removal-string, optionally, indicates that the API or behavior will be removed, usually indicating which version will be removed.
1     <Scripttype= "Text/javascript">2         /*3 * Configure Dojo Parameters4          */5 Dojoconfig= {6 has:{7                 //Property Inspection8                 "Dojo-firebug":true9             },Ten Parseonload:false, One foo:"Bar", A Async:true, - Isdebug:true -         }; the     </Script> -     <!--Loading Dojo - -     <Scripttype= "Text/javascript"src= "/dojo/dojo/dojo/dojo.js"></Script> -     <Scripttype= "Text/javascript"> +     /* - * Loading Dojo-related modules and making callbacks +      */ A require ([ at             'Dojo/_base/kernel' -         ],function(kernel) { - kernel.deprecated ("Dijit.layout.SplitContainer","Use Dijit.layout.BorderContainer instead","2.0"); -     }); -     </Script>

  Experimental (Modulename,extra)

When the Isdebug configuration item is True, the method logs a warning message in the console indicating that the method, file, or class is of an experimental nature and has a greater variability.

    • Modulename-string, the name of the method, file, or class.
    • Extra-string, optional, additional tip information.

1 <Scripttype= "Text/javascript">2         /*3 * Configure Dojo Parameters4          */5 Dojoconfig= {6 has:{7                 //Property Inspection8                 "Dojo-firebug":true9             },Ten Parseonload:false, One foo:"Bar", A Async:true, - Isdebug:true -         }; the     </Script> -     <!--Loading Dojo - -     <Scripttype= "Text/javascript"src= "/dojo/dojo/dojo/dojo.js"></Script> -     <Scripttype= "Text/javascript"> +     /* - * Loading Dojo-related modules and making callbacks +      */ A require ([ at             'Dojo/_base/kernel' -         ],function(kernel) { - Kernel.experimental ("Dojo.weather.toKelvin ()","PENDING approval from NOAA"); -     }); -     </Script>
2. Properties

  Locale

Indicates localized information to load the corresponding resource.

  

1 <Scripttype= "Text/javascript">2 require ([3             'Dojo/_base/kernel'4         ],function(kernel) {5 Console.log (Kernel.locale);6     });7   </Script>

Version

Describes the Dojo version information, which is easily modified and should not be used for feature detection, but should only be used during debugging.

The version number consists of four parts:

    • Major-the major version number.
    • Minor-minor version number.
    • Patch-Fixed version number.
    • revision-SVN version number (create this version of SVN version)
1 <Scripttype= "Text/javascript">2 require ([3             'Dojo/_base/kernel'4         ],function(kernel) {5 Console.log (kernel.version);6 Console.log (kernel.version.major);//17 Console.log (kernel.version.minor);//Ten8 Console.log (kernel.version.patch);//49 Console.log (kernel.version.revision);//f4fef70Ten          One     }); A </Script>

Software version number

    1. Major-the major version number. Assemblies with the same name but different major version numbers are not interchangeable.
    2. Minor-minor version number. The major version number is the same but the minor version number differs significantly, with backward compatibility.
    3. Build-build number. The differences in the build number represent the recompilation of the same source.
    4. revision-revision number. Assemblies that have the same name, major version number, and minor version number but different revision numbers should be fully interchangeable. This applies to fixing security vulnerabilities in previously released assemblies.

Dojo Kernel-dojo/_base/kernel

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.