Skip to content
masterclass Buddy

Playwright · Class

Worker

The Worker class represents a WebWorker. Use it to inspect a worker, run code in its context, and observe its close or console events.

Last updated

Since
v1.9

Syntax

class Worker
worker.evaluate(pageFunction[, arg])
worker.evaluateHandle(pageFunction[, arg])
worker.url()
worker.waitForEvent(event[, optionsOrPredicate])

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Page
  • JSHandle
  • ConsoleMessage
  • page.workers()
  • page.on('worker')

Source: Worker | Playwright. Checked 2026-11-03.