Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A development tool to help migrate away from APIs and features that have been or will be removed from jQuery core

License

NotificationsYou must be signed in to change notification settings

jquery/jquery-migrate

 
 

Repository files navigation

This plugin can be used to detect and restore APIs or features that have been deprecated in jQuery and removed as of version 1.9.See thewarnings page for more information regarding messages the plugin generates.For more information about the changes made in jQuery 1.9, see theupgrade guide andblog post.

In your web page, load this pluginafter the script for jQuery:

<scriptsrc="https://code.jquery.com/jquery-1.12.4.js"></script><scriptsrc="https://code.jquery.com/jquery-migrate-1.4.1.js"></script>

Note that jQuery 3.0 has aseparate version of jQuery Migrate. The two versions cannot be used simultaneously on a page, so you should fix any upgrade issues identified by Migrate 1.x before attempting an upgrade.

Download

Development vs. Production versions

To make it easier for jQuery developers to find and remove deprecated functionality, the development version of the plugin displays warnings on the browser's console. In browsers that don't support the console interface such as IE7, no messages are generated unless you include a debugging library such asFirebug Lite before including the jQuery Migrate plugin. Developers can also inspect thejQuery.migrateWarnings array to see what error messages have been generated.

All warnings generated by this plugin start with the string "JQMIGRATE". A list of the warnings you may see are inwarnings.md.

Development version

This version provides console warning messages when deprecated and/or removed APIs are used. Use this version during development and debugging, and whenever you are reporting bugs to the jQuery team.

Latest released development version: This file is hosted on jQuery's CDN, and can be hotlinked if desired.https://code.jquery.com/jquery-migrate-1.4.1.js

Current work-in-progress build: Although this file represents the most recent updates to the plugin, it may not have been thoroughly tested.https://code.jquery.com/jquery-migrate-git.js

Production version

The minified production file is compressed and does not generate console warnings. Do not use this file for development or debugging, it will make your life miserable.

Latest released production version:https://code.jquery.com/jquery-migrate-1.4.1.min.jsThis file is hosted on jQuery's CDN, and can be hotlinked if desired.

Current work-in-progress build: Although this file represents the most recent updates to the plugin, it may not have been thoroughly tested. We do not recommend using this file on production sites since it may be unstable; use the released production version above.https://code.jquery.com/jquery-migrate-git.min.js

Migrate Plugin API

This plugin adds some properties to thejQuery object that can be used to programmatically control and examine its behavior:

jQuery.migrateWarnings: This property is an array of string warning messages that have been generated by the code on the page, in the order they were generated. Messages appear in the array only once, even if the condition has occurred multiple times, unlessjQuery.migrateReset() is called.

jQuery.migrateMute: Set this property totrue to prevent console warnings from being generated in the debugging version. ThejQuery.migrateWarnings array is still maintained when this property is set, which allows programmatic inspection without console output.

jQuery.migrateTrace: Set this property tofalse if you want warnings but do not want traces to appear on the console.

jQuery.migrateReset(): This method clears thejQuery.migrateWarnings array and "forgets" the list of messages that have been seen already.

jQuery.migrateVersion: This string property indicates the version of Migrate in use, it was added in version 1.3.0.

Reporting problems

Bugs that only occur when the jQuery Migrate plugin is used should be reported in thejQuery Migrate Issue Tracker andmust be accompanied by an executable test case that demonstrates the bug. The easiest way to do this is via an online test tool such asjsFiddle.net orjsbin.com. You can usethis jsFiddle template orthis jsbin template as a starting point; they already contain links to the work-in-progress versions of both jQuery and the jQuery Migrate plugin. Add your code there and post a link to it with your bug report.

Bugs in jQuery itself should be reported on thejQuery Core bug tracker and again should be accompanied by a test case fromjsFiddle.net orjsbin.com so that we can reproduce the issue.

For other questions about the plugin that aren't bugs, ask on thejQuery Forum.

How to run the tests:

Clone this repo, installgrunt:

git clone git://github.com/jquery/jquery-migrate.gitcd jquery-migratenpm installnpm install -g grunt-cli

Rungrunt tojshint,qunit anduglify release.

grunt

About

A development tool to help migrate away from APIs and features that have been or will be removed from jQuery core

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp