← Back to release summary

'name' attribute for dedicated workers

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 70)
Intent stage
None

Summary

This feature allows specifying the worker’s name in an optional constructor argument. This lets you distinguish dedicated workers by name when you have multiple workers with the same URL. Developers can print ‘name’ in the DevTools console which will make it easier to debug workers. When the ‘name’ param is omitted, an empty string is used as the default value. For more information, see the discussion at https://github.com/whatwg/html/issues/2477.

Standards & signals

View on chromestatus.com