Dojo trial notes 4-dojo basics [original]

Source: Internet
Author: User

I mentioned some of the Ajax aspects of dojo. I feel that it is necessary to thoroughly understand some of the internal content of dojo, so I want to look at the content of dojo and try again :-)
I read some official documents and have some experience.
Dojo. after Javascript is included, some objects and functions can be used. When using jseclipse for editing, you can see some, but they are included in Dojo. in JS, the official website also said that the bootup file was included. I checked out bootstrap1.js and bootstrap2.js. However, the objects cannot be directly displayed and it is estimated that there is something to set, clear the information and add it again.
Available items include:
1. dojo. Render object: This object stores some information about the dojo runtime environment.
Dojo. Render. Name: According to dojo. Render. Name = navigator. appname, you can know that this is the name of the browser, but it is displayed as null. It is estimated that it has not been assigned a value and runs

1 dojo. Render. Name = navigator. appname;
2 alert (Dojo. Render. Name );

I came out with Microsoft Internet Explorer.
Dojo. Render. OS: The name is related to the operating system. This is true. This property is printed directly as a [object], which can be known as an object. After checking the source code, we found that this object has three attributes: dojo. render. OS. OSX. When the operating system is "MACOs", the value is true; dojo. render. OS. in Linux, when the operating system is "Linux", it is true; dojo. render. OS. in Windows, the value is true. The default values of the three attributes are false. When dojo is entered, a certain attribute is assigned true. In Windows, of course, dojo. Render. OS. Win is set to true. Based on the source code, if not, dojo. Render. OS. Linux will be assigned true.
Dojo. render. ver, said on the official website with dojo. the version is the same, but when I print it, I find it wrong. I checked the code and found the following section: dojo. render. ver = parsefloat (navigator. appversion, 10) is related to the browser version. render. the ver value is 4. Find dojo. version again and find the following section:

Dojo. Version = {
Major: 0, minor: 2, Patch: 2, flag :"",
Revision: Number ("$ Rev: 2836 $". Match (/[0-9] +/) [0]),
Tostring: function (){
With (Dojo. Version ){
Return major + "." + minor + "." + patch + flag + "(" + revision + ")";
}
}
};

Print the dojo. version, which is 0.2.2 (2836.
Dojo.render.html, which is also an object, has several attributes. Dojo.render.html. Capable: whether the host environment supports html. Generally, it is true. Others are related to the browser type and are Boolean. Dojo.render.html. moz: true when the browser is Mozilla or Mozilla's core browser (such as Firefox); dojo.render.html.safari. when using Apple's safariviewer, true, dojo.render.html. IE, this attribute is true for normal machines, because we basically use Microsoft Internet assumer, that is, the IE browser uses dojo.render.html.opera, And the runtime of the operabrowser is true‑dojo.render.html. khtml: Use the khtml browser (for example, Konqueror, but I have never heard of this kind of khtml browser before. Others know that it seems that I still have insufficient knowledge. Alas ~) Is true. The dojo.render.html object is mainly used to determine the browser type. Dojo.render.html. ie on my machine is true.
Invalid. capable is also false. SWF here does not refer to Flash SWF, but simple Web framework. Simple Web Framework (SWF) is an event-based Web framework. it is suitable for struts developers who want to develop fat client Web applications but do not want to turn to JSF. SWF, like struts, is built on Jakarta commons, but uses a different request processor. SWF event model supports event submission based on XMLHttpRequest. As for dojo. Render. SWT, it is unclear. Is it related to SWT in Java? The other properties of these four objects are not shown in the source code ?? I will try again later.
2. the dojo. Version object. This object has been mentioned above. It is the version of the dojo library file, and there is no better research.
3. dojo. hostenv object. I personally think that the content is very informative, but it takes too much time to talk about it. For details, refer to the hostenv_xxx.js files in the source code, dojo. hostenv. the gettext function and dojo. hostenv. the println function is interesting. You can add it later.
The following describes some basic functions in Dojo.
  
To be continued...

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.