
META-INF.resources.frontend.webapi.visibility.ts Maven / Gradle / Ivy
import { LitElement, html } from 'lit';
import { customElement } from 'lit/decorators.js';
@customElement('rap-visibility')
export class RapVisibility extends LitElement {
// Required so api users don't get warning spam in their logs
render() {
return html``;
}
registerVisibilityListener() {
document.onvisibilitychange = () => this.$server.onVisibilityChanged();
}
unregisterVisibilityListener() {
document.onvisibilitychange = undefined;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy