There should be a metadata imperative like @grant that would grant access to special APIs.
A value of @grant none would mean that the script has no special API access, and will instead execute within the content scope.
Any other value provided to @grant would run the script in legacy (sandbox / wrappers) mode, with only the named APIs provided. This imperative can be repeated as many times as necessary to request access to all necessary functions.
If a script has no @grant at all, at install time, it and its @requires will be scanned for implied APIs. The appropriate @grants to provide the discovered APIs will be implicitly provided.
There should be a metadata imperative like
@grantthat would grant access to special APIs.A value of
@grant nonewould mean that the script has no special API access, and will instead execute within the content scope.Any other value provided to
@grantwould run the script in legacy (sandbox / wrappers) mode, with only the named APIs provided. This imperative can be repeated as many times as necessary to request access to all necessary functions.If a script has no
@grantat all, at install time, it and its@requires will be scanned for implied APIs. The appropriate@grants to provide the discovered APIs will be implicitly provided.