Skip to content

Content Scripts should not be IIFE #17

Description

@steinybot

A content script containing:

function setSelectedElement(el) {
    // do something with the selected element
}

Should be able to be executed by:

chrome.devtools.inspectedWindow.eval("setSelectedElement($0)",
    { useContentScriptContext: true });

But it can't because that function is being removed and converted to a IIFE.

See https://developer.chrome.com/docs/extensions/mv3/devtools/#selected-element

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions