Skip to content

Commit 6f163be

Browse files
authored
Merge pull request #5674 from xtermjs/anthonykim1/addScreenElementAPI
Add api to expose screenElement
2 parents 5741e45 + b0d0bf8 commit 6f163be

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/browser/public/Terminal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export class Terminal extends Disposable implements ITerminalApi {
8383
public get onDimensionsChange(): IEvent<IRenderDimensions> { return this._core.onDimensionsChange; }
8484

8585
public get element(): HTMLElement | undefined { return this._core.element; }
86+
public get screenElement(): HTMLElement | undefined { return this._core.screenElement; }
8687
public get parser(): IParser {
8788
return this._parser ??= new ParserApi(this._core);
8889
}

test/playwright/TestUtils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ type TerminalProxyAsyncMethodOverrides = 'hasSelection' | 'getSelection' | 'getS
115115
type TerminalProxyCustomOverrides = 'buffer' | 'dimensions' | (
116116
// The below are not implemented yet
117117
'element' |
118+
'screenElement' |
118119
'textarea' |
119120
'markers' |
120121
'unicode' |

typings/xterm.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,12 @@ declare module '@xterm/xterm' {
911911
*/
912912
readonly element: HTMLElement | undefined;
913913

914+
/**
915+
* The screen element containing the terminal's canvas rendering layers and
916+
* decorations, excluding the viewport and the scrollbar.
917+
*/
918+
readonly screenElement: HTMLElement | undefined;
919+
914920
/**
915921
* The textarea that accepts input for the terminal.
916922
*/

0 commit comments

Comments
 (0)