SharedStorageRunOperation
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The SharedStorageRunOperation interface of the Shared Storage API represents a Run output gate operation.
Instance methods
run()Experimental-
Defines the structure to which the
run()method defined inside a Run output gate operation should conform.
Examples
In this example, a class called ReachMeasurementOperation is defined in a worklet and is registered using SharedStorageWorkletGlobalScope.register() with the name reach-measurement. SharedStorageRunOperation defines the structure to which this class must conform, essentially defining the parameters required for the run() method. Other than this requirement, the functionality of the class can be defined flexibly.
Note:
It is possible to define and register multiple operations in the same shared storage worklet module script with different names. See SharedStorageOperation for an example.
In the main browsing context, the reach-measurement operation is invoked using the WindowSharedStorage.run() method:
For more details about this example, see Unique reach measurement. See Shared Storage API for more examples.