asSharedWorkerSession

Adapts this ChildSession to a SharedWorkerSession. If the attached target is not of a compatible type, this function throws an exception.