Current configuration on the wiki
Find a file
Nicholas Ray d99dd4040e [BREAKING] Change cleanup API of checkboxHack
Before this commit, each bind function would return an object containing
a reference to the function used in the event listener creation with the
intention that this could later be used to cleanup the event listeners.
This is problematic for the following reasons:

* In order to cleanup the event listener, it forces the client to know
which element the event listener was added to (button, checkbox,
document, window, etc.),. the event type that was used ('click',
'focusin', etc), and whether or not the "useCapture" param was also
used. The `removeEventListener` API won't remove the correct event
listener unless these three pieces of info are known by the client [1].

* Because the above point is tricky to get right, numerous potential
memory leaks were possible with the `unbind` function as the
`useCapture` param wasn't being passed in some cases.

This commit aims to simplify the cleanup API by returning an anonymous
function in each bind function that the client can call to cleanup the
relevant event listeners without knowing any of the implementation
details. This also makes the `unbind` function unnecessary.

** This is a breaking change to the checkboxHack API ** but because
there aren't any known clients of the return values [2], a formal
deprecation process was assumed to be unnecessary. Note gadgets should
not be using the internal function mw.loader.require so these were
not considered.

[1] https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener#matching_event_listeners_for_removal
[2] https://codesearch.wmcloud.org/search/?q=checkboxHack&i=nope&files=&excludeFiles=&repos=

Bug: T291096
Change-Id: Ia2d79f27dd81fdc74a44829da3ca472f4c01d4b5
2021-10-27 18:25:49 +00:00
.phan
.pipeline
cache
docs
extensions
images
includes Merge "Selected links should not be red." 2021-10-27 16:42:17 +00:00
languages Localisation updates from https://translatewiki.net. 2021-10-27 08:07:55 +02:00
maintenance checkStorage: pass no parameters to WikiRevision::getContent() 2021-10-24 11:47:32 +00:00
mw-config
resources [BREAKING] Change cleanup API of checkboxHack 2021-10-27 18:25:49 +00:00
skins
tests Merge "ApiQueryImageInfo: don't show empty comments as deleted" 2021-10-26 19:59:25 +00:00
.dockerignore
.editorconfig
.eslintignore
.eslintrc.json
.fresnel.yml
.gitattributes
.gitignore
.gitreview
.mailmap
.phpcs.xml
.stylelintrc.json
.svgo.config.js
.vsls.json
api.php
autoload.php Add new ParserOutput::{get,set}OutputFlag() interface 2021-10-15 14:25:54 -04:00
CODE_OF_CONDUCT.md
composer.json Upgrade RemexHtml to 3.0.0 2021-10-27 16:29:18 +00:00
composer.local.json-sample
COPYING
CREDITS
DEVELOPERS.md docs: Document in DEVELOPERS.md how to stop or restart the thing 2021-10-12 16:52:44 +00:00
docker-compose.yml docker: Update dev images to newer version with Composer 2.x 2021-10-23 02:21:33 +01:00
FAQ
Gruntfile.js
HISTORY
img_auth.php
index.php
INSTALL
jsduck.json
load.php
opensearch_desc.php
package-lock.json
package.json
phpunit.xml.dist
README.md
RELEASE-NOTES-1.37 RELEASE-NOTES-1.37: Note that we require PHP 7.4.2+ and not PHP 8.0 2021-10-21 15:56:36 -07:00
RELEASE-NOTES-1.38 [BREAKING] Change cleanup API of checkboxHack 2021-10-27 18:25:49 +00:00
rest.php
SECURITY
thumb.php
thumb_handler.php
UPGRADE

MediaWiki

MediaWiki is a free and open-source wiki software package written in PHP. It serves as the platform for Wikipedia and the other Wikimedia projects, used by hundreds of millions of people each month. MediaWiki is localised in over 350 languages and its reliability and robust feature set have earned it a large and vibrant community of third-party users and developers.

MediaWiki is:

  • feature-rich and extensible, both on-wiki and with hundreds of extensions;
  • scalable and suitable for both small and large sites;
  • simple to install, working on most hardware/software combinations; and
  • available in your language.

For system requirements, installation, and upgrade details, see the files RELEASE-NOTES, INSTALL, and UPGRADE.

MediaWiki is the result of global collaboration and cooperation. The CREDITS file lists technical contributors to the project. The COPYING file explains MediaWiki's copyright and license (GNU General Public License, version 2 or later). Many thanks to the Wikimedia community for testing and suggestions.