Replace instances of old ServiceWorker specification URL with new one

The old specification URL is
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/ has
been replaced by the new one at https://w3c.github.io/ServiceWorker/.
This commit is contained in:
Vignesh Sarma K (വിഘ്നേഷ് ശ൪മ കെ) 2016-09-25 20:32:32 +05:30
parent 1d5a05d112
commit 3bf5813096
97 changed files with 115 additions and 116 deletions

View file

@ -41,17 +41,17 @@ impl Client {
}
impl ClientMethods for Client {
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#client-url-attribute
// https://w3c.github.io/ServiceWorker/#client-url-attribute
fn Url(&self) -> USVString {
self.url.clone()
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#client-frametype
// https://w3c.github.io/ServiceWorker/#client-frametype
fn FrameType(&self) -> FrameType {
self.frame_type
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#client-id
// https://w3c.github.io/ServiceWorker/#client-id
fn Id(&self) -> DOMString {
let uid_str = format!("{}", self.id);
DOMString::from_string(uid_str)

View file

@ -103,7 +103,7 @@ impl NavigatorMethods for Navigator {
false
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator-service-worker-attribute
// https://w3c.github.io/ServiceWorker/#navigator-service-worker-attribute
fn ServiceWorker(&self) -> Root<ServiceWorkerContainer> {
self.service_worker.or_init(|| ServiceWorkerContainer::new(self.global().r()))
}

View file

@ -70,17 +70,17 @@ impl ServiceWorker {
}
impl ServiceWorkerMethods for ServiceWorker {
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-state-attribute
// https://w3c.github.io/ServiceWorker/#service-worker-state-attribute
fn State(&self) -> ServiceWorkerState {
self.state.get()
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-url-attribute
// https://w3c.github.io/ServiceWorker/#service-worker-url-attribute
fn ScriptURL(&self) -> USVString {
USVString(self.script_url.borrow().clone())
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-postmessage
// https://w3c.github.io/ServiceWorker/#service-worker-postmessage
fn PostMessage(&self, cx: *mut JSContext, message: HandleValue) -> ErrorResult {
// Step 1
if let ServiceWorkerState::Redundant = self.state.get() {
@ -94,10 +94,10 @@ impl ServiceWorkerMethods for ServiceWorker {
Ok(())
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-container-onerror-attribute
// https://w3c.github.io/ServiceWorker/#service-worker-container-onerror-attribute
event_handler!(error, GetOnerror, SetOnerror);
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#ref-for-service-worker-onstatechange-attribute-1
// https://w3c.github.io/ServiceWorker/#ref-for-service-worker-onstatechange-attribute-1
event_handler!(statechange, GetOnstatechange, SetOnstatechange);
}

View file

@ -48,12 +48,12 @@ impl Controllable for ServiceWorkerContainer {
}
impl ServiceWorkerContainerMethods for ServiceWorkerContainer {
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-container-controller-attribute
// https://w3c.github.io/ServiceWorker/#service-worker-container-controller-attribute
fn GetController(&self) -> Option<Root<ServiceWorker>> {
return self.controller.get()
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-container-register-method
// https://w3c.github.io/ServiceWorker/#service-worker-container-register-method
fn Register(&self,
script_url: USVString,
options: &RegistrationOptions) -> Fallible<Root<ServiceWorkerRegistration>> {

View file

@ -334,6 +334,6 @@ unsafe extern "C" fn interrupt_callback(cx: *mut JSContext) -> bool {
}
impl ServiceWorkerGlobalScopeMethods for ServiceWorkerGlobalScope {
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-global-scope-onmessage-attribute
// https://w3c.github.io/ServiceWorker/#service-worker-global-scope-onmessage-attribute
event_handler!(message, GetOnmessage, SetOnmessage);
}

View file

@ -83,22 +83,22 @@ pub fn longest_prefix_match(stored_scope: &Url, potential_match: &Url) -> bool {
}
impl ServiceWorkerRegistrationMethods for ServiceWorkerRegistration {
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-registration-installing-attribute
// https://w3c.github.io/ServiceWorker/#service-worker-registration-installing-attribute
fn GetInstalling(&self) -> Option<Root<ServiceWorker>> {
self.installing.as_ref().map(|sw| Root::from_ref(&**sw))
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-registration-active-attribute
// https://w3c.github.io/ServiceWorker/#service-worker-registration-active-attribute
fn GetActive(&self) -> Option<Root<ServiceWorker>> {
self.active.as_ref().map(|sw| Root::from_ref(&**sw))
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-registration-waiting-attribute
// https://w3c.github.io/ServiceWorker/#service-worker-registration-waiting-attribute
fn GetWaiting(&self) -> Option<Root<ServiceWorker>> {
self.waiting.as_ref().map(|sw| Root::from_ref(&**sw))
}
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-registration-scope-attribute
// https://w3c.github.io/ServiceWorker/#service-worker-registration-scope-attribute
fn Scope(&self) -> USVString {
USVString(self.scope.clone())
}

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#client
// https://w3c.github.io/ServiceWorker/#client
[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
interface Client {

View file

@ -33,7 +33,7 @@ interface NavigatorBluetooth {
readonly attribute Bluetooth bluetooth;
};
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator-service-worker
// https://w3c.github.io/ServiceWorker/#navigator-service-worker
partial interface Navigator {
[SameObject, Pref="dom.serviceworker.enabled"] readonly attribute ServiceWorkerContainer serviceWorker;
};

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// http://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-obj
// http://w3c.github.io/ServiceWorker/#service-worker-obj
[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
interface ServiceWorker : EventTarget {
readonly attribute USVString scriptURL;

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-container
// https://w3c.github.io/ServiceWorker/#service-worker-container
[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
interface ServiceWorkerContainer : EventTarget {
[Unforgeable] readonly attribute ServiceWorker? controller;

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-global-scope
// https://w3c.github.io/ServiceWorker/#service-worker-global-scope
[Global=(Worker,ServiceWorker), Exposed=ServiceWorker,
Pref="dom.serviceworker.enabled"]

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-registration-obj
// https://w3c.github.io/ServiceWorker/#service-worker-registration-obj
[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
interface ServiceWorkerRegistration : EventTarget {
[Unforgeable] readonly attribute ServiceWorker? installing;