From 05c4507a8b8ce6dc7291f8f6377755c9743b391e Mon Sep 17 00:00:00 2001 From: Paul J Thordarson Date: Fri, 11 Dec 2015 11:24:56 -0500 Subject: [PATCH] Added ServiceWorkerContainer.ready MDN documentation is located here: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/ready --- src/main/scala/org/scalajs/dom/raw/lib.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/scala/org/scalajs/dom/raw/lib.scala b/src/main/scala/org/scalajs/dom/raw/lib.scala index ef2f08332..08136d5b7 100644 --- a/src/main/scala/org/scalajs/dom/raw/lib.scala +++ b/src/main/scala/org/scalajs/dom/raw/lib.scala @@ -670,6 +670,16 @@ trait ServiceWorkerContainer extends EventTarget { * MDN */ def getRegistration(scope: String = ""): Promise[ServiceWorkerRegistration] = js.native + + /** + * The ready read-only property of the ServiceWorkerContainer interface defines + * whether a service worker is ready to control a page or not. It returns a + * Promise that will never reject, which resolves to a ServiceWorkerRegistration + * with an ServiceWorkerRegistration.active worker. + * + * MDN + */ + def ready: Promise[ServiceWorkerRegistration] = js.native } /**