Skip to content

PushSubscription.toJSON was the wrong return type #346

Closed
@FabioPinheiro

Description

@FabioPinheiro

The method toJSON on PushSubscription return a Object not a String

https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/toJSON

https://github.com/scala-js/scala-js-dom/blob/master/src/main/scala/org/scalajs/dom/experimental/push/PushManager.scala#L101

The error:

scala.scalajs.runtime.UndefinedBehaviorError: An undefined behavior was detected: [object Object] is not an instance of java.lang.String
...
Caused by: java.lang.ClassCastException: [object Object] is not an instance of java.lang.String

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions