Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(chromium): resize browser frame when emulating viewport #1924

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

pavelfeldman
Copy link
Member

No description provided.

@@ -67,7 +68,7 @@ export class CRPage implements PageDelegate {
this._mainFrameSession = new FrameSession(this, client, targetId);
this._sessions.set(targetId, this._mainFrameSession);
client.once(CRSessionEvents.Disconnected, () => this._page._didDisconnect());
this._pagePromise = this._mainFrameSession._initialize().then(() => this._initializedPage = this._page).catch(e => e);
this._pagePromise = this._mainFrameSession._initialize(!!isHeadful).then(() => this._initializedPage = this._page).catch(e => e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: isHeadful is always defined, make it non-optional

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -364,10 +366,14 @@ class FrameSession {
];
}

async _initialize() {
async _initialize(isHeadful: boolean) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can you give the parameter a name that would make more sense for headful oopif or pass actual isHeadful value in addFrameSession? It took me some time to figure out that it's not a bug in addFrameSession.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants