Skip to content

missleading / missing context to the return value of scripting.executeScript() #41916

@AleksanderAguilar

Description

@AleksanderAguilar

MDN URL

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/executeScript

What specific section or headline is this issue about?

Return Value

What information was incorrect, unhelpful, or incomplete?

In the Return Value section it mentions that the result of the script must be structured cloneable and when I click on that definition of structured cloneable there is no mention of promises on the page so from that and what is written in the Return Value section it leads users to believe that you cannot return a Promise as the return type of ExecuteScript(). From my own personal experience I know that it can and that the promise gets awaited.

What did you expect to see?

I would like to see a a mention of if promises are structured cloneable and or any other mention of what happens when ExecuteScript() returns a promise. As will be shared chrome has an explicit section that outlines what happens when ExecuteScript() is returned, would be nice to see that for Mozzilla

Do you have any supporting links, references, or citations?

In this chrome docs it clearly outlines what happens in chrome

Do you have anything more you want to share?

No response

MDN metadata

Page report details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions