Skip to content

[feature] support workers #23

Description

@Salakar

Thanks for this extension, do you have any plans to support workers, e.g. selecting a worker in chrome and console.diff does not exist currently and is only available on 'top':

image
image

Activity

  1. zendive commented on Jan 5, 2024

    @zendive
    Owner

    @Salakar appreciate. There is no extension API for injecting content scripts into page workers. Only to tab's page and its iframes. Also, due to an asynchronous nature of communication between content scripts and devtools panel of this extension, its not helphul to use it in step by step debuging mode (cause injected content-script is also becomes paused).

    Howether, you can delegate the comparison of your worker context objects to a main thread (or top context) for example:

    // worker
    self.postMessage({type: 'compare', left, right});
    // main thread
    workerInstance.addEventListener('message', (e) => {
      if (e.data.type === 'compare') {
        console.diff?.(e.data.left, e.data.right);
      }
    });

    Reminder: the code not for production

  2. Repository owner locked and limited conversation to collaborators on Jan 26, 2025
  3. converted this issue into a discussion #27 on Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions