-
Notifications
You must be signed in to change notification settings - Fork 56
Description
From jQuery Migrate Plugin
https://wordpress.org/plugins/enable-jquery-migrate-helper/
jQuery.fn.unload() is deprecated | Plugin: o2 | https://****/wp-content/plugins/o2/modules/offline/js/offline.js
\'ready\' event is deprecated | Plugin: o2 | https://****/wp-content/plugins/o2/js/editor/editor.js
False Positives
wp-content/plugins/o2/modules/notifications/js/app/notifications.js
leverages the event ready.o2
, which jQuery Migrate Plugin picks up as a false positive.
Solution: ready event is depreciated
I'm following this article as a guide: https://api.jquery.com/ready/
wp-content/plugins/o2/js/editor/editor.js:84
replace
$doc.on( 'ready', function() {
with
$(function() {
Solution: unload is depreciated
I'm following this guide:
https://stackoverflow.com/questions/46443032/what-is-a-foolproof-alternative-to-window-unload/46443788
/wp-content/plugins/o2/modules/offline/js/offline.js:31
Change
jQuery( window ).unload( function() { o2.Offline.onWindowUnloading(); } );
To
jQuery( window ).on( 'beforeunload' , function() { o2.Offline.onWindowUnloading(); } );