Skip to content

Commit

Permalink
fullscreen: add private member annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
jnikula committed Nov 17, 2024
1 parent 156f6a6 commit c49de29
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/Fullscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ declare global {
}

export class Fullscreen {
_elem: Element;
private _elem: Element;

constructor(elem: Element) {
this._elem = elem;
}

_enabled(): boolean {
private _enabled(): boolean {
if (document.fullscreenElement)
return true;

Expand All @@ -36,7 +36,7 @@ export class Fullscreen {
return false;
}

_enable(): void {
private _enable(): void {
if (this._elem.requestFullscreen) {
this._elem.requestFullscreen();
} else if (this._elem.webkitRequestFullscreen) {
Expand All @@ -46,7 +46,7 @@ export class Fullscreen {
}
}

_disable(): void {
private _disable(): void {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitExitFullscreen) {
Expand All @@ -56,14 +56,14 @@ export class Fullscreen {
}
}

_set(enable: boolean): void {
private _set(enable: boolean): void {
if (enable)
this._enable();
else
this._disable();
}

_save(enable: boolean): void {
private _save(enable: boolean): void {
localStorage.setItem('groovescore-fullscreen', JSON.stringify(enable));
}

Expand Down

0 comments on commit c49de29

Please sign in to comment.