Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Introduce setEmulateMedia so that we can emulate print css for example #302

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

aml11
Copy link

@aml11 aml11 commented Sep 26, 2017

Also add a way to send parameters to chrome launcher (we need it to be able to run headless-ly and with extensions enabled for some scenarios.
For example, in order to create a pdf with setEmulatedMedia("print") we will create chromeless like this:

const chromeless = new Chromeless({chromeFlags:[
        // Disable built-in Google Translate service
        '--disable-translate',
        // Disable all chrome extensions entirely
        //'--disable-extensions',
        // Disable various background network services, including extension updating,
        //   safe browsing service, upgrade detector, translate, UMA
        '--disable-background-networking',
        // Disable fetching safebrowsing lists, likely redundant due to disable-background-networking
        '--safebrowsing-disable-auto-update',
        // Disable syncing to a Google account
        '--disable-sync',
        // Disable reporting to UMA, but allows for collection
        '--metrics-recording-only',
        // Disable installation of default apps on first run
        '--disable-default-apps',
        // Mute any audio
        '--mute-audio',
        // Skip first run wizards
        '--no-first-run',
        '--headless',
      ]
    })

@aml11 aml11 changed the title Interduce setEmulateMedia so that we can emulate print css for example Introduce setEmulateMedia so that we can emulate print css for example Sep 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant