Skip to content

Restrict API access to Context #3

@lucidd

Description

@lucidd

The problem is that some APIs are exclusive to Apps or Extensions or ChromeOS. Currently you can access all APIs all the time and they will simply fail at runtime.
Some functions behave differently depending on the context and return different types like for example chrome.runtime.Runtime.getManifest which should return an AppManifest in an app context and a ExtensionManifest in an extension context.
This could probably achieved by using implicits but this has to be tested and compared to possible other solutions.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions