UNPKG

core-resource-app-test

Version:

App that contains assets and scripts for the core apps

76 lines (61 loc) 1.91 kB
( 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]\./; if ( !log ) { return; } // Need jQuery 3.0.0+ and no older Migrate loaded if ( !jQuery || rbadVersions.test( jQuery.fn.jquery ) ) { log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" ); } if ( 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 if ( 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 ); if ( 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; } } ); } if ( document.compatMode === "BackCompat" ) { // JQuery has never supported or tested Quirks Mode migrateWarn( "jQuery is not compatible with Quirks Mode" ); }