diff --git a/README.md b/README.md index 316ffc5..6668efe 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,17 @@ const test = require("node:test"); const puppeteer = require("puppeteer-core"); const chromium = require("@sparticuz/chromium"); +// Optional: If you'd like to use the legacy headless mode. "new" is the default. +chromium.setHeadlessMode = true; + +// Optional: If you'd like to disable webgl, true is the default. +chromium.setGraphicsMode = false; + +// Optional: Load any fonts you need. Open Sans is included by default in AWS Lambda instances +await chromium.font( + "https://raw.githack.com/googlei18n/noto-emoji/master/fonts/NotoColorEmoji.ttf" +); + test("Check the page title of example.com", async (t) => { const browser = await puppeteer.launch({ args: chromium.args,