Mathias BynensVerified account

@mathias

I work on & at Google and on ECMAScript through TC39. ♥ JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.

Munich, Germany
Joined January 2007

Media

  1. Replying to
  2. Puppeteer v2.1.0 is out! 🔥 ➡️ Chromium 80 ➡️ puppeteer.launch({product: 'firefox'}) Puppeteer can now talk to a real, unpatched Firefox binary. You no longer need to install puppeteer-firefox separately!

    `puppeteer.launch` now accepts a `product` option which can be set to `'firefox'`.
  3. 🔥 JavaScript regular expressions are getting more powerful! RegExp match objects now have an `indices` array that contains the start and end positions for each capturing group. explains:

  4. Hͫ̆̒̐ͣ̊̄ͯ͗͏̵̗̻̰̠̬͝ͅE̴̷̬͎̱̘͇͍̾ͦ͊͒͊̓̓̐_̫̠̱̩̭̤͈̑̎̋ͮͩ̒͑̾͋͘Ç̳͕̯̭̱̲̣̠̜͋̍O̴̦̗̯̹̼ͭ̐ͨ̊̈͘͠M̶̝̠̭̭̤̻͓͑̓̊ͣͤ̎͟͠E̢̞̮̹͍̞̳̣ͣͪ͐̈T̡̯̳̭̜̠͕͌̈́̽̿ͤ̿̅̑Ḧ̱̱̺̰̳̹̘̰́̏ͪ̂̽͂̀͠ is a perfectly valid JavaScript identifier.

  5. Replying to

    Did you watch the video? We point to the benchmark on GitHub around the 04:58 mark:

  6. 🚀 For large JSON-compatible objects, JSON.parse is faster than JS object literals. ➡️ True for all browser JavaScript engines! ➡️ Speed-ups from 1.2× to 2× 🎥 My lightning talk explains why:

  7. Replying to
  8. Replacing all occurrences of a substring with another string is a common operation. Unfortunately, doing this correctly is surprisingly hard in JavaScript. 🤯 The new String.prototype.replaceAll API is here to help! 🎉

  9. Replying to and

    None of the gists show up:

  10. Alternatively, you could use in Chrome Canary. Emulating timezones is supported through the Sensors panel (since it’s tied to geolocation). Set the desired timezone before loading the page, and there you go!

    Show this thread
  11. The web app lets you view the schedule in your own timezone: Super handy! With Puppeteer v2, you can now write automated tests for this functionality. This script takes a screenshot of the schedule as viewed from Buenos Aires.

    Show this thread
  12. Puppeteer v2.0.0 is out! 🔥 ➡️ Emulate CSS media features such as dark/light mode or prefers-reduced-motion ➡️ Emulate timezones ➡️ Improved page.screenshot

  13. Replying to and

    And re: optimize-js, the difference between the numbers you list (0.6 ms) seems insignificant: Without optimize-js: 11.86ms With optimize-js: 11.24ms The V8 team recommends against using optimize-js nowadays:

  14. Replying to

    There seem to be some inaccuracies here. The "lazy parsing over and over" problem has been fixed since v6.3 / Chrome 63:

  15. Replying to

    You mean like this? Available in Canary 🔥

  16. Replying to

    “It is reserved for UA instructions, such as `text=`, and is stripped from the URL during loading so that author scripts can’t directly interact with it.”

  17. URL syntax & terminology: ➡️ Within a URL, # starts a URL fragment (or “hash”). ➡️ Within a URL fragment, :~: starts a URL fragment directive. #:~:text=hello%20world instructs the browser to highlight + scroll to the text “hello world”. 📖

  18. Replying to

    Agreed! From our first write-up in this series:

  19. 🔥 The story of a performance cliff in React ➡️ how are JavaScript values represented in memory? ➡️ what are shape migrations & deprecations? ➡️ how do Object.{preventExtensions,seal,freeze} work?

  20. Replying to

    1. I remember DM'ing you to confirm before our presentation (thanks again)! 2. We covered this: but decided to omit this side note from the article. Also, ftw! 3. V8 still calls them "maps", but "shapes" is the clearest term IMHO.

Loading seems to be taking a while.

Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

    You may also like

    ·