提交 6efc0b69 编写于 作者: M Matt Bierner

Fix/supress ts-check errors in js

Fixes #99226
上级 0145e38e
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
} }
} }
window.createWebviewManager({ (/** @type {any} */ (window)).createWebviewManager({
postMessage: hostMessaging.postMessage.bind(hostMessaging), postMessage: hostMessaging.postMessage.bind(hostMessaging),
onMessage: hostMessaging.onMessage.bind(hostMessaging), onMessage: hostMessaging.onMessage.bind(hostMessaging),
ready: workerReady, ready: workerReady,
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* focusIframeOnCreate?: boolean, * focusIframeOnCreate?: boolean,
* ready?: Promise<void>, * ready?: Promise<void>,
* onIframeLoaded?: (iframe: HTMLIFrameElement) => void, * onIframeLoaded?: (iframe: HTMLIFrameElement) => void,
* fakeLoad: boolean, * fakeLoad?: boolean,
* rewriteCSP: (existingCSP: string, endpoint?: string) => string, * rewriteCSP: (existingCSP: string, endpoint?: string) => string,
* }} WebviewHost * }} WebviewHost
*/ */
...@@ -605,6 +605,6 @@ ...@@ -605,6 +605,6 @@
if (typeof module !== 'undefined') { if (typeof module !== 'undefined') {
module.exports = createWebviewManager; module.exports = createWebviewManager;
} else { } else {
window.createWebviewManager = createWebviewManager; (/** @type {any} */ (window)).createWebviewManager = createWebviewManager;
} }
}()); }());
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
/// <reference lib="webworker" />
const VERSION = 1; const VERSION = 1;
const rootPath = self.location.pathname.replace(/\/service-worker.js$/, ''); const rootPath = self.location.pathname.replace(/\/service-worker.js$/, '');
...@@ -273,4 +275,4 @@ async function getOuterIframeClient(webviewId) { ...@@ -273,4 +275,4 @@ async function getOuterIframeClient(webviewId) {
const clientUrl = new URL(client.url); const clientUrl = new URL(client.url);
return (clientUrl.pathname === `${rootPath}/` || clientUrl.pathname === `${rootPath}/index.html`) && clientUrl.search.match(new RegExp('\\bid=' + webviewId)); return (clientUrl.pathname === `${rootPath}/` || clientUrl.pathname === `${rootPath}/index.html`) && clientUrl.search.match(new RegExp('\\bid=' + webviewId));
}); });
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册