diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-03-20 11:51:08 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-03-21 12:24:36 +0900 |
commit | 8828d175d9754e7afedf1dbb0b7bda2824608b0a (patch) | |
tree | 8cec92a05b5895848d0b423fce9473f9e7a905b0 /src/content/presenters/ConsoleFramePresenter.ts | |
parent | 3ffb4b066cdcc60a49ce4ecd0bbc498da6256534 (diff) |
Inject iframe on top window
Diffstat (limited to 'src/content/presenters/ConsoleFramePresenter.ts')
-rw-r--r-- | src/content/presenters/ConsoleFramePresenter.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/content/presenters/ConsoleFramePresenter.ts b/src/content/presenters/ConsoleFramePresenter.ts index 9c4b3f1..0db58f0 100644 --- a/src/content/presenters/ConsoleFramePresenter.ts +++ b/src/content/presenters/ConsoleFramePresenter.ts @@ -6,6 +6,8 @@ export default interface ConsoleFramePresenter { blur(): void; resize(width: number, height: number): void; + + isTopWindow(): boolean; } export class ConsoleFramePresenterImpl implements ConsoleFramePresenter { @@ -47,4 +49,8 @@ export class ConsoleFramePresenterImpl implements ConsoleFramePresenter { } ele.style.height = `${height}px`; } + + isTopWindow(): boolean { + return window.top === window; + } } |