application/json
besides parsing it to js.Dynamic
@LukaJCB To better understand Observable used in OutWatch I'm reading RxJs scala documentation, and it is interesting reading :smile: As far as rxscala-js is facade, I can hope that documentation is, in fact, rxscala-js' documentation also. Is it true?
Or - are you going to make OutWatch Monix-based? :smile: In fact, rxscala-js as OutWatch base move me to some doubt (as well as not-scala vdom implementation).
Probably I must dig in Monix documentation already...
val hashes = Observable.create { observer: Observer[String] =>
dom.window.onhashchange = { e =>
val url = e.asInstanceOf[HashChangeEvent].newURL
val idx = url.indexOf("#")
val hash = if (idx >= 0) url.substring(idx + 1) else ""
observer.next(hash)
}
}