Remove check for window.JSON, redundant to check for es5
strict mode.
Remove check for window.addEventListener, we also check for
querySelector which is a newer part of the same API.
Bug: T290293
Change-Id: I95e62c7c1ed8f98f9df9e94fef86dda9aa77326b
- Add Skin::getOptions and Skin::getPortletLinkOptions, which are used
to provide skin options to mw.util.
- Add SkinFactory::getSkinOptions, which is used by
Skin::getPortletLinkOptions.
Depends-On: Ib23360e3439abc828404c1de8e0906915ee7d8b6
Bug: T289163
Change-Id: I801e7d583cb0b0c7da51f4da503268be736bb60c
This reverts commit 0faa22fc6d.
Reason for revert: Gzip is usually (and in this case) more efficient at
natively deduplicating repeated strings when transferring code from
server to client, than is possible through manual abbreviating through
a variable.
Fresnel confirmed this patch reduces JS transfer size by 10B. Not much,
but enough for the optimisation to not be needed.
Change-Id: I4ad22ca1220f33f018a6bc7e3da8389246cf5f9c
When invoked as a constructor, the created object gets returned
anyway. When not invoked as a construct (eg with
`var demo = mw.Message( mw.messages, 'brackets', [ 'param' ] )`
the `this` value is the global `mw` object, which is unexpected.
Using mw.Message as a method call is not supported, and it
causes other problems (the .format, .map, .key, and .parameters
properties get set on the global `mw` object) but those are left
to be dealt with separately.
This follows-up r89076 (6a408d444c) where it was added for no
apparent reason.
Change-Id: Ie25758f92df0a33e66c266e007a1b81f077a9790
It's not needed as part of the startup code, just for some modules
(in core the only place its used is in the mediawiki.inspect module)
and thus does not need to be defined so early, it can go in the
mediawiki.base module that is an implicit dependency of all
regular modules, where it can be loaded concurrently and take
advantage of the ResourceLoader module caching system.
Also tweak the documentation, the returned array is known to be
an array of strings.
Should have no effect on the functionality.
Change-Id: I18f5fae876a8b90f66b9c555d393169a5525f1af
Some methods in the PageUpdater's class implements the fluent interface
design pattern. Use the fluent interface where need be.
Change-Id: If76a4b8c5070c20ed40038a4ee78e2d677de5180
Folllows-up I4c2d478b492ff17.
* MW_ENTRY_POINT can only be undefined in very early WebStart/Setup
code. In code outside those files, and by the time MW_SETUP_CALLBACK
OutputHandler run, this is always filled in to at least "unknown".
* Inline extra code to the less common conditional block.
Bug: T290776
Change-Id: Ia7fa6cb0ff156ed6cb0212443ac3a97c91982d4b
The config variable check from 6c81f0b868d2 needed a negation.
The phase check from 374bdc0f7c should have been a conjuction.
Also add some debug logging statements.
Follow-up to 6c81f0b868d2 and 374bdc0f7c.
Bug: T290776
Change-Id: I4c2d478b492ff17bdad76bf75119b5926f7917e8
For both LinkTarget and PageReference, just extract
namespace and dbkey and pass those in the array
of parameters to Job::__construct().
Allows a bunch of simplification to WatchedItemStore.
Bug: T291531
Change-Id: Id150d0c62af38d4b3d17e5698866127c6e04717e