Skip to content

Conversation

@cornerman
Copy link
Contributor

@cornerman cornerman commented Mar 18, 2018

Link to specification

Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

Could you also provide a link to the spec of PushSubscriptionOptions in the PR description, please?

js.Dynamic
.literal("userVisibleOnly" -> userVisibleOnly, "applicationServerKey" -> applicationServerKey)
.asInstanceOf[PushSubscriptionOptions]
}
Copy link
Member

Choose a reason for hiding this comment

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

It would be better to turn PushSubscriptionOptions into a non-native JS trait with = js.undefined, and let users do

new PushSubscriptionOptions { userVisibleOnly = ... applicationServerKey = ... }

The apply method-based pattern is old; we do not use it anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@cornerman cornerman force-pushed the push-subscription-server-key branch from 4840b6d to b17d33c Compare March 18, 2018 10:16
}
var userVisibleOnly: js.UndefOr[Boolean] = js.undefined
var applicationServerKey: js.UndefOr[Uint8Array] = js.undefined
}
Copy link
Member

Choose a reason for hiding this comment

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

Ah, good, but we'll need to keep the existing PushSubscriptionOptions.apply for backward binary compatibility. You can deprecate it, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, that makes sense

@cornerman cornerman force-pushed the push-subscription-server-key branch from b17d33c to 26971f5 Compare March 18, 2018 10:39
Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

Thanks!

@sjrd
Copy link
Member

sjrd commented Mar 18, 2018

It wants some sbt scalafmt :)

@cornerman cornerman force-pushed the push-subscription-server-key branch from 26971f5 to 49e81cc Compare March 18, 2018 11:09
- turn PushSubscriptionOptions into a non-native JS trait
@cornerman
Copy link
Contributor Author

I need to start remembering this step :)

@sjrd sjrd merged commit b3e8334 into scala-js:master Mar 18, 2018
@cornerman cornerman deleted the push-subscription-server-key branch March 18, 2018 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants