profile
viewpoint
Mathias Bynens mathiasbynens @Google https://mathiasbynens.be/ Web standards fanatic. JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, macOS.

domchristie/turndown 5152

🛏 An HTML to Markdown converter written in JavaScript

kangax/html-minifier 4285

Javascript-based HTML compressor/minifier (with Node.js support)

addyosmani/puppeteer-webperf 1285

Automating Web Performance testing with Puppeteer 🎪

GoogleChromeLabs/jsvu 1118

JavaScript (engine) Version Updater

GoogleChromeLabs/jsbi 615

JSBI is a pure-JavaScript implementation of the official ECMAScript BigInt proposal.

bramus/mixed-content-scan 508

Scan your HTTPS-enabled website for Mixed Content

googlesamples/web-fundamentals 291

Google Web Fundamentals

konklone/shaaaaaaaaaaaaa 207

Check if a website has weak SHA-1 TLS certificates.

gf3/WAT 102

LOLWAT?

GoogleChromeLabs/json-parse-benchmark 80

Benchmark comparing JSON.parse vs. equivalent JavaScript literals across JavaScript engines.

pull request commentv8/v8.dev

Slack Tracking

@RReverser Can haz @v8js tweet for this?

ripsawridge

comment created time in 11 hours

push eventv8/api

V8 API docs updater

commit sha 4f718586b51c7c30ca7605aa0544b0390ba8a089

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 2 days

push eventv8/api

V8 API docs updater

commit sha e505951d727aed1dbe57aad8a056d56198ea9709

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 2 days

issue commentlodash/lodash

Outdated lodash-es

I don't have any more information than you all do. I don't know how to cut a lodash-es release.

FritzHerbers

comment created time in 2 days

push eventpuppeteer/puppeteer

Yang Guo

commit sha 96f3d439f5748ff707d64fb41af50786c0d33ad7

feat(console): expose stack trace for console messages (#6445)

view details

push time in 2 days

delete branch puppeteer/puppeteer

delete branch : remove-test-types

delete time in 2 days

push eventpuppeteer/puppeteer

Jack Franklin

commit sha 322cc96e7b3a37ee47cd37dec4ed06248f133077

chore: remove npm run test-types call (#6447) It was an old script that doesn't exist any more.

view details

push time in 2 days

PR merged puppeteer/puppeteer

chore: remove npm run test-types call cla: yes

It was an old script that doesn't exist any more.

+1 -1

0 comment

1 changed file

jackfranklin

pr closed time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(console): expose stack trace for console messages

 export class ConsoleMessage {    * @returns The location of the console message.    */   location(): ConsoleMessageLocation {-    return this._location;+    return this._stackTraceLocations[0] ?? {};

Longer-term it might make sense to fix our tsconfig to align with the maintenance Node.js LTS version, so we don't have to worry about this in the future.

hashseed

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(console): expose stack trace for console messages

 export class ConsoleMessage {    * @returns The location of the console message.    */   location(): ConsoleMessageLocation {-    return this._location;+    return this._stackTraceLocations[0] ?? {};

We support the latest maintenance Node.js LTS, so we cannot use nullish coalescing syntax in the compiled JS yet. Let's double-check that the generated output works in Node.js v10. cc @jackfranklin

hashseed

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventv8/api

V8 API docs updater

commit sha b8247d6dacc60c22fb1802b03151fc8a5593f235

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 3 days

push eventv8/api

V8 API docs updater

commit sha 94a93768b7d05ff374665e6720d42f1ef1e0ed1f

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 3 days

push eventv8/v8.dev

Mathias Bynens

commit sha 6be369a677960ece6be3e3271b806fd37dd25983

Code style nits (#478)

view details

push time in 3 days

delete branch v8/v8.dev

delete branch : code-style-nits

delete time in 3 days

PR merged v8/v8.dev

Reviewers
Code style nits blog cla: yes
+35 -35

1 comment

1 changed file

mathiasbynens

pr closed time in 3 days

PR opened v8/v8.dev

Reviewers
Code style nits blog
+35 -35

0 comment

1 changed file

pr created time in 3 days

create barnchv8/v8.dev

branch : code-style-nits

created branch time in 3 days

push eventpuppeteer/ispuppeteerfirefoxready

mathiasbynens

commit sha 324db6d8b1b418f6c284e6e2cf16e91bcf130c1d

Deploying to gh-pages from main @ ee8ffcd74126fd17e8b11e2a6fb663cd7376e6c1 🚀

view details

push time in 4 days

push eventpuppeteer/ispuppeteerfirefoxready

mathiasbynens

commit sha 81cbd6f3f68a4bea98d49586ea24bfdbc88ca5db

Deploying to gh-pages from main @ ee8ffcd74126fd17e8b11e2a6fb663cd7376e6c1 🚀

view details

push time in 4 days

push eventv8/api

V8 API docs updater

commit sha 79f3a9eb8820113431df4070fc5cffe492dc6d9e

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 4 days

push eventv8/api

V8 API docs updater

commit sha 26b4cca1eb6261484687aeee09a9f2948d670c21

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 4 days

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): differentiate between user-defined and internal query handlers

 describe('querySelector', function () {       expect(second).toEqual([]);     });   });++  // This is the same tests for `$$eval` and `$$` as above, but with a queryAll+  // handler that returns an array instead of a list of nodes.+  describe('QueryAll', function () {+    const handler: CustomQueryHandler = {+      queryAll: (element: Element, selector: string) =>+        Array.from(element.querySelectorAll(selector)),+    };+    before(() => {+      const { puppeteer } = getTestState();+      puppeteer.__experimental_registerCustomQueryHandler('allArray', handler);+    });+    it('$$ should query existing elements', async () => {+      const { page } = getTestState();++      await page.setContent(+        '<html><body><div>A</div><br/><div>B</div></body></html>'+      );+      const html = await page.$('html');+      const elements = await html.$$('allArray/div');+      expect(elements.length).toBe(2);+      const promises = elements.map((element) =>+        page.evaluate((e: HTMLElement) => e.textContent, element)+      );+      expect(await Promise.all(promises)).toEqual(['A', 'B']);+    });++    it('$$ should return empty array for non-existing elements', async () => {+      const { page } = getTestState();++      await page.setContent(+        '<html><body><span>A</span><br/><span>B</span></body></html>'+      );+      const html = await page.$('html');+      const elements = await html.$$('allArray/div');+      expect(elements.length).toBe(0);+    });+    it('$$eval should work', async () => {+      const { page } = getTestState();++      await page.setContent(+        '<div>hello</div><div>beautiful</div><div>world!</div>'+      );+      const divsCount = await page.$$eval(+        'allArray/div',+        (divs) => divs.length+      );+      expect(divsCount).toBe(3);+    });+    it('$$eval should accept extra arguments', async () => {+      const { page } = getTestState();+      await page.setContent(+        '<div>hello</div><div>beautiful</div><div>world!</div>'+      );+      const divsCountPlus5 = await page.$$eval(+        'allArray/div',+        (divs, two: number, three: number) => divs.length + two + three,+        2,+        3+      );+      expect(divsCountPlus5).toBe(8);+    });+    it('$$eval should accept ElementHandles as arguments', async () => {+      const { page } = getTestState();+      await page.setContent(+        '<section>2</section><section>2</section><section>1</section><div>3</div>'+      );+      const divHandle = await page.$('div');+      const sum = await page.$$eval(+        'allArray/section',+        (sections, div: HTMLElement) =>+          sections.reduce(+            (acc, section) => acc + Number(section.textContent),+            0+          ) + Number(div.textContent),+        divHandle+      );+      expect(sum).toBe(8);+    });+    it('$$eval should handle many elements', async () => {+      const { page } = getTestState();+      await page.evaluate(+        `+        for (var i = 0; i <= 1000; i++) {
        for (let i = 0; i <= 1000; i++) {
johanbay

comment created time in 4 days

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): differentiate between user-defined and internal query handlers

 describe('querySelector', function () {       const divsCount = await page.$$eval('div', (divs) => divs.length);       expect(divsCount).toBe(3);     });+    it('should accept extra arguments', async () => {+      const { page } = getTestState();+      await page.setContent(+        '<div>hello</div><div>beautiful</div><div>world!</div>'+      );+      const divsCountPlus5 = await page.$$eval(+        'div',+        (divs, two: number, three: number) => divs.length + two + three,+        2,+        3+      );+      expect(divsCountPlus5).toBe(8);+    });+    it('should accept ElementHandles as arguments', async () => {+      const { page } = getTestState();+      await page.setContent(+        '<section>2</section><section>2</section><section>1</section><div>3</div>'+      );+      const divHandle = await page.$('div');+      const sum = await page.$$eval(+        'section',+        (sections, div: HTMLElement) =>+          sections.reduce(+            (acc, section) => acc + Number(section.textContent),+            0+          ) + Number(div.textContent),+        divHandle+      );+      expect(sum).toBe(8);+    });+    it('should handle many elements', async () => {+      const { page } = getTestState();+      await page.evaluate(+        `+        for (var i = 0; i <= 1000; i++) {
        for (let i = 0; i <= 1000; i++) {
johanbay

comment created time in 4 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): differentiate between user-defined and internal query handlers

 describe('querySelector', function () {       expect(second).toEqual([]);     });   });++  // this is the same tests for `$$eval` and `$$` as above, but with a handler+  // that returns an array instead of a list of nodes.+  describe('Custom query handler QueryAll can return Element[]', function () {

Yeah, names of internal APIs are fine if they are what's really being tested. Your suggestion SGTM!

johanbay

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): differentiate between user-defined and internal query handlers

 describe('querySelector', function () {       expect(second).toEqual([]);     });   });++  // this is the same tests for `$$eval` and `$$` as above, but with a handler+  // that returns an array instead of a list of nodes.+  describe('Custom query handler QueryAll can return Element[]', function () {

The string passed to describe() is generally the name of the API that's being tested

johanbay

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): differentiate between user-defined and internal query handlers

 describe('querySelector', function () {       expect(second).toEqual([]);     });   });+

Not a fan of for loops around tests — they make it harder to debug. I like the current approach. Consider adding a comment to the tests at the top to indicate that they’re copied below? (You already added a comment in the new place.)

johanbay

comment created time in 4 days

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): differentiate between user-defined and internal query handlers

 describe('querySelector', function () {       expect(second).toEqual([]);     });   });++  // this is the same tests for `$$eval` and `$$` as above, but with a handler

nit: comments should be sentences

  // This is the same tests for `$$eval` and `$$` as above, but with a handler
johanbay

comment created time in 4 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

push eventv8/api

V8 API docs updater

commit sha 605469970dd25e59912c1341bc524770f30a4be4

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 5 days

push eventv8/api

V8 API docs updater

commit sha 147d140567294b210bfb9592273b3a3dbbbe32ae

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 5 days

push eventtibiamaps/tibia-map-data

mathiasbynens

commit sha 451ef9caf6f9e7b997a0d546bfe184ac27c4485b

Update generated map data @ 03a69486119dc3a11b5644a3d1a02879a31f226b

view details

push time in 5 days

push eventtibiamaps/tibia-map-data

Mathias Bynens

commit sha 03a69486119dc3a11b5644a3d1a02879a31f226b

Explore Gaffir’s new secret room Dragging Gaffir’s body onto a fire basin and stepping on its carpet teleports you to a small room: https://tibiamaps.io/map#33302,31196,9:2 If you use a Spatial Warp Almanac inside that room, you’re sent to another room: https://tibiamaps.io/map#32898,31666,8:2 Closes #100.

view details

push time in 5 days

issue closedtibiamaps/tibia-map-data

Gaffir's secret room #2

When you drag Gaffir's body onto a fire basin and step on its carpet you are teleported to a small room, here:

https://tibiamaps.io/map#33302,31196,9:2

If you use a Spatial Warp Almanac inside the room you're sent to another room which is currently missing, here:

https://tibiamaps.io/map#32898,31666,8:2

Minimap_32768_31488_8.zip

closed time in 5 days

LeeKunTibia

Pull request review commentw3c/webdriver-bidi

Add initial support for subscribing to events.

 occurred on the [=remote end=].     - <code>params</code> which defines a mapping containing event data. The       populated value of this map is the <dfn export for=command>event       parameters</code>.+ - A <dfn export>remote end event trigger</dfn> which define when the event is
 - A <dfn export>remote end event trigger</dfn> which defines when the event is
jgraham

comment created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentGoogleChrome/web.dev

[Idle Detection article] Add Puppeteer testing info

 You can see the various options in the video below.   </figcaption> </figure> +### Puppeteer support++As of Puppeteer version&nbsp;5.3.1, you can+[emulate the various idle states](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pageemulateidlestateoverrides)+to test the API over the DevTools Protocol.

Over the DevTools Protocol is an implementation detail that might not be super interesting to people. Maybe omit that and focus on what this means for them? Maybe something like:

to programmatically test how your web app’s behavior changes.
tomayac

comment created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentGoogleChrome/web.dev

[Idle Detection article] Add Puppeteer testing info

cc @sadym-chromium

tomayac

comment created time in 5 days

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): differentiate between user-defined and internal query handlers

  * limitations under the License.  */ -export interface QueryHandler {+import { WaitForSelectorOptions, DOMWorld } from './DOMWorld.js';+import { ElementHandle, JSHandle } from './JSHandle.js';++/**+ * @internal+ */+interface QueryHandler {+  queryOne?: (+    element: ElementHandle,+    selector: string+  ) => Promise<ElementHandle | null>;+  waitFor?: (+    domWorld: DOMWorld,+    selector: string,+    options: WaitForSelectorOptions+  ) => Promise<ElementHandle | null>;+  queryAll?: (+    element: ElementHandle,+    selector: string+  ) => Promise<ElementHandle[]>;+  queryAllArray?: (+    element: ElementHandle,+    selector: string+  ) => Promise<JSHandle>;+}++export interface CustomQueryHandler {   queryOne?: (element: Element | Document, selector: string) => Element | null;   queryAll?: (     element: Element | Document,     selector: string   ) => Element[] | NodeListOf<Element>; } -const _customQueryHandlers = new Map<string, QueryHandler>();+function mkQueryHandler(handler: CustomQueryHandler): QueryHandler {+  const internalHandler: QueryHandler = {};++  if (handler.queryOne) {+    internalHandler.queryOne = async (element, selector) => {+      const jsHandle = await element.evaluateHandle(handler.queryOne, selector);+      const elementHandle = jsHandle.asElement();+      if (elementHandle) return elementHandle;+      await jsHandle.dispose();+      return null;+    };+    internalHandler.waitFor = (+      domWorld: DOMWorld,+      selector: string,+      options: WaitForSelectorOptions+    ) => domWorld.waitForSelectorInPage(handler.queryOne, selector, options);+  }++  if (handler.queryAll) {+    internalHandler.queryAll = async (element, selector) => {+      const jsHandle = await element.evaluateHandle(handler.queryAll, selector);+      const properties = await jsHandle.getProperties();+      await jsHandle.dispose();+      const result = [];+      for (const property of properties.values()) {+        const elementHandle = property.asElement();+        if (elementHandle) result.push(elementHandle);+      }+      return result;+    };+    internalHandler.queryAllArray = async (element, selector) => {+      const resultHandle = await element.evaluateHandle(+        handler.queryAll,+        selector+      );+      const arrayHandle = await resultHandle.evaluateHandle(+        (res: Element[] | NodeListOf<Element>) => Array.from(res)+      );+      return arrayHandle;+    };+  }++  return internalHandler;+}++const _queryHandlers = new Map<string, QueryHandler>();+const _defaultHandler = mkQueryHandler({+  queryOne: (element: Element, selector: string) =>+    element.querySelector(selector),+  queryAll: (element: Element, selector: string) =>+    element.querySelectorAll(selector),+});  export function registerCustomQueryHandler(   name: string,-  handler: QueryHandler+  handler: CustomQueryHandler ): void {-  if (_customQueryHandlers.get(name))+  if (_queryHandlers.get(name))     throw new Error(`A custom query handler named "${name}" already exists`);    const isValidName = /^[a-zA-Z]+$/.test(name);   if (!isValidName)     throw new Error(`Custom query handler names may only contain [a-zA-Z]`); -  _customQueryHandlers.set(name, handler);+  const internalHandler = mkQueryHandler(handler);++  _queryHandlers.set(name, internalHandler); }  /**  * @param {string} name  */ export function unregisterCustomQueryHandler(name: string): void {-  _customQueryHandlers.delete(name);+  if (_queryHandlers.has(name)) {+    _queryHandlers.delete(name);+  } } -export function customQueryHandlers(): Map<string, QueryHandler> {-  return _customQueryHandlers;+export function customQueryHandlerNames(): string[] {+  return Array.from(_queryHandlers.keys());

This is debatable, but I weakly prefer array spread syntax here:

[..._queryHandlers.keys()]

WDYT?

johanbay

comment created time in 5 days

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): differentiate between user-defined and internal query handlers

 export class ElementHandle<     const { updatedSelector, queryHandler } = getQueryHandlerAndSelector(       selector     );-    const queryHandlerToArray = Function(-      'element',-      'selector',-      `return Array.from((${queryHandler.queryAll})(element, selector));`-    ) as (...args: unknown[]) => unknown;-    const arrayHandle = await this.evaluateHandle(-      queryHandlerToArray,-      updatedSelector-    );+    const arrayHandle = await queryHandler.queryAllArray(this, updatedSelector);     const result = await arrayHandle.evaluate<       (         elements: Element[],

This is a comment on all the changes in src/common/JSHandle.ts: wow, this is so much nicer! Awesome refactoring.

johanbay

comment created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentmathiasbynens/css-dbg-stories

Switch to proper permission `idle-detection`

fyi @tomayac (but you probably knew this already)

sadym-chromium

comment created time in 5 days

MemberEvent

push eventmathiasbynens/css-dbg-stories

Maksim Sadym

commit sha b456629095e3c1c6e0b8b5e947121a6b08f96212

Update idle-detector.html (#3) Permission for `IdleDetector` changed from `notifications` to `idle-detection` in the CL [idle-detection: Implement permissions prompt and settings UI](https://chromium-review.googlesource.com/c/chromium/src/+/2360485)

view details

push time in 5 days

PR merged mathiasbynens/css-dbg-stories

Switch to proper permission `idle-detection`

Permission for IdleDetector changed from notifications to idle-detection in the CL idle-detection: Implement permissions prompt and settings UI

+1 -1

0 comment

1 changed file

sadym-chromium

pr closed time in 5 days

PullRequestReviewEvent

Pull request review commentmdn/browser-compat-data

feat(JavaScript): Add `Iterator` and `AsyncIterator`

+{+  "javascript": {+    "builtins": {+      "AsyncIterator": {+        "__compat": {+          "mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncIterator",+          "support": {+            "chrome": {+              "version_added": "63"+            },+            "chrome_android": {+              "version_added": "63"+            },+            "edge": {+              "version_added": false+            },+            "firefox": {+              "version_added": "57"+            },+            "firefox_android": {+              "version_added": false+            },+            "ie": {+              "version_added": false+            },+            "nodejs": {+              "version_added": "10.0.0"+            },+            "opera": {+              "version_added": "50"+            },+            "opera_android": {+              "version_added": "46"+            },+            "safari": {+              "version_added": "11.1"+            },+            "safari_ios": {+              "version_added": "11.3"+            },+            "samsunginternet_android": {+              "version_added": "8.0"+            },+            "webview_android": {+              "version_added": "63"+            }+          },+          "status": {+            "experimental": false,+            "standard_track": true,+            "deprecated": false+          }+        },+        "AsyncIterator": {+          "__compat": {+            "description": "<code>AsyncIterator()</code> constructor",+            "mdn_url": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AsyncIterator/AsyncIterator",+            "support": {+              "chrome": {+                "version_added": false

@mathiasbynens, does this really not have a constructor in Chrome?

Not yet. @ExE-Boss's top post explains why.

ExE-Boss

comment created time in 6 days

PullRequestReviewEvent

push eventv8/v8.dev

Mathias Bynens

commit sha bc070ddfe6fa060bed4f656036ddae5641965e7a

Link to tweet (#477)

view details

push time in 6 days

delete branch v8/v8.dev

delete branch : link-to-tweet

delete time in 6 days

PR merged v8/v8.dev

Reviewers
Link to tweet blog cla: yes
+5 -5

0 comment

1 changed file

mathiasbynens

pr closed time in 6 days

Pull request review commentv8/v8.dev

Link to tweet

 --- title: 'V8 release v8.6'-author: '[Ingvar Stepanyan](https://twitter.com/RReverser), a keyboard fuzzer'+author: 'Ingvar Stepanyan ([@RReverser](https://twitter.com/RReverser)), a keyboard fuzzer'

also made this consistent with other posts

mathiasbynens

comment created time in 6 days

PullRequestReviewEvent

PR opened v8/v8.dev

Reviewers
Link to tweet
+5 -5

0 comment

1 changed file

pr created time in 6 days

create barnchv8/v8.dev

branch : link-to-tweet

created branch time in 6 days

push eventv8/api

V8 API docs updater

commit sha 9492386b646e50eef5bd32a7818a0369915a7cec

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 6 days

push eventv8/api

V8 API docs updater

commit sha c9aa17f1f6d1cf5879f6a03b3b16dfee18652fb1

Deploying to gh-pages from main @ 58fde0873ac3b1426a80d83b93bde456074bc924 🚀

view details

push time in 6 days

issue commenttibiamaps/tibia-map-data

The Doors

Indeed, the pathfinding data is constantly updated as you walk through the game, depending on whether or not doors are open vs. closed. We generally try to map things with doors open where it makes sense for them to be open (to enable optimal mapclicking), but we indeed don't always manage to. It's tricky to maintain the open doors everywhere since we often have to re-explore existing areas once CipSoft updates them.

TibiaBaker

comment created time in 6 days

Pull request review commentv8/v8.dev

V8 release 8.6

+---+title: 'V8 release v8.6'+author: 'Ingvar Stepanyan, a keyboard fuzzer'+avatars:+ - 'ingvar-stepanyan'+date: 2020-09-21+tags:+ - release+description: 'V8 release v8.6 brings respectful code, performance improvements and normative changes.'+tweet:+---+Every six weeks, we create a new branch of V8 as part of our [release process](https://v8.dev/docs/release-process). Each version is branched from V8’s Git master immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, [V8 version 8.6](https://chromium.googlesource.com/v8/v8.git/+log/branch-heads/8.6), which is in beta until its release in coordination with Chrome 86 Stable in several weeks. V8 v8.6 is filled with all sorts of developer-facing goodies. This post provides a preview of some of the highlights in anticipation of the release.++## Respectful code++The v8.6 version makes the V8 code base [more respectful](https://v8.dev/docs/respectful-code). The team joined a Chromium-wide effort to follow Google’s commitments to racial equity by replacing some insensitive terms in the project. This is still an ongoing effort and any external contributor is welcome to give a hand! You can see the list of still available tasks [here](+https://docs.google.com/document/d/1sugp6FhO-AKMb7q2Y7itNN_GBQYyQzj7BR3owNSA01s/edit#heading=h.p7fgw2nemm84).++## JavaScript++### Open sourced JS-Fuzzer++JS-Fuzzer is a mutation-based JavaScript fuzzer originally authored by Oliver Chang. It has been a cornerstone of V8's [stability](https://bugs.chromium.org/p/chromium/issues/list?q=ochang_js_fuzzer%20label%3AStability-Crash%20label%3AClusterfuzz%20-status%3AWontFix%20-status%3ADuplicate&can=1) and [security](https://bugs.chromium.org/p/chromium/issues/list?q=ochang_js_fuzzer%20label%3ASecurity%20label%3AClusterfuzz%20-status%3AWontFix%20-status%3ADuplicate&can=1) in the past and is now [open source](https://chromium-review.googlesource.com/c/v8/v8/+/2320330).++The fuzzer mutates existing cross-engine test cases using [Babel](https://babeljs.io/) AST transformations configured by extensible [mutator classes](https://chromium.googlesource.com/v8/v8/+/320d98709f/tools/clusterfuzz/js_fuzzer/mutators/). We recently also started running an instance of the fuzzer in differential-testing mode for detecting JavaScript [correctness issues](https://bugs.chromium.org/p/chromium/issues/list?q=blocking%3A1050674%20-status%3ADuplicate&can=1). Contributions are welcome! See the [README](https://chromium.googlesource.com/v8/v8/+/master/tools/clusterfuzz/js_fuzzer/README.md) for more.++### Speed-ups in `Number.prototype.toString`++Converting a JavaScript number to a string can be a surprisingly complex operation in the general case; we have to take into account floating point precision, scientific notation, NaNs, infinities, rounding, and so on. We don’t even know how big the resulting string will be before calculating it. Because of this, our implementation of `Number.prototype.toString` would bail out to a C++ runtime function.++But, a lot of the time, you just want to print a simple, small integer (a “Smi”). This is a much simpler operation, and the overheads of calling a C++ runtime function are no longer worth it. So we’ve worked with our friends at Microsoft to add a simple fast path for small integers to `Number.prototype.toString`, written in Torque, to reduce these overheads for this common case. This improved number printing microbenchmarks by ~75%.++### `Atomics.wake` removed++`Atomics.wake` was renamed to `Atomics.notify` to match a spec change [in v7.3](https://v8.dev/blog/v8-release-73#atomics.notify). The deprecated `Atomics.wake` alias is now removed.++### Small Normative Changes++- Anonymous classes now have a `.name` property whose value is the empty string `""`. [Spec change](https://github.com/tc39/ecma262/pull/1490).+- The `\8` and `\9` escape sequences are now illegal in template string literals in [sloppy mode](https://developer.mozilla.org/en-US/docs/Glossary/Sloppy_mode) and in all string literals in [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). [Spec change](https://github.com/tc39/ecma262/pull/2054).+- The built-in `Reflect` object now has a `Symbol.toStringTag` property whose value is `"Reflect"`. [Spec change](https://github.com/tc39/ecma262/pull/2057).++## WebAssembly++### SIMD on Liftoff++Liftoff is the baseline compiler for WebAssembly, and as of V8 v8.5 is [shipped on all platforms](https://v8.dev/features/simd). The SIMD proposal enables WebAssembly to take advantage of commonly available hardware vector instructions to accelerate compute-intensive workloads. It is currently in an [Origin Trial](https://v8.dev/blog/v8-release-84#simd-origin-trial), which allows developers to experiment with a feature before it is standardized.++Up until now, SIMD was implemented only in TurboFan, V8's top tier compiler. This is necessary to get maximum performance out of the SIMD instructions. Now that SIMD is implemented in Liftoff as well, you'll be able to debug your SIMD code in Liftoff, with much [better performance than the WebAssembly interpreter](https://v8.dev/blog/v8-release-84#better-debugging).++WebAssembly modules that use SIMD instructions will have faster startup too, and often faster runtime performance than their scalar equivalents compiled with TurboFan. For example, given a function that takes an array of floats and clamps its values to zero (written here in JavaScript for clarity):++```js+function clampZero(f32array) {+    for (let i = 0; i < f32array.length; ++i) {+        if (f32array[i] < 0) {+            f32array[i] = 0;+        }+    }+}+```++Let's compare two different implementations of this function, using Liftoff and TurboFan:++1. A scalar implementation, with the loop unrolled 4 times.+2. A SIMD implementation, using the `i32x4.max_s` instruction.++Using the Liftoff scalar implementation as a baseline, we see the following results:++![A graph showing Liftoff SIMD being ~2.8x faster than Liftoff scalar vs. Turbofan SIMD being ~7.5x faster](/_img/v8-release-86/simd.svg)
![A graph showing Liftoff SIMD being ~2.8× faster than Liftoff scalar vs. TurboFan SIMD being ~7.5× faster](/_img/v8-release-86/simd.svg)
RReverser

comment created time in 6 days

Pull request review commentv8/v8.dev

V8 release 8.6

+---+title: 'V8 release v8.6'+author: 'Ingvar Stepanyan, a keyboard fuzzer'+avatars:+ - 'ingvar-stepanyan'+date: 2020-09-21+tags:+ - release+description: 'V8 release v8.6 brings respectful code, performance improvements and normative changes.'+tweet:+---+Every six weeks, we create a new branch of V8 as part of our [release process](https://v8.dev/docs/release-process). Each version is branched from V8’s Git master immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, [V8 version 8.6](https://chromium.googlesource.com/v8/v8.git/+log/branch-heads/8.6), which is in beta until its release in coordination with Chrome 86 Stable in several weeks. V8 v8.6 is filled with all sorts of developer-facing goodies. This post provides a preview of some of the highlights in anticipation of the release.++## Respectful code++The v8.6 version makes the V8 code base [more respectful](https://v8.dev/docs/respectful-code). The team joined a Chromium-wide effort to follow Google’s commitments to racial equity by replacing some insensitive terms in the project. This is still an ongoing effort and any external contributor is welcome to give a hand! You can see the list of still available tasks [here](+https://docs.google.com/document/d/1sugp6FhO-AKMb7q2Y7itNN_GBQYyQzj7BR3owNSA01s/edit#heading=h.p7fgw2nemm84).++## JavaScript++### Open sourced JS-Fuzzer++JS-Fuzzer is a mutation-based JavaScript fuzzer originally authored by Oliver Chang. It has been a cornerstone of V8's [stability](https://bugs.chromium.org/p/chromium/issues/list?q=ochang_js_fuzzer%20label%3AStability-Crash%20label%3AClusterfuzz%20-status%3AWontFix%20-status%3ADuplicate&can=1) and [security](https://bugs.chromium.org/p/chromium/issues/list?q=ochang_js_fuzzer%20label%3ASecurity%20label%3AClusterfuzz%20-status%3AWontFix%20-status%3ADuplicate&can=1) in the past and is now [open source](https://chromium-review.googlesource.com/c/v8/v8/+/2320330).++The fuzzer mutates existing cross-engine test cases using [Babel](https://babeljs.io/) AST transformations configured by extensible [mutator classes](https://chromium.googlesource.com/v8/v8/+/320d98709f/tools/clusterfuzz/js_fuzzer/mutators/). We recently also started running an instance of the fuzzer in differential-testing mode for detecting JavaScript [correctness issues](https://bugs.chromium.org/p/chromium/issues/list?q=blocking%3A1050674%20-status%3ADuplicate&can=1). Contributions are welcome! See the [README](https://chromium.googlesource.com/v8/v8/+/master/tools/clusterfuzz/js_fuzzer/README.md) for more.++### Speed-ups in `Number.prototype.toString`++Converting a JavaScript number to a string can be a surprisingly complex operation in the general case; we have to take into account floating point precision, scientific notation, NaNs, infinities, rounding, and so on. We don’t even know how big the resulting string will be before calculating it. Because of this, our implementation of `Number.prototype.toString` would bail out to a C++ runtime function.++But, a lot of the time, you just want to print a simple, small integer (a “Smi”). This is a much simpler operation, and the overheads of calling a C++ runtime function are no longer worth it. So we’ve worked with our friends at Microsoft to add a simple fast path for small integers to `Number.prototype.toString`, written in Torque, to reduce these overheads for this common case. This improved number printing microbenchmarks by ~75%.++### `Atomics.wake` removed++`Atomics.wake` was renamed to `Atomics.notify` to match a spec change [in v7.3](https://v8.dev/blog/v8-release-73#atomics.notify). The deprecated `Atomics.wake` alias is now removed.++### Small Normative Changes++- Anonymous classes now have a `.name` property whose value is the empty string `""`. [Spec change](https://github.com/tc39/ecma262/pull/1490).+- The `\8` and `\9` escape sequences are now illegal in template string literals in [sloppy mode](https://developer.mozilla.org/en-US/docs/Glossary/Sloppy_mode) and in all string literals in [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). [Spec change](https://github.com/tc39/ecma262/pull/2054).+- The built-in `Reflect` object now has a `Symbol.toStringTag` property whose value is `"Reflect"`. [Spec change](https://github.com/tc39/ecma262/pull/2057).++## WebAssembly++### SIMD on Liftoff++Liftoff is the baseline compiler for WebAssembly, and as of V8 v8.5 is [shipped on all platforms](https://v8.dev/features/simd). The SIMD proposal enables WebAssembly to take advantage of commonly available hardware vector instructions to accelerate compute-intensive workloads. It is currently in an [Origin Trial](https://v8.dev/blog/v8-release-84#simd-origin-trial), which allows developers to experiment with a feature before it is standardized.++Up until now, SIMD was implemented only in TurboFan, V8's top tier compiler. This is necessary to get maximum performance out of the SIMD instructions. Now that SIMD is implemented in Liftoff as well, you'll be able to debug your SIMD code in Liftoff, with much [better performance than the WebAssembly interpreter](https://v8.dev/blog/v8-release-84#better-debugging).++WebAssembly modules that use SIMD instructions will have faster startup too, and often faster runtime performance than their scalar equivalents compiled with TurboFan. For example, given a function that takes an array of floats and clamps its values to zero (written here in JavaScript for clarity):++```js+function clampZero(f32array) {+    for (let i = 0; i < f32array.length; ++i) {

nit: should be two-space indents

RReverser

comment created time in 6 days

Pull request review commentv8/v8.dev

V8 release 8.6

+---+title: 'V8 release v8.6'+author: 'Ingvar Stepanyan, a keyboard fuzzer'+avatars:+ - 'ingvar-stepanyan'+date: 2020-09-21+tags:+ - release+description: 'V8 release v8.6 brings respectful code, performance improvements and normative changes.'+tweet:+---+Every six weeks, we create a new branch of V8 as part of our [release process](https://v8.dev/docs/release-process). Each version is branched from V8’s Git master immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, [V8 version 8.6](https://chromium.googlesource.com/v8/v8.git/+log/branch-heads/8.6), which is in beta until its release in coordination with Chrome 86 Stable in several weeks. V8 v8.6 is filled with all sorts of developer-facing goodies. This post provides a preview of some of the highlights in anticipation of the release.++## Respectful code++The v8.6 version makes the V8 code base [more respectful](https://v8.dev/docs/respectful-code). The team joined a Chromium-wide effort to follow Google’s commitments to racial equity by replacing some insensitive terms in the project. This is still an ongoing effort and any external contributor is welcome to give a hand! You can see the list of still available tasks [here](+https://docs.google.com/document/d/1sugp6FhO-AKMb7q2Y7itNN_GBQYyQzj7BR3owNSA01s/edit#heading=h.p7fgw2nemm84).++## JavaScript++### Open sourced JS-Fuzzer++JS-Fuzzer is a mutation-based JavaScript fuzzer originally authored by Oliver Chang. It has been a cornerstone of V8's [stability](https://bugs.chromium.org/p/chromium/issues/list?q=ochang_js_fuzzer%20label%3AStability-Crash%20label%3AClusterfuzz%20-status%3AWontFix%20-status%3ADuplicate&can=1) and [security](https://bugs.chromium.org/p/chromium/issues/list?q=ochang_js_fuzzer%20label%3ASecurity%20label%3AClusterfuzz%20-status%3AWontFix%20-status%3ADuplicate&can=1) in the past and is now [open source](https://chromium-review.googlesource.com/c/v8/v8/+/2320330).++The fuzzer mutates existing cross-engine test cases using [Babel](https://babeljs.io/) AST transformations configured by extensible [mutator classes](https://chromium.googlesource.com/v8/v8/+/320d98709f/tools/clusterfuzz/js_fuzzer/mutators/). We recently also started running an instance of the fuzzer in differential-testing mode for detecting JavaScript [correctness issues](https://bugs.chromium.org/p/chromium/issues/list?q=blocking%3A1050674%20-status%3ADuplicate&can=1). Contributions are welcome! See the [README](https://chromium.googlesource.com/v8/v8/+/master/tools/clusterfuzz/js_fuzzer/README.md) for more.++### Speed-ups in `Number.prototype.toString`++Converting a JavaScript number to a string can be a surprisingly complex operation in the general case; we have to take into account floating point precision, scientific notation, NaNs, infinities, rounding, and so on. We don’t even know how big the resulting string will be before calculating it. Because of this, our implementation of `Number.prototype.toString` would bail out to a C++ runtime function.++But, a lot of the time, you just want to print a simple, small integer (a “Smi”). This is a much simpler operation, and the overheads of calling a C++ runtime function are no longer worth it. So we’ve worked with our friends at Microsoft to add a simple fast path for small integers to `Number.prototype.toString`, written in Torque, to reduce these overheads for this common case. This improved number printing microbenchmarks by ~75%.++### `Atomics.wake` removed++`Atomics.wake` was renamed to `Atomics.notify` to match a spec change [in v7.3](https://v8.dev/blog/v8-release-73#atomics.notify). The deprecated `Atomics.wake` alias is now removed.++### Small Normative Changes
### Small normative changes
RReverser

comment created time in 6 days

Pull request review commentv8/v8.dev

V8 release 8.6

+---+title: 'V8 release v8.6'+author: 'Ingvar Stepanyan, a keyboard fuzzer'+avatars:+ - 'ingvar-stepanyan'+date: 2020-09-21+tags:+ - release+description: 'V8 release v8.6 brings respectful code, performance improvements and normative changes.'

Oxford comma!!1 (We match Intl.ListFormat here, hehe)

description: 'V8 release v8.6 brings respectful code, performance improvements, and normative changes.'
RReverser

comment created time in 6 days

PullRequestReviewEvent

Pull request review commentv8/v8.dev

V8 release 8.6

+---+title: 'V8 release v8.6'+author: 'Ingvar Stepanyan, a keyboard fuzzer'

feel free to link to your Twitter here, like in other posts (unless you prefer not to)

RReverser

comment created time in 6 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(OOPIF): debug message in case of iFrame moved to another process

 export class FrameManager extends EventEmitter {     return watcher.navigationResponse();   } +  private async _onFrameMoved(event: Protocol.Target.AttachedToTargetEvent) {+    if (event.targetInfo.type !== 'iframe') {+      return;+    }++    // TODO(sadym): Remove debug message once proper OOPIF support is +    // implemented: https://github.com/puppeteer/puppeteer/issues/2548+    debug('puppeteer:frame')(+      `The frame '${event.targetInfo.targetId}' moved to another session. ` ++        `Out-of-proccess iframes (OOPIF) are not supported by Puppeteer yet. ` +

Hmm, I thought I had fixed this typo already?

        `Out-of-process iframes (OOPIF) are not supported by Puppeteer yet. ` +
sadym-chromium

comment created time in 6 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): split waitFor logic for selectors and xpath

 export class DOMWorld {     await handle.dispose();   } -  waitForSelector(+  async waitForSelector(     selector: string,     options: WaitForSelectorOptions   ): Promise<ElementHandle | null> {-    return this._waitForSelectorOrXPath(selector, false, options);-  }--  waitForXPath(-    xpath: string,-    options: WaitForSelectorOptions-  ): Promise<ElementHandle | null> {-    return this._waitForSelectorOrXPath(xpath, true, options);-  }--  waitForFunction(-    pageFunction: Function | string,-    options: { polling?: string | number; timeout?: number } = {},-    ...args: SerializableOrJSHandle[]-  ): Promise<JSHandle> {     const {-      polling = 'raf',+      visible: waitForVisible = false,+      hidden: waitForHidden = false,       timeout = this._timeoutSettings.timeout(),     } = options;-    return new WaitTask(+    const polling = waitForVisible || waitForHidden ? 'raf' : 'mutation';+    const title = `selector "${selector}"${

Let's wrap the select in backticks instead of double quotes, since it's more likely to contain double quotes (e.g. attribute selectors) than backticks:

    const title = `selector \`${selector}\`${
johanbay

comment created time in 7 days

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): split waitFor logic for selectors and xpath

 import { } from './EvalTypes.js'; import { isNode } from '../environment.js'; -// This predicateQueryHandler is declared here so that TypeScript knows about it-// when it is used in the predicate function below.+// predicateQueryHandler and checkWaitForOptions is declared here so that+// TypeScript knows about it when it is used in the predicate function below.
// TypeScript knows about them when used in the predicate function below.
johanbay

comment created time in 7 days

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): split waitFor logic for selectors and xpath

 export class DOMWorld {     await handle.dispose();   } -  waitForSelector(+  async waitForSelector(     selector: string,     options: WaitForSelectorOptions   ): Promise<ElementHandle | null> {-    return this._waitForSelectorOrXPath(selector, false, options);-  }--  waitForXPath(-    xpath: string,-    options: WaitForSelectorOptions-  ): Promise<ElementHandle | null> {-    return this._waitForSelectorOrXPath(xpath, true, options);-  }--  waitForFunction(-    pageFunction: Function | string,-    options: { polling?: string | number; timeout?: number } = {},-    ...args: SerializableOrJSHandle[]-  ): Promise<JSHandle> {     const {-      polling = 'raf',+      visible: waitForVisible = false,+      hidden: waitForHidden = false,       timeout = this._timeoutSettings.timeout(),     } = options;-    return new WaitTask(+    const polling = waitForVisible || waitForHidden ? 'raf' : 'mutation';+    const title = `selector "${selector}"${+      waitForHidden ? ' to be hidden' : ''+    }`;+    const { updatedSelector, queryHandler } = getQueryHandlerAndSelector(+      selector+    );+    function predicate(+      selector: string,+      waitForVisible: boolean,+      waitForHidden: boolean+    ): Node | null | boolean {+      const node = predicateQueryHandler+        ? (predicateQueryHandler(document, selector) as Element)+        : document.querySelector(selector);+      return checkWaitForOptions(node, waitForVisible, waitForHidden);+    }+    const waitTask = new WaitTask(       this,-      pageFunction,-      undefined,-      'function',+      this._makePredicateString(predicate, queryHandler.queryOne),+      title,       polling,       timeout,-      ...args-    ).promise;-  }--  async title(): Promise<string> {-    return this.evaluate(() => document.title);+      updatedSelector,+      waitForVisible,+      waitForHidden+    );+    const handle = await waitTask.promise;+    if (!handle.asElement()) {
const someBetterNameHere = handle.asElement();
if (!someBetterNameHere) { ... }
return someBetterNameHere;
johanbay

comment created time in 7 days

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): split waitFor logic for selectors and xpath

 export class DOMWorld {     await handle.dispose();   } -  waitForSelector(+  async waitForSelector(     selector: string,     options: WaitForSelectorOptions   ): Promise<ElementHandle | null> {-    return this._waitForSelectorOrXPath(selector, false, options);-  }--  waitForXPath(-    xpath: string,-    options: WaitForSelectorOptions-  ): Promise<ElementHandle | null> {-    return this._waitForSelectorOrXPath(xpath, true, options);-  }--  waitForFunction(-    pageFunction: Function | string,-    options: { polling?: string | number; timeout?: number } = {},-    ...args: SerializableOrJSHandle[]-  ): Promise<JSHandle> {     const {-      polling = 'raf',+      visible: waitForVisible = false,+      hidden: waitForHidden = false,       timeout = this._timeoutSettings.timeout(),     } = options;-    return new WaitTask(+    const polling = waitForVisible || waitForHidden ? 'raf' : 'mutation';+    const title = `selector "${selector}"${+      waitForHidden ? ' to be hidden' : ''+    }`;+    const { updatedSelector, queryHandler } = getQueryHandlerAndSelector(+      selector+    );+    function predicate(+      selector: string,+      waitForVisible: boolean,+      waitForHidden: boolean+    ): Node | null | boolean {+      const node = predicateQueryHandler+        ? (predicateQueryHandler(document, selector) as Element)+        : document.querySelector(selector);+      return checkWaitForOptions(node, waitForVisible, waitForHidden);+    }+    const waitTask = new WaitTask(       this,-      pageFunction,-      undefined,-      'function',+      this._makePredicateString(predicate, queryHandler.queryOne),+      title,       polling,       timeout,-      ...args-    ).promise;-  }--  async title(): Promise<string> {-    return this.evaluate(() => document.title);+      updatedSelector,+      waitForVisible,+      waitForHidden+    );+    const handle = await waitTask.promise;+    if (!handle.asElement()) {+      await handle.dispose();+      return null;+    }+    return handle.asElement();   } -  private async _waitForSelectorOrXPath(-    selectorOrXPath: string,-    isXPath: boolean,-    options: WaitForSelectorOptions = {}+  async waitForXPath(+    xpath: string,+    options: WaitForSelectorOptions   ): Promise<ElementHandle | null> {     const {       visible: waitForVisible = false,       hidden: waitForHidden = false,       timeout = this._timeoutSettings.timeout(),     } = options;     const polling = waitForVisible || waitForHidden ? 'raf' : 'mutation';-    const title = `${isXPath ? 'XPath' : 'selector'} "${selectorOrXPath}"${-      waitForHidden ? ' to be hidden' : ''-    }`;-    const { updatedSelector, queryHandler } = getQueryHandlerAndSelector(-      selectorOrXPath-    );+    const title = `XPath "${xpath}"${waitForHidden ? ' to be hidden' : ''}`;

Same here with the backticks, WDYT?

johanbay

comment created time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(a11y-query): split waitFor logic for selectors and xpath

 import { } from './EvalTypes.js'; import { isNode } from '../environment.js'; -// This predicateQueryHandler is declared here so that TypeScript knows about it-// when it is used in the predicate function below.+// predicateQueryHandler and checkWaitForOptions is declared here so that
// predicateQueryHandler and checkWaitForOptions are declared here so that
johanbay

comment created time in 7 days

PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(OOPIF): debug message in case of iFrame moved to another process

 export class FrameManager extends EventEmitter {     return watcher.navigationResponse();   } +  private async _onFrameMoved(event: Protocol.Target.AttachedToTargetEvent) {+    if (event.targetInfo.type !== 'iframe') {+      return;+    }++    // TODO(sadym): Remove debug message oncle the proper OOPIF is implemented:
    // TODO(sadym): Remove debug message once the proper OOPIF is implemented:
sadym-chromium

comment created time in 7 days

PullRequestReviewEvent

Pull request review commentpuppeteer/puppeteer

feat(OOPIF): debug message in case of iFrame moved to another process

 export class FrameManager extends EventEmitter {     return watcher.navigationResponse();   } +  private async _onFrameMoved(event: Protocol.Target.AttachedToTargetEvent) {+    if (event.targetInfo.type !== 'iframe') {+      return;+    }++    // TODO(sadym): Remove debug message oncle the proper OOPIF is implemented:+    // https://github.com/puppeteer/puppeteer/issues/2548+    debugFrames(+      `The frame '${event.targetInfo.targetId}' moved to another session. ` ++        `Out of proccess iFrames (OOPIF) are not supported by Puppeteer yet. ` +
        `Out-of-process iframes (OOPIF) are not supported by Puppeteer yet. ` +
sadym-chromium

comment created time in 7 days

Pull request review commentpuppeteer/puppeteer

feat(OOPIF): debug message in case of iFrame moved to another process

 export class FrameManager extends EventEmitter {     return watcher.navigationResponse();   } +  private async _onFrameMoved(event: Protocol.Target.AttachedToTargetEvent) {+    if (event.targetInfo.type !== 'iframe') {+      return;+    }++    // TODO(sadym): Remove debug message oncle the proper OOPIF is implemented:+    // https://github.com/puppeteer/puppeteer/issues/2548+    debugFrames(+      `The frame '${event.targetInfo.targetId}' moved to another session. ` ++        `Out of proccess iFrames (OOPIF) are not supported by Puppeteer yet. ` ++        `The feature-request: https://github.com/puppeteer/puppeteer/issues/2548`
        `https://github.com/puppeteer/puppeteer/issues/2548`
sadym-chromium

comment created time in 7 days

Pull request review commentpuppeteer/puppeteer

feat(OOPIF): debug message in case of iFrame moved to another process

 export class FrameManager extends EventEmitter {     return watcher.navigationResponse();   } +  private async _onFrameMoved(event: Protocol.Target.AttachedToTargetEvent) {+    if (event.targetInfo.type !== 'iframe') {+      return;+    }++    // TODO(sadym): Remove debug message oncle the proper OOPIF is implemented:+    // https://github.com/puppeteer/puppeteer/issues/2548+    debugFrames(

Since we only need debugFrames once, let’s move its definition here.

sadym-chromium

comment created time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent
more