Projet

Général

Profil

Paste
Télécharger (2,42 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / libraries / flexslider-2.5.0 / bower_components / jquery / src / manipulation / support.js @ 0aee3c58

1
define([
2
        "../var/support"
3
], function( support ) {
4

    
5
(function() {
6
        // Minified: var a,b,c
7
        var input = document.createElement( "input" ),
8
                div = document.createElement( "div" ),
9
                fragment = document.createDocumentFragment();
10

    
11
        // Setup
12
        div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
13

    
14
        // IE strips leading whitespace when .innerHTML is used
15
        support.leadingWhitespace = div.firstChild.nodeType === 3;
16

    
17
        // Make sure that tbody elements aren't automatically inserted
18
        // IE will insert them into empty tables
19
        support.tbody = !div.getElementsByTagName( "tbody" ).length;
20

    
21
        // Make sure that link elements get serialized correctly by innerHTML
22
        // This requires a wrapper element in IE
23
        support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
24

    
25
        // Makes sure cloning an html5 element does not cause problems
26
        // Where outerHTML is undefined, this still works
27
        support.html5Clone =
28
                document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
29

    
30
        // Check if a disconnected checkbox will retain its checked
31
        // value of true after appended to the DOM (IE6/7)
32
        input.type = "checkbox";
33
        input.checked = true;
34
        fragment.appendChild( input );
35
        support.appendChecked = input.checked;
36

    
37
        // Make sure textarea (and checkbox) defaultValue is properly cloned
38
        // Support: IE6-IE11+
39
        div.innerHTML = "<textarea>x</textarea>";
40
        support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
41

    
42
        // #11217 - WebKit loses check when the name is after the checked attribute
43
        fragment.appendChild( div );
44
        div.innerHTML = "<input type='radio' checked='checked' name='t'/>";
45

    
46
        // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
47
        // old WebKit doesn't clone checked state correctly in fragments
48
        support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
49

    
50
        // Support: IE<9
51
        // Opera does not clone events (and typeof div.attachEvent === undefined).
52
        // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
53
        support.noCloneEvent = true;
54
        if ( div.attachEvent ) {
55
                div.attachEvent( "onclick", function() {
56
                        support.noCloneEvent = false;
57
                });
58

    
59
                div.cloneNode( true ).click();
60
        }
61

    
62
        // Execute the test only if not already executed in another module.
63
        if (support.deleteExpando == null) {
64
                // Support: IE<9
65
                support.deleteExpando = true;
66
                try {
67
                        delete div.test;
68
                } catch( e ) {
69
                        support.deleteExpando = false;
70
                }
71
        }
72
})();
73

    
74
return support;
75

    
76
});