Skip to content

Commit

Permalink
v2.0.0-rc.9
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-claudia committed Jul 17, 2019
1 parent c30a716 commit ae6b547
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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 👍.

Expand Down
25 changes: 14 additions & 11 deletions mithril.js
Expand Up @@ -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)) {
Expand Down Expand Up @@ -1718,17 +1720,18 @@ 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)
) {
e.preventDefault()
e.redraw = false
route.set(href, null, options)
}
}
}
return child0
Expand All @@ -1752,4 +1755,4 @@ m.vnode = Vnode
m.PromisePolyfill = PromisePolyfill
if (typeof module !== "undefined") module["exports"] = m
else window.m = m
}());
}());
2 changes: 1 addition & 1 deletion mithril.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -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",
Expand Down

0 comments on commit ae6b547

Please sign in to comment.