src/attributes/support.js

Maintainability

67.60

Lines of code

33

Created with Raphaël 2.1.002550751002016-7-102016-6-102016-5-112016-4-112016-3-122016-2-112016-1-12

2016-8-9
Maintainability: 67.6

Created with Raphaël 2.1.00102030402016-7-102016-6-102016-5-112016-4-112016-3-122016-2-112016-1-12

2016-8-9
Lines of Code: 33

Difficulty

9.00

Estimated Errors

0.15

Function weight

By Complexity

Created with Raphaël 2.1.0<anonymous>1

By SLOC

Created with Raphaël 2.1.0<anonymous>30
1
define( [
2
    "../var/document",
3
    "../var/support"
4
], function( document, support ) {
5
 
6
"use strict";
7
 
8
( function() {
9
    var input = document.createElement( "input" ),
10
        select = document.createElement( "select" ),
11
        opt = select.appendChild( document.createElement( "option" ) );
12
 
13
    input.type = "checkbox";
14
 
15
    // Support: Android <=4.3 only
16
    // Default value for a checkbox should be "on"
17
    support.checkOn = input.value !== "";
18
 
19
    // Support: IE <=11 only
20
    // Must access selectedIndex to make default options select
21
    support.optSelected = opt.selected;
22
 
23
    // Support: IE <=11 only
24
    // An input loses its value after becoming a radio
25
    input = document.createElement( "input" );
26
    input.value = "t";
27
    input.type = "radio";
28
    support.radioValue = input.value === "t";
29
} )();
30
 
31
return support;
32
 
33
} );