fix: remove undocumented feature and flaky test for webview resize event (#36154)

This commit is contained in:
Jeremy Rose 2022-10-27 16:44:53 -07:00 committed by GitHub
parent 67a0c702fa
commit b9464d89b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 43 deletions

View file

@ -24,7 +24,6 @@ export class WebViewImpl {
public guestInstanceId?: number
public hasFocus = false
public internalInstanceId?: number;
public resizeObserver?: ResizeObserver;
public viewInstanceId: number
// on* Event handlers.
@ -103,14 +102,6 @@ export class WebViewImpl {
this.attributes.get(attributeName)!.handleMutation(oldValue, newValue);
}
onElementResize () {
const props = {
newWidth: this.webviewNode.clientWidth,
newHeight: this.webviewNode.clientHeight
};
this.dispatchEvent('resize', props);
}
createGuest () {
this.internalInstanceId = getNextId();
this.hooks.guestViewInternal.createGuest(this.internalElement, this.internalInstanceId, this.buildParams())
@ -203,10 +194,6 @@ export class WebViewImpl {
}
this.guestInstanceId = guestInstanceId;
// TODO(zcbenz): Should we deprecate the "resize" event? Wait, it is not
// even documented.
this.resizeObserver = new ResizeObserver(this.onElementResize.bind(this));
this.resizeObserver.observe(this.internalElement);
}
}