corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 define( [
2 "../core",
3 "./var/rtagName",
4 "./var/rscriptType",
5 "./wrapMap",
6 "./getAll",
7 "./setGlobalEval"
8 ], function( jQuery, rtagName, rscriptType, wrapMap, getAll, setGlobalEval ) {
9  
10 "use strict";
11  
12 var rhtml = /<|&#?\w+;/;
13  
14 <|&#?\w+;/function buildFragment( elems, context, scripts, selection, ignored ) {
15 <|&#?\w+;/ var elem, tmp, tag, wrap, contains, j,
16 <|&#?\w+;/ fragment = context.createDocumentFragment(),
17 <|&#?\w+;/ nodes = [],
18 <|&#?\w+;/ i = 0,
19 <|&#?\w+;/ l = elems.length;
20  
21 <|&#?\w+;/ for ( ; i < l; i++ ) {
22 <|&#?\w+;/ elem = elems[ i ];
23  
24 <|&#?\w+;/ if ( elem || elem === 0 ) {
25  
26 <|&#?\w+;/ // Add nodes directly
27 <|&#?\w+;/ if ( jQuery.type( elem ) === "object" ) {
28  
29 <|&#?\w+;/ // Support: Android <=4.0 only, PhantomJS 1 only
30 <|&#?\w+;/ // push.apply(_, arraylike) throws on ancient WebKit
31 <|&#?\w+;/ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
32  
33 <|&#?\w+;/ // Convert non-html into a text node
34 <|&#?\w+;/ } else if ( !rhtml.test( elem ) ) {
35 <|&#?\w+;/ nodes.push( context.createTextNode( elem ) );
36  
37 <|&#?\w+;/ // Convert html into DOM nodes
38 <|&#?\w+;/ } else {
39 <|&#?\w+;/ tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
40  
41 <|&#?\w+;/ // Deserialize a standard representation
42 <|&#?\w+;/ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
43 <|&#?\w+;/ wrap = wrapMap[ tag ] || wrapMap._default;
44 <|&#?\w+;/ tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
45  
46 <|&#?\w+;/ // Descend through wrappers to the right content
47 <|&#?\w+;/ j = wrap[ 0 ];
48 <|&#?\w+;/ while ( j-- ) {
49 <|&#?\w+;/ tmp = tmp.lastChild;
50 <|&#?\w+;/ }
51  
52 <|&#?\w+;/ // Support: Android <=4.0 only, PhantomJS 1 only
53 <|&#?\w+;/ // push.apply(_, arraylike) throws on ancient WebKit
54 <|&#?\w+;/ jQuery.merge( nodes, tmp.childNodes );
55  
56 <|&#?\w+;/ // Remember the top-level container
57 <|&#?\w+;/ tmp = fragment.firstChild;
58  
59 <|&#?\w+;/ // Ensure the created nodes are orphaned (#12392)
60 <|&#?\w+;/ tmp.textContent = "";
61 <|&#?\w+;/ }
62 <|&#?\w+;/ }
63 <|&#?\w+;/ }
64  
65 <|&#?\w+;/ // Remove wrapper from fragment
66 <|&#?\w+;/ fragment.textContent = "";
67  
68 <|&#?\w+;/ i = 0;
69 <|&#?\w+;/ while ( ( elem = nodes[ i++ ] ) ) {
70  
71 <|&#?\w+;/ // Skip elements already in the context collection (trac-4087)
72 <|&#?\w+;/ if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
73 <|&#?\w+;/ if ( ignored ) {
74 <|&#?\w+;/ ignored.push( elem );
75 <|&#?\w+;/ }
76 <|&#?\w+;/ continue;
77 <|&#?\w+;/ }
78  
79 <|&#?\w+;/ contains = jQuery.contains( elem.ownerDocument, elem );
80  
81 <|&#?\w+;/ // Append to fragment
82 <|&#?\w+;/ tmp = getAll( fragment.appendChild( elem ), "script" );
83  
84 <|&#?\w+;/ // Preserve script evaluation history
85 <|&#?\w+;/ if ( contains ) {
86 <|&#?\w+;/ setGlobalEval( tmp );
87 <|&#?\w+;/ }
88  
89 <|&#?\w+;/ // Capture executables
90 <|&#?\w+;/ if ( scripts ) {
91 <|&#?\w+;/ j = 0;
92 <|&#?\w+;/ while ( ( elem = tmp[ j++ ] ) ) {
93 <|&#?\w+;/ if ( rscriptType.test( elem.type || "" ) ) {
94 <|&#?\w+;/ scripts.push( elem );
95 <|&#?\w+;/ }
96 <|&#?\w+;/ }
97 <|&#?\w+;/ }
98 <|&#?\w+;/ }
99  
100 <|&#?\w+;/ return fragment;
101 <|&#?\w+;/}
102  
103 <|&#?\w+;/return buildFragment;
104 <|&#?\w+;/} );