jenkins-bot has submitted this change and it was merged.

Change subject: Add OO.ui.warnDeprecation method
......................................................................


Add OO.ui.warnDeprecation method

Change-Id: Ib87f2ef7cc643930c41ace0d464c2d5a8a1e39c0
---
M src/core.js
1 file changed, 11 insertions(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/core.js b/src/core.js
index 311e61e..216f662 100644
--- a/src/core.js
+++ b/src/core.js
@@ -247,6 +247,17 @@
 };
 
 /**
+ * Puts a console warning with provided message.
+ *
+ * @param {string} message
+ */
+OO.ui.warnDeprecation = function ( message ) {
+       if ( OO.getProp( 'window', 'console', 'warn' ) !== undefined ) {
+               console.warn( message );
+       }
+};
+
+/**
  * Returns a function, that, when invoked, will only be triggered at most once
  * during a given window of time. If called again during that window, it will
  * wait until the window ends and then trigger itself again.

-- 
To view, visit https://gerrit.wikimedia.org/r/316802
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib87f2ef7cc643930c41ace0d464c2d5a8a1e39c0
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Prtksxna <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to