EXT 4 source code (2)-Ext-more.js

Source: Internet
Author: User
Tags html encode html decode delete cache

Source code: Core/src/Ext-more.js

L 44

Will there be 44 rows? I can't help it either. The above are all comments.

There are many annotations in ext. However, these annotations are all document annotations. Few key notes.

L 45

Ext. useragent the navigator. useragent description is used here. Ext judges the browser based on navigator. useragent.

L 46

What is Ext. cache used for this cache? It is where all ext caches are stored.

L 47

Ext. idseed is called a seed. Ext uses idseed to make the ID unique. idseed ++ is used every time it is used.

L 48

Ext. blank_image_url: An empty image is particularly useful in ie6. it can take effect for the inline-block element.

As for the string following Ext. blank_image_url, it is actually the request header information sent to the server requesting this image. It contains the file information for base64 verification. (Thanks for the amendment)

L 49

Ext. isstrict

Strict mode. If you do not understand, you can view the relevant information.

L 50-51

Ext. windowid

Ext.doc umentid

L 57

The start value of Ext. isready is false. True is assigned to Ext. Ready.

L 58

Ext. enablegarbagecollector

Automatic garbage collection is allowed.

This term is advanced.

But here is only the configuration. For details, refer to the usage for further analysis.

L 59

Ext. enablelistenercollection

Same as l58

L 77-98

Ext. ID to generate a unique ID.

L 103-130

Ext. getxxx you may think that these are constants. Why not put them in members directly, for example:

Ext. Body, but use Ext. getbody ()

Because the document. Body Ken does not exist (not loaded) when the Ext-more.js is executed ).

L 139-141

Ext. getcmp get the defined component

Each component has a corresponding ID, which caches the ID to the corresponding component. This function returns components based on the ID.

L 147-148

Ext. getorientation this function is mainly used for mobile platforms.

It determines the current browser direction.

Of course, a simple but good method is used: the length <width is vertical

L 161-179

Ext. Destroy release anything

If it is Dom, it will call Dom's own release.

L 194-204

Ext. Callback

Execute a callback function in a certain scope. Of course, if the callback function is not a function, ignore it.

Ext. Defer is a method for delayed execution.

L 211-223

Ext.html encode

Ext.html decode

The real implementation is not explained here in Ext. String.

L 231-236

Ext. urlappend if there is a URL? Complete & otherwise?

L 240

It is just short. Because Ext. NS is often used

L 243

To accelerate the speed at which the browser finds the undefined, define an undefined.

L 250-279

Browser detection. If you don't understand it, you can search for other content.

L 280-283

This is mainly for IE6, so please do not make the image flash.

L 292

Ext. ssl_secure_url is a blank link, because the controls in ext are generated by JavaScript, and many nodes have the href/src attribute. Change these attributes to Ext. ssl_secure_url. Javascript :"".

However, this is a better solution:

Javascript :;

L 322

Ext. use_native_json

Whether to use native JSON.

I have to admit that the native JSON has two bad points: the attribute must use quotation marks; functions are not supported.
So this option gives the user the final choice.

L 347-370

Ext. getdom is often used.

Obtain a node by ID.

IE6 also returns the node with the name = parameter, so the last filter is used.

L 381-398

Ext. removenode

Delete a node

Delete cache at the same time.

Delete a node in IE6/7 and create a node.

It is mainly used to avoid Memory leakage.

Append the node to another parent node.

This means that the original node has been deleted.

Then the parent node uses innerhtml = ""

Delete a subnode.

Because the parent node is a DIV, you don't have to worry about memory leakage.

L 404-544

Ext. isxxx

L 560-562

Ext. Value

Returned value | Default Value

L 570-572

Ext. escapere replaces the escape.

For example, "A \ '"-> "\\'"

 
L 592-613

Ext. addbehaviors

It is a quick way to bind events

Use the CSS selector @ event to trigger the function format.

L 622-662

Ext. getscrollbarsize/getscrollbarwidth

The size of B is ignored here.

The getscrollbarsize function contains ie9 dedicated hack.

L 686-696

Ext. copyto copies the attributes of the specified attribute name to the object.

L 704-709

Ext. destroymembers

Use Ext. Destroy to release members

L 730-831

Ext. Log outputs a log.

L 857-863

Ext. Partition separates members that meet one condition in the array from others.

L 878-889

Ext. Invoke calls a function for each member of the array.

Ls911-949

Ext.zip

Ext. tosentence

Outdated things, not discussed.

L 958

Ext. useshims

It is also an hack for IE6 flash.

L 969-972

When Ext. application is loaded, an Ext. App. application is created.

End

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.