mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
[ci] format
This commit is contained in:
parent
47604bd5b5
commit
b59be6759c
2 changed files with 6 additions and 4 deletions
|
@ -46,7 +46,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
customElements.define('astro-dev-toolbar-icon', DevOverlayIcon);
|
customElements.define('astro-dev-toolbar-icon', DevOverlayIcon);
|
||||||
|
|
||||||
// Add deprecated names
|
// Add deprecated names
|
||||||
const deprecated = (Parent: any) => class extends Parent{};
|
const deprecated = (Parent: any) => class extends Parent {};
|
||||||
customElements.define('astro-dev-overlay', deprecated(AstroDevOverlay));
|
customElements.define('astro-dev-overlay', deprecated(AstroDevOverlay));
|
||||||
customElements.define('astro-dev-overlay-window', deprecated(DevOverlayWindow));
|
customElements.define('astro-dev-overlay-window', deprecated(DevOverlayWindow));
|
||||||
customElements.define('astro-dev-overlay-plugin-canvas', deprecated(DevOverlayCanvas));
|
customElements.define('astro-dev-overlay-plugin-canvas', deprecated(DevOverlayCanvas));
|
||||||
|
|
|
@ -467,8 +467,8 @@ export class AstroDevOverlay extends HTMLElement {
|
||||||
[
|
[
|
||||||
'app-toggled',
|
'app-toggled',
|
||||||
// Deprecated
|
// Deprecated
|
||||||
'plugin-toggled'
|
'plugin-toggled',
|
||||||
].forEach(eventName => {
|
].forEach((eventName) => {
|
||||||
plugin.eventTarget.dispatchEvent(
|
plugin.eventTarget.dispatchEvent(
|
||||||
new CustomEvent(eventName, {
|
new CustomEvent(eventName, {
|
||||||
detail: {
|
detail: {
|
||||||
|
@ -481,7 +481,9 @@ export class AstroDevOverlay extends HTMLElement {
|
||||||
|
|
||||||
if (import.meta.hot) {
|
if (import.meta.hot) {
|
||||||
import.meta.hot.send(`${WS_EVENT_NAME}:${plugin.id}:toggled`, { state: plugin.active });
|
import.meta.hot.send(`${WS_EVENT_NAME}:${plugin.id}:toggled`, { state: plugin.active });
|
||||||
import.meta.hot.send(`${WS_EVENT_NAME_DEPRECATED}:${plugin.id}:toggled`, { state: plugin.active });
|
import.meta.hot.send(`${WS_EVENT_NAME_DEPRECATED}:${plugin.id}:toggled`, {
|
||||||
|
state: plugin.active,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue