-
[Router] Add a new
Redirect.Method
calledRedirect.Force
which bypasses the History API and redirects by settingwindow.location.href
directly. -
[Router] Add a new rewrite rule
removeQuery
which removes the query portion of a URL. (e.g.a/b?c=1
toa/b
) -
Opening links in new tabs using
target="_blank"
withoutrel="noopener
is a security risk and performance impediment. Google's Lighthouse auditor flags it.Two new methods have been introduced to scalajs-react that address this by default:
-
The anchor vdom tag (
<.a
) gained.toNewWindow
:/** A link to open a new window (tab) to a given URL. * * Like: `<a href="https://google.com" target="_blank" rel="noopener"></a>` * * @param noopener See https://developers.google.com/web/tools/lighthouse/audits/noopener */ def toNewWindow(href : String, noopener : Boolean = true, noreferrer: Boolean = false)
-
Added
CallbackTo.windowOpen
:/** When executed, opens a new window (tab) to a given URL. * * @param noopener See https://developers.google.com/web/tools/lighthouse/audits/noopener * @param focus Whether or not to focus the new window. */ def windowOpen(url : String, noopener: Boolean = true, focus : Boolean = true): CallbackTo[Window] =
-
-
Add
.renderIntoDOM
toVdomElement
andVdomTag
s. -
Fix VDOM attributes not accepting types:
Byte
,Short
,Float
,Double
,Long
-
Fix React warnings with SVG VDOM.
-
Refactored
vdom.Builder
which is an internal mechanism for efficiently composing VDOM. There is now:- An interface - advanced users can create their own if they like
vdom.Builder.ToVdomElement
- builds aVdomElement
which was the previous defaultvdom.Builder.ToJs
- provides raw JS values likeprops: js.Object
and more
-
vdom.TagMod
now has a.toJs
method which turns the VDOM tree into a bunch of raw JS values. This is for advanced hackers only. -
Remove code deprecated ≤ v1.0.0.
-
Upgrade dependencies:
- Scalaz to v7.2.14
- Scala.JS to v0.6.18
- scala-js-dom to v0.9.3
- React to v15.6.1