* see VSCode's BrowserKeyboardMapperFactoryBase._getBrowserKeyMapping
()
| 37 | * see VSCode's BrowserKeyboardMapperFactoryBase._getBrowserKeyMapping |
| 38 | */ |
| 39 | async getLayoutMap() { |
| 40 | const keyboard = (navigator as any).keyboard as NavigatorKeyboard | null; |
| 41 | |
| 42 | if (!keyboard) { |
| 43 | throw new Error( |
| 44 | '"navigator.keyboard" is not available — it should not be called from the editor' |
| 45 | ); |
| 46 | } |
| 47 | |
| 48 | const keyboardLayoutMap = await keyboard.getLayoutMap(); |
| 49 | // KeyboardLayoutMap can't be cloned, so it can't be sent with postMessage |
| 50 | return new Map(keyboardLayoutMap); |
| 51 | }, |
| 52 | async setTitle(title: string) { |
| 53 | document.title = title; |
| 54 | }, |
nothing calls this directly
no test coverage detected