Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/204003

Change subject: Fix broken ve.init.sa.Platform @example (ve.init.platform 
undefined)
......................................................................

Fix broken ve.init.sa.Platform @example (ve.init.platform undefined)

Follows-up 363c804, 12ef310.

To avoid having to mention ve.messsagePaths in general example
code, ensure Platform is instantiated in eg-iframe.html.

However in the @example for ve.init.sa.Platform itself, also do
the instantiation explicitly there.

Change-Id: I13efa6beeb3d2878b175f373f7cb4c665d42c4d8
---
M .jsduck/eg-iframe.html
M src/init/sa/ve.init.sa.Platform.js
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/03/204003/1

diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index 347b746..986ae52 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -60,6 +60,8 @@
 
                <!-- example scripts -->
                <script>
+                       new ve.init.sa.Platform( ve.messagePaths );
+
                        function loadInlineExample( code, options, callback ) {
                                try {
                                        eval( code );
diff --git a/src/init/sa/ve.init.sa.Platform.js 
b/src/init/sa/ve.init.sa.Platform.js
index f258688..e3f3876 100644
--- a/src/init/sa/ve.init.sa.Platform.js
+++ b/src/init/sa/ve.init.sa.Platform.js
@@ -8,7 +8,8 @@
  * Initialization Standalone platform.
  *
  *     @example
- *     ve.init.platform.initialize().done( function () {
+ *     var platform = new ve.init.sa.Platform( ve.messagePaths );
+ *     platform.initialize().done( function () {
  *         var target = new ve.init.sa.Target();
  *         target.addSurface(
  *             ve.dm.converter.getModelFromDom(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13efa6beeb3d2878b175f373f7cb4c665d42c4d8
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>

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

Reply via email to