Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1429865
index.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
index.js
View Options
(
function
()
{
const
Vue
=
require
(
'../../lib/vue/vue.js'
);
const
errorLogger
=
require
(
'./errorLogger.js'
);
const
i18n
=
require
(
'./i18n.js'
);
const
teleportTarget
=
require
(
'mediawiki.page.ready'
).
teleportTarget
;
/**
* Additional functions and plugins added to the Vue object.
*
* For documentation on Vue's built-in functions, see
* {@link https://vuejs.org/api/ Vue's API reference}.
*
* @module vue
*/
/**
* Wrapper around {@link https://vuejs.org/api/application.html#createapp Vue.createApp} that
* adds the {@link module:vue#$i18n i18n plugin} and the error handler. These were added
* globally in Vue 2, but Vue 3 does not support global plugins.
*
* To ensure all Vue code has the i18n plugin and the error handler installed, use of
* `vue.createMwApp()` is recommended anywhere one would normally use `Vue.createApp()`.
*
* @method createMwApp
* @param {...any} args
* @return {Object} Vue app instance
* @memberof module:vue
*/
Vue
.
createMwApp
=
function
(
...
args
)
{
const
app
=
Vue
.
createApp
(
...
args
);
app
.
use
(
errorLogger
);
app
.
use
(
i18n
);
app
.
provide
(
'CdxTeleportTarget'
,
teleportTarget
);
// Includes all messages with `cdx-` prefix in languages/i18n/codex.
app
.
provide
(
'CdxI18nFunction'
,
mw
.
msg
);
return
app
;
};
// HACK: the global build of Vue that we're using assumes that Vue is globally available
// in eval()ed code, because it expects var Vue = ...; to run in the global scope
// Satisfy that assumption
window
.
Vue
=
Vue
;
module
.
exports
=
Vue
;
}()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 18:07 (9 h, 6 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4d/56/502ea3b6c5e5ac97e88f70c4d542
Default Alt Text
index.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment