Skip to content

injectScript should wait for script to load #1865

@deaz

Description

@deaz

Feature Request

Currently, injectScript returns immediately after appending a script. It would make sense to wait until "load" event is fired, so the caller knows that the script is injected and ready to use.

Is your feature request related to a bug?

N/A

What are the alternatives?

One alternative is to add a new option to options to enable such behavior. This way it can be opt-in and won't change current behavior.
Another way is to return script from the function and allow users to do whatever they want with the object.

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