Pārlūkot izejas kodu

Add deprecation warnings for events that will be removed.

JC Brand 9 gadi atpakaļ
vecāks
revīzija
e0c6626c6f
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      src/converse-core.js

+ 3 - 0
src/converse-core.js

@@ -68,6 +68,9 @@
             $(event_context).one(evt, handler);
         },
         on: function (evt, handler) {
+            if (_.contains(['ready', 'initialized'], evt)) {
+                converse.log('Warning: The "'+evt+'" event has been deprecated and will be removed, please use "connected".');
+            }
             $(event_context).bind(evt, handler);
         },
         off: function (evt, handler) {