Skip to content

Conversation

@kapunga
Copy link
Contributor

@kapunga kapunga commented Dec 15, 2015

I did not include any of the following:

  • Any item marked deprecated in MDN.
@kapunga
Copy link
Contributor Author

kapunga commented Dec 15, 2015

Question wrt Push API methods in ServiceWorker. Once ServiceWorkers are moved into experimental, should developers still be required to import push package implicits to access fields like ServiceWorkerRegistration.pushManager, or is it assumed once you are using experimental packages, you are using all of them?

@mseddon
Copy link
Contributor

mseddon commented Dec 15, 2015

In general, users should enable experimental features per api, rather than as a whole. For example, ServiceWorkers are supported by Opera, but the Push API is not.

@kapunga
Copy link
Contributor Author

kapunga commented Dec 15, 2015

Thanks a lot for the feedback! I'll get to work tweaking things.

@kapunga
Copy link
Contributor Author

kapunga commented Dec 16, 2015

Question:
What do we do when there is something defined to either accept or return an enum like this?

enum PushEncryptionKeyName { "p256dh", "auth" }; 

It seems you could offer additional safety by using an enum, but I couldn't find an example in the code and there doesn't seem to be any reference to such things here:
[[http://www.scala-js.org/doc/interoperability/facade-types.html]]

@sjrd
Copy link
Member

sjrd commented Dec 16, 2015

/**
* See [[http://www.w3.org/TR/WebCryptoAPI/#cryptokey-interface ¶ 13. CryptoKey Interface]] of w3c spec
*/
@js.native
trait KeyUsage extends js.Any
object KeyUsage {
val encrypt = "encrypt".asInstanceOf[KeyUsage]
val decrypt = "decrypt".asInstanceOf[KeyUsage]
val sign = "sign".asInstanceOf[KeyUsage]
val verify = "verify".asInstanceOf[KeyUsage]
val deriveKey = "deriveKey".asInstanceOf[KeyUsage]
val deriveBits = "deriveBits".asInstanceOf[KeyUsage]
val wrapKey = "wrapKey".asInstanceOf[KeyUsage]
val unwrapKey = "unwrapKey".asInstanceOf[KeyUsage]
}

@kapunga kapunga force-pushed the push-support-184 branch 2 times, most recently from 6e60681 to de9b12d Compare December 18, 2015 13:02
@kapunga
Copy link
Contributor Author

kapunga commented Dec 18, 2015

Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional parameter, so declare the parameters here as (options: PushSubscriptionOptions = js.native)

@mseddon
Copy link
Contributor

mseddon commented Jan 20, 2016

That's all from my end. If you change the commit message to "Fix #184: Add support for the Push API", the related issue will automatically close on merge.

@kapunga
Copy link
Contributor Author

kapunga commented Jan 22, 2016

@mseddon I was waiting for #187 to close, since I was waiting on an interface there. Pushing it now.

@mseddon
Copy link
Contributor

mseddon commented Jan 22, 2016

LGTM, thanks! @sjrd will take it from here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be a val

@sjrd
Copy link
Member

sjrd commented Jan 22, 2016

That's all.

@sjrd sjrd changed the title Issue-184 Added support for the Push API. Fix #184: Add support for the Push API Jan 22, 2016
I did not include any of the following: * Any item marked deprecated in MDN.
@kapunga
Copy link
Contributor Author

kapunga commented Jan 23, 2016

@mseddon @sjrd Thanks! Just double checked it, it should be done!

@sjrd
Copy link
Member

sjrd commented Jan 23, 2016

LGTM

sjrd added a commit that referenced this pull request Jan 23, 2016
Fix #184: Add support for the Push API
@sjrd sjrd merged commit d427de1 into scala-js:master Jan 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants