Skip to content

Commit 35172bf

Browse files
committed
web: Address nit by renaming CacheBehavior to BFCacheBehavior
1 parent 2752865 commit 35172bf

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

web/packages/core/src/internal/player/inner.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
UnmuteOverlay,
1010
URLLoadOptions,
1111
WindowMode,
12-
CacheBehavior,
12+
BFCacheBehavior,
1313
} from "../../public/config";
1414
import { MovieMetadata, ReadyState } from "../../public/player";
1515
import { ruffleShadowTemplate } from "../ui/shadow-template";
@@ -2138,11 +2138,11 @@ export class InnerPlayer {
21382138
// Do not display the message if another one is already shown or website opted out.
21392139
if (
21402140
this.container.querySelector("#message-overlay") !== null ||
2141-
this.loadedConfig?.bfcacheBehavior === CacheBehavior.Restore
2141+
this.loadedConfig?.bfcacheBehavior === BFCacheBehavior.Restore
21422142
) {
21432143
return;
21442144
}
2145-
if (this.loadedConfig?.bfcacheBehavior === CacheBehavior.Reload) {
2145+
if (this.loadedConfig?.bfcacheBehavior === BFCacheBehavior.Reload) {
21462146
this.reload();
21472147
return;
21482148
}

web/packages/core/src/public/config/default.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
UnmuteOverlay,
1111
WindowMode,
1212
ScrollingBehavior,
13-
CacheBehavior,
13+
BFCacheBehavior,
1414
} from "./load-options";
1515

1616
export const DEFAULT_CONFIG: Required<BaseLoadOptions> = {
@@ -23,7 +23,7 @@ export const DEFAULT_CONFIG: Required<BaseLoadOptions> = {
2323
upgradeToHttps: true,
2424
compatibilityRules: true,
2525
favorFlash: true,
26-
bfcacheBehavior: CacheBehavior.Inform,
26+
bfcacheBehavior: BFCacheBehavior.Inform,
2727
warnOnUnsupportedContent: true,
2828
logLevel: LogLevel.Error,
2929
showSwfDownload: false,

web/packages/core/src/public/config/load-options.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export enum GamepadButton {
364364
/**
365365
* The behavior when the bfcache takes effect
366366
*/
367-
export enum CacheBehavior {
367+
export enum BFCacheBehavior {
368368
/**
369369
* Inform the user that the content was restore from the bfcache.
370370
*/
@@ -473,9 +473,9 @@ export interface BaseLoadOptions {
473473
/**
474474
* Behavior when the bfcache takes effect
475475
*
476-
* @default CacheBehavior.Inform
476+
* @default BFCacheBehavior.Inform
477477
*/
478-
bfcacheBehavior?: CacheBehavior;
478+
bfcacheBehavior?: BFCacheBehavior;
479479

480480
/**
481481
* This is no longer used and does not affect anything.

0 commit comments

Comments
 (0)