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