Skip to content

[PoC] Add jQuery.migrateWarnCallback feature #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

kavu
Copy link
Contributor

@kavu kavu commented Mar 13, 2013

The reason why I added this, is that with such callback I can notify some exception tracking service with deprecation messages. For example — notifying rollbar.com:

$.migrateWarnCallback = function(msg) {
  _rollbar.push({
    level: 'error',
    msg: "JQMIGRATE: " + msg
  });
};

Thanks!

@dmethvin
Copy link
Member

The facilities are already there to do this, using a timer. That has the advantage of sending the bulk of the messages in one shot, since many of them will happen on initialization. So after document ready just set a timer for, say, every 5 seconds and check whether new messages have been put into the warnings array.

@dmethvin dmethvin closed this Mar 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants