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

Allow emulating devices #37

Closed
wants to merge 1 commit into from
Closed

Allow emulating devices #37

wants to merge 1 commit into from

Conversation

pavelfeldman
Copy link
Contributor

No description provided.

const recepients = [window.__proto__, document.__proto__];
for (let i = 0; i < touchEvents.length; ++i) {
for (let j = 0; j < recepients.length; ++j) {
if (!(touchEvents[i] in recepients[j])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's rather:

if (touchEvents[i] in recepients[j])
  continue;

lib/Page.js Outdated
let fitWindow = false;
let userAgent = device['user-agent'];
return Promise.all([
this._client.send('Emulation.setDeviceMetricsOverride', { mobile, width, height, deviceScaleFactor, screenOrientation, fitWindow }),
Copy link
Contributor

Choose a reason for hiding this comment

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

this clashes with page.screenshot({clip}) and page.setVisibleSize(size)

@aslushnikov aslushnikov mentioned this pull request Jun 22, 2017
@aslushnikov
Copy link
Contributor

Closing this since it's a dupe of just-landed #72

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.

None yet

2 participants