Skip to content

Commit ae6b547

Browse files
committedJul 17, 2019
v2.0.0-rc.9
1 parent c30a716 commit ae6b547

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mithril.js [![NPM Version](https://img.shields.io/npm/v/mithril.svg)](https://ww
1818

1919
## What is Mithril?
2020

21-
A modern client-side Javascript framework for building Single Page Applications. It's small (<!-- size -->9.53 KB<!-- /size --> gzipped), fast and provides routing and XHR utilities out of the box.
21+
A modern client-side Javascript framework for building Single Page Applications. It's small (<!-- size -->9.55 KB<!-- /size --> gzipped), fast and provides routing and XHR utilities out of the box.
2222

2323
Mithril is used by companies like Vimeo and Nike, and open source platforms like Lichess 👍.
2424

‎mithril.js

+14-11
Original file line numberDiff line numberDiff line change
@@ -1675,17 +1675,19 @@ var _25 = function($window, mountRedraw00) {
16751675
// Remove these so they don't get overwritten
16761676
var attrs3 = {}, onclick, href
16771677
assign(attrs3, vnode5.attrs)
1678-
attrs3.component = null
1679-
attrs3.options = null
1680-
attrs3.key = null
1678+
// The first two are internal, but the rest are magic attributes
1679+
// that need censored to not screw up rendering0.
1680+
attrs3.selector = attrs3.options = attrs3.key = attrs3.oninit =
1681+
attrs3.oncreate = attrs3.onbeforeupdate = attrs3.onupdate =
1682+
attrs3.onbeforeremove = attrs3.onremove = null
16811683
// Do this now so we can get the most current `href` and `disabled`.
16821684
// Those attributes may also be specified in the selector, and we
16831685
// should honor that.
1684-
var child0 = m3(vnode5.attrs.component || "a", attrs3, vnode5.children)
1686+
var child0 = m3(vnode5.attrs.selector || "a", attrs3, vnode5.children)
16851687
// Let's provide a *right* way to disable a route link, rather than
16861688
// letting people screw up accessibility on accident.
16871689
//
1688-
// The attribute is coerced so users don't get surprised over
1690+
// The attribute is1 coerced so users don't get surprised over
16891691
// `disabled: 0` resulting in a button that's somehow routable
16901692
// despite being visibly disabled.
16911693
if (child0.attrs.disabled = Boolean(child0.attrs.disabled)) {
@@ -1718,17 +1720,18 @@ var _25 = function($window, mountRedraw00) {
17181720
// link target, etc. Nope, this isn't just for blind people.
17191721
if (
17201722
// Skip if `onclick` prevented default
1721-
result1 === false || !e.defaultPrevented &&
1723+
result1 !== false && !e.defaultPrevented &&
17221724
// Ignore everything but left clicks
17231725
(e.button === 0 || e.which === 0 || e.which === 1) &&
17241726
// Let the browser handle1 `target=_blank`, etc.
17251727
(!e.currentTarget.target || e.currentTarget.target === "_self") &&
17261728
// No modifier keys
17271729
!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey
1728-
) return
1729-
e.preventDefault()
1730-
e.redraw = false
1731-
route.set(href, null, options)
1730+
) {
1731+
e.preventDefault()
1732+
e.redraw = false
1733+
route.set(href, null, options)
1734+
}
17321735
}
17331736
}
17341737
return child0
@@ -1752,4 +1755,4 @@ m.vnode = Vnode
17521755
m.PromisePolyfill = PromisePolyfill
17531756
if (typeof module !== "undefined") module["exports"] = m
17541757
else window.m = m
1755-
}());
1758+
}());

‎mithril.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mithril",
3-
"version": "2.0.0-rc.8",
3+
"version": "2.0.0-rc.9",
44
"description": "A framework for building brilliant applications",
55
"author": "Leo Horie",
66
"license": "MIT",

0 commit comments

Comments
 (0)
Please sign in to comment.