ServiceWorker
c9b4790d - Teach ExtendableMessageEvent to work with origins. (#1821)

Commit
182 days ago
Teach ExtendableMessageEvent to work with origins. (#1821) Currently, ExtendableMessageEvent's origin holds a serialized origin. In order for Origin.from(...) to function as intended for sources with opaque origins, we need to hold an origin on ExtendableMessageEvent instead. This patch adds an "origin" concept to `ExtendableMessageEvent`, and shifts call sites to initialize that value with an origin whenever possible. It also adds "extract an origin" steps to return the stored origin when present, and to return null in cases where the object was initialized with an untrusted origin representation (e.g., when its constructor is called with a ExtendableMessageEventInit dictionary). This replicates whatwg/html#11993's work on `MessageEvent`, and should fix w3c/ServiceWorker#1820.
Author
Parents
Loading