mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Core: Support non-browser environments
Fixes gh-2133
Fixes gh-2501
Closes gh-2504
Refs gh-1950
Refs gh-1949
Refs gh-2397
Refs gh-1537
Refs gh-2504
Refs 842958e7ae
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
define([
|
||||
"../var/document",
|
||||
"../var/support"
|
||||
], function( support ) {
|
||||
], function( document, support ) {
|
||||
|
||||
(function() {
|
||||
// Minified: var a,b,c,d,e
|
||||
var input, div, select, a, opt;
|
||||
var a,
|
||||
input = document.createElement( "input" ),
|
||||
div = document.createElement( "div" ),
|
||||
select = document.createElement( "select" ),
|
||||
opt = select.appendChild( document.createElement( "option" ) );
|
||||
|
||||
// Setup
|
||||
div = document.createElement( "div" );
|
||||
div.innerHTML = " <link/><a href='/a'>a</a><input type='checkbox'/>";
|
||||
a = div.getElementsByTagName("a")[ 0 ];
|
||||
div.innerHTML = " <link/><a href='/a'>a</a>";
|
||||
// Support: Windows Web Apps (WWA)
|
||||
// `type` must use .setAttribute for WWA (#14901)
|
||||
input.setAttribute( "type", "checkbox" );
|
||||
div.appendChild( input );
|
||||
|
||||
a = div.getElementsByTagName( "a" )[ 0 ];
|
||||
|
||||
// First batch of tests.
|
||||
select = document.createElement("select");
|
||||
opt = select.appendChild( document.createElement("option") );
|
||||
input = div.getElementsByTagName("input")[ 0 ];
|
||||
|
||||
a.style.cssText = "top:1px";
|
||||
|
||||
// Get the style information from getAttribute
|
||||
|
||||
Reference in New Issue
Block a user