Code coverage report for src\migrate.js

Statements: 78.13% (25 / 32)      Branches: 60.71% (17 / 28)      Functions: 100% (6 / 6)      Lines: 78.13% (25 / 32)      Ignored: none     

All files » src/ » migrate.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76  1         1 1     1         1     1         1           1     1     1 1       1 53 53     1 79 79 49 49 49                 1 9       6 6         1          
 
( function() {
 
	// Support: IE9 only
	// IE9 only creates console object when dev tools are first opened
	// Also, avoid Function#bind here to simplify PhantomJS usage
	var log = window.console && window.console.log &&
			function() { window.console.log.apply( window.console, arguments ); },
		rbadVersions = /^[12]\./;
 
	Iif ( !log ) {
		return;
	}
 
	// Need jQuery 3.0.0+ and no older Migrate loaded
	Iif ( !jQuery || rbadVersions.test( jQuery.fn.jquery ) ) {
		log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" );
	}
	Iif ( jQuery.migrateWarnings ) {
		log( "JQMIGRATE: Migrate plugin loaded multiple times" );
	}
 
	// Show a message on the console so devs know we're active
	log( "JQMIGRATE: Migrate is installed" +
		( jQuery.migrateMute ? "" : " with logging active" ) +
		", version " + jQuery.migrateVersion );
 
} )();
 
var warnedAbout = {};
 
// List of warnings already given; public read only
jQuery.migrateWarnings = [];
 
// Set to false to disable traces that appear with warnings
Eif ( jQuery.migrateTrace === undefined ) {
	jQuery.migrateTrace = true;
}
 
// Forget any warnings we've already given; public
jQuery.migrateReset = function() {
	warnedAbout = {};
	jQuery.migrateWarnings.length = 0;
};
 
function migrateWarn( msg ) {
	var console = window.console;
	if ( !warnedAbout[ msg ] ) {
		warnedAbout[ msg ] = true;
		jQuery.migrateWarnings.push( msg );
		Iif ( console && console.warn && !jQuery.migrateMute ) {
			console.warn( "JQMIGRATE: " + msg );
			if ( jQuery.migrateTrace && console.trace ) {
				console.trace();
			}
		}
	}
}
 
function migrateWarnProp( obj, prop, value, msg ) {
	Object.defineProperty( obj, prop, {
		configurable: true,
		enumerable: true,
		get: function() {
			migrateWarn( msg );
			return value;
		}
	} );
}
 
Iif ( document.compatMode === "BackCompat" ) {
 
	// JQuery has never supported or tested Quirks Mode
	migrateWarn( "jQuery is not compatible with Quirks Mode" );
}