Mattflaschen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/77487
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/87/77487/1
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 b354b2d..a717021 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
@@ -391,11 +391,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: newchange
Gerrit-Change-Id: Ie5df644b0e70871345950afa188545279c3ee91c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits