diff --git a/dom/webidl/URL.webidl b/dom/webidl/URL.webidl index c9657b47be02f..b04e8f58e7b46 100644 --- a/dom/webidl/URL.webidl +++ b/dom/webidl/URL.webidl @@ -40,6 +40,7 @@ interface URL { USVString toJSON(); }; +[Exposed=(Window,DedicatedWorker,SharedWorker)] partial interface URL { [Throws] static DOMString createObjectURL(Blob blob); @@ -47,10 +48,8 @@ partial interface URL { static void revokeObjectURL(DOMString url); [ChromeOnly, Throws] static boolean isValidURL(DOMString url); -}; -// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html -partial interface URL { + // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html [Throws] static DOMString createObjectURL(MediaSource source); }; diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/interfaces-worker.sub.js b/testing/web-platform/tests/service-workers/service-worker/resources/interfaces-worker.sub.js index 10fe14d5becd0..56bc8af445d5e 100644 --- a/testing/web-platform/tests/service-workers/service-worker/resources/interfaces-worker.sub.js +++ b/testing/web-platform/tests/service-workers/service-worker/resources/interfaces-worker.sub.js @@ -93,3 +93,7 @@ test(function() { test(() => { assert_false('XMLHttpRequest' in self); }, 'xhr is not exposed'); + +test(() => { + assert_false('createObjectURL' in self.URL); + }, 'URL.createObjectURL is not exposed')