encodeURIComponent/decodeURIComponent missing
AlexITC opened this issue · 6 comments
Ref:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
The obvious workaround being org.scalajs.dom.window.asInstanceOf[js.Dynamic].encodeURIComponent(string).toString
available but it isn't ideal.
Thanks for the report! Happy to take a PR for this :)
Actually, I started the PR just after opening the ticket, which is submitted by now.
Thanks, fast work! :)
These are not DOM-specific. There are part of the ECMAScript specification, and therefore they are in Scala.js core:
https://github.com/scala-js/scala-js/blob/main/library/src/main/scala/scala/scalajs/js/URIUtils.scala
Woops! I should have paid more attention when I couldn't find them in the Typescript lib.dom.d.ts
. Sorry.
@AlexITC you'll be happy to see it's all typed with String
there so I guess I was wrong about that too :)
Thanks for sharing, I made the mistake to rely on github search when looking for these methods.