jenkins-bot has submitted this change and it was merged.
Change subject: Tweak comment to explain isAvailable and what mw.libs.ve means
......................................................................
Tweak comment to explain isAvailable and what mw.libs.ve means
Change-Id: Ie5df644b0e70871345950afa188545279c3ee91c
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
1 file changed, 8 insertions(+), 5 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
index d6faf48..9f21cda 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js
@@ -394,11 +394,14 @@
// Note: Though VisualEditor itself only needs this exposure for a very
small reason
// (namely to access init.blacklist from the unit tests...) this has
become one of the nicest
- // ways to easily detect whether VisualEditor is present on this page.
The VE global was once
- // available always, but now that platform integration initialisation
is propertly separated,
- // it doesn't exist until the platform loads VisualEditor core. Though
mw.libs.ve shouldn't be
- // considered an API (the methods are subject to change and considered
private), the presence
- // of this property should be reliable.
+ // ways to easily detect whether the VisualEditor initialisation code
is present.
+ //
+ // The VE global was once available always, but now that platform
integration initialisation
+ // is properly separated, it doesn't exist until the platform loads
VisualEditor core.
+ //
+ // Most of mw.libs.ve is considered subject to change and private. The
exception is that
+ // mw.libs.ve.isAvailable is public, and indicates whether the VE
editor itself can be loaded
+ // on this page. See above for why it may be false.
mw.libs.ve = init;
if ( !init.isAvailable ) {
--
To view, visit https://gerrit.wikimedia.org/r/77487
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5df644b0e70871345950afa188545279c3ee91c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits