Protected ReadonlycloneMaps a main-window element to its clones in each secondary window.
Protected ReadonlycssomRecords of CSSOM insertRule calls keyed by the main-window style element.
Protected ReadonlymainTracks which classes this mirror has added to each secondary window's body.
ProtectedoriginalThe CSSStyleSheet method deleteRule() removes a rule from the stylesheet object.
ProtectedoriginalOriginal CSSStyleSheet methods, saved before monkey-patching.
The CSSStyleSheet.insertRule() method inserts a new CSS rule into the current style sheet.
Optionalindex: numberProtected ReadonlypendingPending CSSOM rule re-syncs after insertRule (to capture rule.style mutations).
ProtectedpendingProtected ReadonlysecondaryProtected ReadonlytoDisposable collection for cleanup on stop.
Protected ReadonlytrackedThe set of currently tracked secondary windows.
Protected Static ReadonlyEXCLUDED_Body classes that represent per-window state and must not be mirrored.
ProtectedcloneProtectedflushProtectedhasProtectedisProtectedobserveProtectedobserveProtectedonProtectedonCalled when the application is started. The application shell is not attached yet when this method runs. Should return a promise if it runs asynchronously.
Called when an application is stopped or unloaded.
Note that this is implemented using window.pagehide which doesn't allow any asynchronous code anymore.
I.e. this is the last tick.
ProtectedpatchProtectedremoveProtectedscheduleProtectedshouldProtectedsnapshotProtectedsyncProtectedtrack
Mirrors runtime-added
<style>and<link>elements from the main window's<head>into every secondary window, keeps CSSOMinsertRule/deleteRulechanges in sync, and propagates body class mutations.Elements that are already managed by dedicated services are excluded:
monaco-colorsclass stylesheets (managed byMonacoFrontendApplicationContribution)contributedColorThemeID stylesheets (managed byStylingService)theia-icon-themeclass stylesheets (managed byPluginIconThemeService)