v2.0.0-rc.9

This commit is contained in:
Isiah Meadows 2019-07-16 21:59:00 -04:00
parent c30a716e49
commit ae6b547673
5 changed files with 18 additions and 15 deletions

View file

@ -18,7 +18,7 @@ mithril.js [![NPM Version](https://img.shields.io/npm/v/mithril.svg)](https://ww
## What is Mithril?
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.
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.
Mithril is used by companies like Vimeo and Nike, and open source platforms like Lichess 👍.

View file

@ -1675,17 +1675,19 @@ var _25 = function($window, mountRedraw00) {
// Remove these so they don't get overwritten
var attrs3 = {}, onclick, href
assign(attrs3, vnode5.attrs)
attrs3.component = null
attrs3.options = null
attrs3.key = null
// The first two are internal, but the rest are magic attributes
// that need censored to not screw up rendering0.
attrs3.selector = attrs3.options = attrs3.key = attrs3.oninit =
attrs3.oncreate = attrs3.onbeforeupdate = attrs3.onupdate =
attrs3.onbeforeremove = attrs3.onremove = null
// Do this now so we can get the most current `href` and `disabled`.
// Those attributes may also be specified in the selector, and we
// should honor that.
var child0 = m3(vnode5.attrs.component || "a", attrs3, vnode5.children)
var child0 = m3(vnode5.attrs.selector || "a", attrs3, vnode5.children)
// Let's provide a *right* way to disable a route link, rather than
// letting people screw up accessibility on accident.
//
// The attribute is coerced so users don't get surprised over
// The attribute is1 coerced so users don't get surprised over
// `disabled: 0` resulting in a button that's somehow routable
// despite being visibly disabled.
if (child0.attrs.disabled = Boolean(child0.attrs.disabled)) {
@ -1718,19 +1720,20 @@ var _25 = function($window, mountRedraw00) {
// link target, etc. Nope, this isn't just for blind people.
if (
// Skip if `onclick` prevented default
result1 === false || !e.defaultPrevented &&
result1 !== false && !e.defaultPrevented &&
// Ignore everything but left clicks
(e.button === 0 || e.which === 0 || e.which === 1) &&
// Let the browser handle1 `target=_blank`, etc.
(!e.currentTarget.target || e.currentTarget.target === "_self") &&
// No modifier keys
!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey
) return
) {
e.preventDefault()
e.redraw = false
route.set(href, null, options)
}
}
}
return child0
},
}

2
mithril.min.js vendored

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "mithril",
"version": "2.0.0-rc.8",
"version": "2.0.0-rc.9",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "mithril",
"version": "2.0.0-rc.8",
"version": "2.0.0-rc.9",
"description": "A framework for building brilliant applications",
"author": "Leo Horie",
"license": "MIT",