chore: cleanup dead <webview> related code (#29039)

This commit is contained in:
Milan Burda 2021-05-06 22:56:05 +02:00 committed by GitHub
parent dab9a88413
commit cbba602eae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 18 deletions

View file

@ -17,7 +17,6 @@ export const enum WEB_VIEW_CONSTANTS {
// Error messages.
ERROR_MSG_ALREADY_NAVIGATED = 'The object has already navigated, so its partition cannot be changed.',
ERROR_MSG_CANNOT_INJECT_SCRIPT = '<webview> = ' + 'Script cannot be injected into content until the page has loaded.',
ERROR_MSG_INVALID_PARTITION_ATTRIBUTE = 'Invalid partition attribute.',
ERROR_MSG_INVALID_PRELOAD_ATTRIBUTE = 'Only "file:" protocol is supported in "preload" attribute.'
}

View file

@ -18,8 +18,6 @@ type IWebViewImpl = webViewImplModule.WebViewImpl;
const defineWebViewElement = (v8Util: NodeJS.V8UtilBinding, webViewImpl: typeof webViewImplModule) => {
const { guestViewInternal, WebViewImpl } = webViewImpl;
return class WebViewElement extends HTMLElement {
public internalInstanceId?: number;
static get observedAttributes () {
return [
WEB_VIEW_CONSTANTS.ATTRIBUTE_PARTITION,
@ -78,7 +76,6 @@ const defineWebViewElement = (v8Util: NodeJS.V8UtilBinding, webViewImpl: typeof
guestViewInternal.detachGuest(internal.guestInstanceId);
}
internal.elementAttached = false;
this.internalInstanceId = 0;
internal.reset();
}
};