@botiverse/porthole 0.15.3 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/dist/bridge/bridge.d.ts +1 -8
- package/dist/bridge/bridge.js +0 -7
- package/dist/check/page-source.js +1 -1
- package/dist/check/page.js +1 -1
- package/dist/compile/policy.d.ts +0 -7
- package/dist/compile/policy.js +1 -10
- package/dist/config/capabilities.d.ts +8 -14
- package/dist/config/capabilities.js +4 -5
- package/dist/config/schema.d.ts +2 -13
- package/dist/config/validate.js +0 -24
- package/dist/conformance/behavior.js +26 -37
- package/dist/conformance/clipboard.js +47 -1
- package/dist/conformance/harness-source.js +1 -1
- package/dist/displays/displays.js +1 -3
- package/dist/guide/limits.js +1 -1
- package/dist/guide/runtime.js +1 -1
- package/dist/host/create-host.d.ts +1 -1
- package/dist/host/create-host.js +6 -51
- package/dist/host/door.d.ts +1 -1
- package/dist/host/locate.d.ts +1 -1
- package/dist/host/locate.js +2 -2
- package/dist/host/outcome.d.ts +5 -12
- package/dist/host/outcome.js +8 -16
- package/dist/host/types.d.ts +6 -22
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -4
- package/dist/isolation/served.d.ts +4 -14
- package/dist/isolation/served.js +7 -28
- package/dist/isolation/types.d.ts +2 -25
- package/dist/isolation/types.js +0 -23
- package/dist/platform/focus-field.d.ts +11 -0
- package/dist/platform/focus-field.js +18 -0
- package/dist/platform/types.d.ts +6 -22
- package/dist/platform/web.js +8 -106
- package/dist/presets/presets.d.ts +0 -2
- package/dist/presets/presets.js +0 -1
- package/dist/react/frame.d.ts +0 -8
- package/dist/react/frame.js +0 -4
- package/dist/runtime/contract.d.ts +2 -2
- package/dist/runtime/contract.js +2 -2
- package/dist/runtime/types.generated.js +6 -6
- package/dist/server/files.js +7 -23
- package/dist/server/host.d.ts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +4 -6
- package/dist/server/naming.js +1 -1
- package/dist/server/server.js +28 -166
- package/dist/server/types.d.ts +7 -7
- package/dist/shell/plan.d.ts +0 -5
- package/dist/shell/plan.js +2 -4
- package/dist/shell/runtime.js +1 -268
- package/docs/ADOPTING.md +42 -138
- package/docs/ARCHITECTURE.md +0 -33
- package/docs/DECISIONS.md +115 -10
- package/docs/DESIGN.md +27 -64
- package/docs/THREAT_MODEL.md +128 -255
- package/package.json +1 -1
- package/src/bridge/bridge.ts +1 -17
- package/src/check/page.ts +1 -1
- package/src/compile/policy.ts +1 -11
- package/src/config/capabilities.ts +8 -14
- package/src/config/schema.ts +2 -13
- package/src/config/validate.ts +0 -28
- package/src/conformance/behavior.ts +50 -52
- package/src/conformance/clipboard.ts +56 -1
- package/src/displays/displays.ts +1 -3
- package/src/guide/limits.ts +1 -1
- package/src/guide/runtime.ts +1 -1
- package/src/host/create-host.ts +6 -52
- package/src/host/door.ts +1 -1
- package/src/host/locate.ts +2 -2
- package/src/host/outcome.ts +8 -21
- package/src/host/types.ts +6 -20
- package/src/index.ts +2 -4
- package/src/isolation/served.ts +6 -34
- package/src/isolation/types.ts +2 -31
- package/src/platform/focus-field.ts +18 -0
- package/src/platform/types.ts +6 -21
- package/src/platform/web.ts +8 -129
- package/src/presets/presets.ts +0 -3
- package/src/react/frame.tsx +0 -10
- package/src/runtime/contract.ts +4 -4
- package/src/runtime/types.generated.ts +6 -6
- package/src/server/files.ts +4 -19
- package/src/server/host.ts +1 -1
- package/src/server/index.ts +4 -16
- package/src/server/naming.ts +1 -1
- package/src/server/server.ts +29 -189
- package/src/server/types.ts +7 -7
- package/src/shell/plan.ts +2 -9
- package/src/shell/runtime.ts +1 -268
- package/types/runtime/v1/artifact.d.ts +2 -3
- package/types/runtime/v1/assets.d.ts +1 -1
- package/types/runtime/v1/chat.d.ts +2 -2
- package/types/runtime/v1/comments.d.ts +1 -1
- package/types/runtime/v1/downloads.d.ts +2 -2
- package/types/runtime/v1/links.d.ts +2 -2
- package/dist/platform/focus-guard.d.ts +0 -288
- package/dist/platform/focus-guard.js +0 -838
- package/dist/server/nested.d.ts +0 -66
- package/dist/server/nested.js +0 -121
- package/dist/shell/frame.d.ts +0 -28
- package/dist/shell/frame.js +0 -407
- package/src/platform/focus-guard.ts +0 -1114
- package/src/server/nested.ts +0 -157
- package/src/shell/frame.ts +0 -444
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The focus guard (P109): a display's frame can move the keyboard into itself whenever it likes
|
|
3
|
-
* (`element.focus()` in its own realm; on Chromium and WebKit with no gesture at all), and what the
|
|
4
|
-
* person goes on typing into the host's composer or chat box then goes to the page. Porthole can't
|
|
5
|
-
* stop the call, which runs in the content's realm, but the host's page can undo it: when focus
|
|
6
|
-
* leaves one of its text fields for a display's frame and the person didn't move it there, focus
|
|
7
|
-
* goes back once the engine has finished moving it, the guard watches that it stays back, and the
|
|
8
|
-
* display hears `focusTaken`; a display whose frame keeps doing it is stopped (`createHost`).
|
|
9
|
-
*
|
|
10
|
-
* What the host's page can see of a move into a frame, measured on Chromium, WebKit and Firefox
|
|
11
|
-
* (P109): Chromium and WebKit blur the host's window as it happens, and a press on the frame (a
|
|
12
|
-
* click, a tap, held or not) leaves the frame element `:active` then; a Tab is the host's own
|
|
13
|
-
* keydown just before. Firefox doesn't blur the window and shows no `:active` (a focusout on the
|
|
14
|
-
* field was seen in one review's runs, not in another's): its `document.activeElement` changes,
|
|
15
|
-
* which the guard reads at each animation frame while a frame is guarded, and the pointer over the
|
|
16
|
-
* frame (`:hover`, `pointerover`) is all it can tell of a press. A page that takes focus back on
|
|
17
|
-
* its own blur (which a take-back fires) leaves Firefox's focus on nothing (`<body>`) or in the
|
|
18
|
-
* frame again (the review of the guard, GK-1): the guard keeps watching after each take-back and
|
|
19
|
-
* counts one that didn't hold. Every engine keeps a gesture's transient activation for 5 s
|
|
20
|
-
* (measured: 5.04 to 5.10 s).
|
|
21
|
-
*
|
|
22
|
-
* A nested page's shell (P111) says when its activation turned on, which a press in the page does,
|
|
23
|
-
* and so does a key the person typed into it: one meant for the host's composer, after the page took
|
|
24
|
-
* the keyboard and before the guard took it back (the audit of P111's guard, NG-1). Neither the
|
|
25
|
-
* shell nor the host's page can tell the two apart from the activation (the shell gets no event as
|
|
26
|
-
* focus comes into its child, measured), so (P120): in a fight over a text field the shell's word
|
|
27
|
-
* isn't asked; a wait on a move from a text field doesn't end with the frame holding focus unjudged;
|
|
28
|
-
* and where the host's page sees the pointer over its frames, an activation while it isn't over the
|
|
29
|
-
* frame and the person was typing is no press.
|
|
30
|
-
*/
|
|
31
|
-
/** How long the person's Tab counts as moving focus (the move follows its keydown at once). */
|
|
32
|
-
export declare const TAB_MS = 1000;
|
|
33
|
-
/**
|
|
34
|
-
* How long transient activation lasts after a gesture (measured: 5 s on all three engines): a
|
|
35
|
-
* host page with activation and no gesture of its own for longer had one in a frame.
|
|
36
|
-
*/
|
|
37
|
-
export declare const ACTIVATION_SPAN_MS = 5000;
|
|
38
|
-
/** The person is typing: a key on the host's page within this long. */
|
|
39
|
-
export declare const TYPING_MS = 1000;
|
|
40
|
-
/**
|
|
41
|
-
* No press of the person's lands on a frame this soon after a key they typed on the host's page
|
|
42
|
-
* (P122): a hand on the keys doesn't reach the pointer and press that fast (the Keystroke-Level
|
|
43
|
-
* Model gives 400 ms to the hand's move from the keys to the mouse alone; Card, Moran and Newell,
|
|
44
|
-
* 1980). A move into a nested page's frame, or its shell's activation turning on, within this long
|
|
45
|
-
* is the person's next key landing in the page, which turns its activation on as a press does.
|
|
46
|
-
* Where neither the host's page nor the shell sees the pointer (full Chromium), it holds a page that
|
|
47
|
-
* takes the keyboard while the person types even when their key outruns the shell's answer.
|
|
48
|
-
*/
|
|
49
|
-
export declare const KEY_PRESS_MS = 250;
|
|
50
|
-
/**
|
|
51
|
-
* After a take-back, the guard keeps watching (each animation frame) until focus has stayed in the
|
|
52
|
-
* text field this long: a page that takes it again at once (on its own blur, which the take-back
|
|
53
|
-
* fires) is caught as it does, on Firefox too (P109, after the review of the guard: GK-1).
|
|
54
|
-
*/
|
|
55
|
-
export declare const HELD_MS = 300;
|
|
56
|
-
/** A take-back that hasn't put focus back in the field after this long failed: counted, and tried again. */
|
|
57
|
-
export declare const GIVE_BACK_MS = 50;
|
|
58
|
-
/**
|
|
59
|
-
* A frame that holds focus isn't the person's for this long after they press the host's page: the
|
|
60
|
-
* press gives the page activation before focus leaves the frame (on Firefox, a move between
|
|
61
|
-
* processes), and a call the frame sends in between would borrow it.
|
|
62
|
-
*/
|
|
63
|
-
export declare const HOST_PRESS_MS = 1000;
|
|
64
|
-
/**
|
|
65
|
-
* When a display is stopped for taking the keyboard (P109): focus given back can't stop its frame
|
|
66
|
-
* calling `focus()` again (nothing the host sets on the frame does, `inert` included: measured),
|
|
67
|
-
* and each try leaves it the keys typed until focus is back. So three undone moves within 10 s
|
|
68
|
-
* that came while the person typed on the page or that kept focus from going back (a take-back that
|
|
69
|
-
* failed: the keys then go to the frame, and the page sees no typing to count), or five at all
|
|
70
|
-
* within 2 s, stop it. A person's own move never fails a take-back.
|
|
71
|
-
*/
|
|
72
|
-
export declare const TAKES: {
|
|
73
|
-
readonly typing: {
|
|
74
|
-
readonly most: 3;
|
|
75
|
-
readonly withinMs: 10000;
|
|
76
|
-
};
|
|
77
|
-
readonly any: {
|
|
78
|
-
readonly most: 5;
|
|
79
|
-
readonly withinMs: 2000;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* A nested page's shell (P111) says its own activation turned on: a press or key of the person's
|
|
84
|
-
* in that page (activation goes up to ancestors, never down, so nothing on the host's page turns
|
|
85
|
-
* it on). A move of focus into the frame within this long of it, with no press or key on the
|
|
86
|
-
* host's page since, is the person's; so is a `comments.open` the page sends within it.
|
|
87
|
-
*/
|
|
88
|
-
export declare const SHELL_GESTURE_MS = 1000;
|
|
89
|
-
/**
|
|
90
|
-
* How long a move into a nested page's frame waits for its shell's word before it is taken for
|
|
91
|
-
* the page's: the shell says what it saw at its next animation frame, after the host's page
|
|
92
|
-
* already heard the move. A shell that says nothing in time (gone, stalled) has its frame's move
|
|
93
|
-
* taken back, as any page's.
|
|
94
|
-
*/
|
|
95
|
-
export declare const SHELL_WAIT_MS = 500;
|
|
96
|
-
/**
|
|
97
|
-
* A shell's word that came this long before the host's page heard the move is about that move
|
|
98
|
-
* (the shell's frame can come first); one from before then is about an earlier one.
|
|
99
|
-
*/
|
|
100
|
-
export declare const SHELL_EARLY_MS = 150;
|
|
101
|
-
/**
|
|
102
|
-
* A shell that went this long without a look, or without a word to the host (its heartbeat is every
|
|
103
|
-
* 50 ms), was stalled (P111, after its review): where the page shares the shell's thread (WebKit,
|
|
104
|
-
* Firefox), a page that holds it from its own click handler pushes the moment the shell sees its
|
|
105
|
-
* activation turn on past the person's next keys on the host's page. An activation it saw then is
|
|
106
|
-
* uncertain: it is no one's gesture until it lapses.
|
|
107
|
-
*/
|
|
108
|
-
export declare const SHELL_STALL_MS = 100;
|
|
109
|
-
/**
|
|
110
|
-
* A press a nested page's runtime told its shell (P148) within this long after the shell was seen
|
|
111
|
-
* to have stalled is no one's. The shell notes a press when it hears it, and a page that holds the
|
|
112
|
-
* thread it shares with its shell makes that late, by as long as it likes: when the page lets go,
|
|
113
|
-
* what waited behind it runs at once, the shell's own look among it, which may come first and say
|
|
114
|
-
* the stall, the press following a moment later as if it were new.
|
|
115
|
-
*/
|
|
116
|
-
export declare const SHELL_AFTER_STALL_MS = 500;
|
|
117
|
-
/** What a nested page's shell last said (P111), on the host's clock. */
|
|
118
|
-
export interface ShellWord {
|
|
119
|
-
/** Whether its engine tells activation at all (`navigator.userActivation`). */
|
|
120
|
-
readonly supported: boolean;
|
|
121
|
-
/** When its activation last turned on; -Infinity if it hasn't, or is off. */
|
|
122
|
-
readonly activatedAt: number;
|
|
123
|
-
/** Whether it last said the page's focus is in it, and when it last said focus came in. */
|
|
124
|
-
readonly focused: boolean;
|
|
125
|
-
readonly focusedAt: number;
|
|
126
|
-
/** Its activation turned on while it was stalled: uncertain until it goes off (`SHELL_STALL_MS`). */
|
|
127
|
-
readonly uncertain?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Its activation turned on within `TYPING_MS` of the person's typing on the host's page, the
|
|
130
|
-
* pointer not come over the frame since (`pressPossible`, judged as it turned on): where the
|
|
131
|
-
* host's page sees the pointer, their key landing in the page, no press (P120).
|
|
132
|
-
*/
|
|
133
|
-
readonly keyed?: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* When it last heard a real press from its page's runtime (P148); -Infinity, or absent, if it
|
|
136
|
-
* heard none, or the one it heard is uncertain (judged as an activation that turned on is).
|
|
137
|
-
*/
|
|
138
|
-
readonly pressedAt?: number;
|
|
139
|
-
/** How many presses it said it had heard, the last time it spoke: more is a new one. */
|
|
140
|
-
readonly presses?: number;
|
|
141
|
-
/** `keyed`, for the press at `pressedAt`: judged as the shell told it. */
|
|
142
|
-
readonly pressKeyed?: boolean;
|
|
143
|
-
}
|
|
144
|
-
/** One move of the keyboard the guard undid. */
|
|
145
|
-
export interface FocusTake {
|
|
146
|
-
/** The person pressed a key on the host's page within the last second. */
|
|
147
|
-
readonly typing: boolean;
|
|
148
|
-
/**
|
|
149
|
-
* Focus didn't stay back in the field: the frame kept it, took it again within `HELD_MS`, or it
|
|
150
|
-
* landed nowhere.
|
|
151
|
-
*/
|
|
152
|
-
readonly failed: boolean;
|
|
153
|
-
}
|
|
154
|
-
/** What the host's page knew when focus left one of its text fields for a display's frame. */
|
|
155
|
-
export interface FocusMove {
|
|
156
|
-
readonly now: number;
|
|
157
|
-
/** The engine told the host's page as it happened (its window blurred): Chromium, WebKit. */
|
|
158
|
-
readonly seen: boolean;
|
|
159
|
-
/** The frame element is `:active`: a press on it, pointer or touch (Chromium, WebKit). */
|
|
160
|
-
readonly pressed: boolean;
|
|
161
|
-
/** The pointer is over the frame element (`:hover`). */
|
|
162
|
-
readonly over: boolean;
|
|
163
|
-
/** When the pointer last came over the frame element (`pointerover`); -Infinity if never. */
|
|
164
|
-
readonly overSince: number;
|
|
165
|
-
/** The person's last key on the host's page, and when. */
|
|
166
|
-
readonly lastKey: {
|
|
167
|
-
readonly key: string;
|
|
168
|
-
readonly at: number;
|
|
169
|
-
} | null;
|
|
170
|
-
/** When the person last typed on the host's page (a key other than Tab and the modifiers). */
|
|
171
|
-
readonly typedAt: number;
|
|
172
|
-
/** When the text field focus left got it. */
|
|
173
|
-
readonly focusedAt: number;
|
|
174
|
-
/** When the host's page last saw a gesture of its own (a key, a press, a click, typed text). */
|
|
175
|
-
readonly gestureAt: number;
|
|
176
|
-
/** Whether the host's page has transient activation now; undefined where it can't tell. */
|
|
177
|
-
readonly activation: boolean | undefined;
|
|
178
|
-
/** The host moved focus into the frame itself (`DisplayHandle.focus()`), just now. */
|
|
179
|
-
readonly hostMoved: boolean;
|
|
180
|
-
/**
|
|
181
|
-
* A nested page's frame (P111): what its shell said, and when the host's page last had a
|
|
182
|
-
* trusted press or key of its own. Absent for any other frame.
|
|
183
|
-
*/
|
|
184
|
-
readonly shell?: {
|
|
185
|
-
readonly word: ShellWord;
|
|
186
|
-
readonly hostInputAt: number;
|
|
187
|
-
/** The host's page sees the pointer over its frames on this engine (`pressPossible`, P120). */
|
|
188
|
-
readonly pointerShown?: boolean;
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Whether the person moved focus into the frame themselves:
|
|
193
|
-
* - the host did (`DisplayHandle.focus()`);
|
|
194
|
-
* - by the keyboard: their last key on the host's page was Tab (or Shift+Tab), just now;
|
|
195
|
-
* - by a press on the frame: where the engine tells the move as it happens (Chromium, WebKit),
|
|
196
|
-
* the frame element is `:active`; where it doesn't (Firefox), the pointer is over the frame and
|
|
197
|
-
* came over it after the text field got focus and after the person last typed in the host's page
|
|
198
|
-
* (a page can't move the pointer; a composer that opened beside the frame while the pointer
|
|
199
|
-
* rested over it, and a person typing with it there, keep their keys);
|
|
200
|
-
* - by a gesture the host's own events don't explain: the host's page has transient activation,
|
|
201
|
-
* and for longer than activation lasts it saw no gesture of its own and the text field has had
|
|
202
|
-
* focus, so the person pressed or activated something in a frame since (an assistive
|
|
203
|
-
* technology's activation, which moves no pointer and sends the host no key, is one). The
|
|
204
|
-
* gesture that opened a composer (a selection in the frame, `selected`) is older than the
|
|
205
|
-
* composer's focus, and doesn't count.
|
|
206
|
-
* Anything else is the page's: focus goes back.
|
|
207
|
-
*/
|
|
208
|
-
export declare function personMoved(move: FocusMove): boolean;
|
|
209
|
-
/**
|
|
210
|
-
* Whether a nested page's shell saw the person's gesture just now (P111): its activation turned on
|
|
211
|
-
* within `SHELL_GESTURE_MS`, after the host's page's last trusted press or key.
|
|
212
|
-
*/
|
|
213
|
-
export declare function shellGesture(word: ShellWord, hostInputAt: number, now: number): boolean;
|
|
214
|
-
/**
|
|
215
|
-
* Whether a nested page's runtime told its shell a real press just now (P148): the shell heard it
|
|
216
|
-
* within `SHELL_GESTURE_MS`, after the host's page's last trusted press or key. What the shell's
|
|
217
|
-
* activation can't say: a press while it is already on (within 5 s of the last gesture).
|
|
218
|
-
*/
|
|
219
|
-
export declare function shellPress(word: ShellWord, hostInputAt: number, now: number): boolean;
|
|
220
|
-
/**
|
|
221
|
-
* Whether a nested page's shell saw the person's gesture just now, either way: its activation
|
|
222
|
-
* turned on (`shellGesture`, P111), or its page's runtime told it a press (`shellPress`, P148);
|
|
223
|
-
* each only where a press could have made it (P120: `shown`, the host's page sees the pointer over
|
|
224
|
-
* its frames, and the word is `keyed`, the person's key landing in the page).
|
|
225
|
-
*/
|
|
226
|
-
export declare function shellSaw(word: ShellWord, hostInputAt: number, now: number, shown: boolean): boolean;
|
|
227
|
-
/**
|
|
228
|
-
* Whether the person could have pressed the frame just before `at` (P120): a nested page's shell
|
|
229
|
-
* says its activation turned on, which a key typed into the page does as well as a press. Where the
|
|
230
|
-
* host's page sees the pointer over its frames (`shown`: Firefox; Chromium and WebKit where the frame
|
|
231
|
-
* is in their process, not full Chromium), a press needs the pointer over the frame, come over it
|
|
232
|
-
* since the person last typed on the host's page; within `TYPING_MS` of that typing, an activation
|
|
233
|
-
* with the pointer elsewhere is their keys landing in the page. Anywhere else it may be a press.
|
|
234
|
-
*/
|
|
235
|
-
export declare function pressPossible(shown: boolean, over: boolean, overSince: number, typedAt: number, at: number): boolean;
|
|
236
|
-
/** Whether `element` takes the person's typed text: a text field, a text area, an editable region. */
|
|
237
|
-
export declare function takesText(element: Element | null): element is HTMLElement;
|
|
238
|
-
/** One page's guard, shared by every display's frame on it. */
|
|
239
|
-
export interface FocusGuard {
|
|
240
|
-
/**
|
|
241
|
-
* Guards `frame`: `taken` hears each move into it that was undone. `nested`: it holds a nested
|
|
242
|
-
* page's shell (P111), whose word (`shell`) decides the moves into it.
|
|
243
|
-
*/
|
|
244
|
-
add(frame: HTMLIFrameElement, taken: (take: FocusTake) => void, options?: {
|
|
245
|
-
readonly nested?: boolean;
|
|
246
|
-
/** Asks a nested page's shell to look now (P120); it answers with a report naming `n`. */
|
|
247
|
-
readonly ask?: (n: number) => void;
|
|
248
|
-
}): () => void;
|
|
249
|
-
/** What a nested page's shell said (P111): its activation, its focus. */
|
|
250
|
-
shell(frame: HTMLIFrameElement, said: {
|
|
251
|
-
readonly supported: boolean;
|
|
252
|
-
readonly ago: number | null;
|
|
253
|
-
readonly focused: boolean;
|
|
254
|
-
/** How long the shell went without a look before this one (its own clock). */
|
|
255
|
-
readonly gap: number;
|
|
256
|
-
/** The ask this report answers (P120), if it answers one. */
|
|
257
|
-
readonly asked?: number;
|
|
258
|
-
/**
|
|
259
|
-
* Its page's runtime's real presses (P148): how long ago the shell heard the last (null:
|
|
260
|
-
* none since the frame's last load), and how many it has heard. Absent from an older shell.
|
|
261
|
-
*/
|
|
262
|
-
readonly pressed?: number | null;
|
|
263
|
-
readonly presses?: number;
|
|
264
|
-
}): void;
|
|
265
|
-
/** A nested page's shell's heartbeat (P111): it is looking. */
|
|
266
|
-
beat(frame: HTMLIFrameElement): void;
|
|
267
|
-
/** Whether a nested page's shell saw the person's gesture just now (`shellGesture`). */
|
|
268
|
-
gesture(frame: HTMLIFrameElement): boolean;
|
|
269
|
-
/** The host moves focus into `frame` itself. */
|
|
270
|
-
focus(frame: HTMLIFrameElement): void;
|
|
271
|
-
/**
|
|
272
|
-
* Whether the page's focus is in `frame` now, the person's own (once any move into it was
|
|
273
|
-
* judged; on an engine that tells the host's page nothing, here and then).
|
|
274
|
-
*/
|
|
275
|
-
focused(frame: HTMLIFrameElement): boolean;
|
|
276
|
-
/** The host moves focus into one of its text fields: see `focusField`. */
|
|
277
|
-
field(field: HTMLElement): void;
|
|
278
|
-
}
|
|
279
|
-
/** The guard for `view`'s page, made on first use. */
|
|
280
|
-
export declare function focusGuard(view: Window): FocusGuard;
|
|
281
|
-
/**
|
|
282
|
-
* Moves focus into one of the host page's text fields (a composer that opens beside a display,
|
|
283
|
-
* P109): `field.focus()` for a host to call instead. Firefox doesn't move focus from a frame that
|
|
284
|
-
* holds it with a gesture of the person's and takes it back on its own blur (measured: the keys
|
|
285
|
-
* then go to the frame); this blurs the frame first, and the focus guard watches that focus lands,
|
|
286
|
-
* counting a frame that keeps it toward stopping its display. Elsewhere it is `field.focus()`.
|
|
287
|
-
*/
|
|
288
|
-
export declare function focusField(field: HTMLElement): void;
|