mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 23:33:54 +00:00
Expand documentation on resize event for client preferences
Bug: T375559 Change-Id: I0326de423c18eeeb6bce3cef2dc72fe248695b18
This commit is contained in:
parent
a9a2b617f5
commit
01e50fbda8
|
@ -70,6 +70,9 @@ function toggleDocClassAndSave( featureName, value, config, userPreferences ) {
|
|||
document.documentElement.classList.add( `${ featureName }-clientpref-${ value }` );
|
||||
// Client preferences often change the layout of the page significantly, so emit
|
||||
// a window resize event for other apps that need to update (T374092).
|
||||
// This is used by VisualEditor. If you plan to use this event for any other
|
||||
// purpose please let web team know so we can understand the use case better
|
||||
// (T375559 for more details).
|
||||
window.dispatchEvent( new Event( 'resize' ) );
|
||||
// Ideally this should be taken care of via a single core helper function.
|
||||
mw.util.debounce( () => {
|
||||
|
|
Loading…
Reference in a new issue