Skip to content

Allow executeTool() to execute tools registered by opaque-origin documents #349

Open

Description

@domfarolino

Right now, executeTool() rejects with "NotSupportedError" when the tool's origin is opaque. Documents with an opaque origin can register tools and see them via getTools(), but can never execute them in-page. This is because the RegisteredTool dictionary's origin member isn't really an [=origin=] type, but is rather a string serialization of an origin. This loses the identity of opaque origins (holding only "null"), such that by the time an tool from an opaque origin reached executeTool() as "null", we couldn't compare it against the target document, and had to always reject.

Since #348, a Tool stores the tool owner's actual origin internally, even though Tool#origin is still exposed to the platform as a stringified serialization. This means we can finally perform same origin comparison against a Tool and the execution's target window.

Activity

  1. self-assigned this
    on Oct 16, 2026
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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions