Guest User

Untitled

a guest
Jul 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. /**
  2. * @author ebidel@ (Eric Bidelman)
  3. * License Apache-2.0
  4. */
  5.  
  6. // Drop this in the DevTools console:
  7.  
  8. (new ReportingObserver((reports, observer) => {
  9. console.warn('This page is using deprecated APIs or features:');
  10. const deprecations = reports.map(report => {
  11. return {
  12. url: report.url,
  13. message: report.body.message,
  14. lineNumber: report.body.lineNumber || '-',
  15. colNumber: report.body.columnNumber || '-',
  16. anticipatedRemoval: report.body.anticipatedRemoval ? (new Date(report.body.anticipatedRemoval)).toLocaleDateString() : '-',
  17. };
  18. });
  19. console.table(deprecations);
  20. }, {types: ['deprecation'], buffered: true})).observe();
Add Comment
Please, Sign In to add comment