This commit is contained in:
Isiah Meadows 2019-08-18 14:21:31 -04:00
parent 4c15e258e0
commit caef6a8f09
5 changed files with 11 additions and 6 deletions

View file

@ -18,7 +18,7 @@ mithril.js [![npm Version](https://img.shields.io/npm/v/mithril.svg)](https://ww
## What is Mithril? ## What is Mithril?
A modern client-side Javascript framework for building Single Page Applications. It's small (<!-- size -->9.78 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.79 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 👍. Mithril is used by companies like Vimeo and Nike, and open source platforms like Lichess 👍.

View file

@ -699,7 +699,11 @@ var _12 = function($window) {
removeHTML(parent, old) removeHTML(parent, old)
createHTML(parent, vnode3, ns, nextSibling) createHTML(parent, vnode3, ns, nextSibling)
} }
else vnode3.dom = old.dom, vnode3.domSize = old.domSize else {
vnode3.dom = old.dom
vnode3.domSize = old.domSize
vnode3.instance = old.instance
}
} }
function updateFragment(parent, old, vnode3, hooks, nextSibling, ns) { function updateFragment(parent, old, vnode3, hooks, nextSibling, ns) {
updateNodes(parent, old.children, vnode3.children, hooks, nextSibling, ns) updateNodes(parent, old.children, vnode3.children, hooks, nextSibling, ns)
@ -868,13 +872,14 @@ var _12 = function($window) {
if (vnode3.attrs == null || ( if (vnode3.attrs == null || (
vnode3.attrs.contenteditable == null && // attribute vnode3.attrs.contenteditable == null && // attribute
vnode3.attrs.contentEditable == null // property vnode3.attrs.contentEditable == null // property
)) return )) return false
var children3 = vnode3.children var children3 = vnode3.children
if (children3 != null && children3.length === 1 && children3[0].tag === "<") { if (children3 != null && children3.length === 1 && children3[0].tag === "<") {
var content = children3[0].children var content = children3[0].children
if (vnode3.dom.innerHTML !== content) vnode3.dom.innerHTML = content if (vnode3.dom.innerHTML !== content) vnode3.dom.innerHTML = content
} }
else if (vnode3.text != null || children3 != null && children3.length !== 0) throw new Error("Child node of a contenteditable must be trusted") else if (vnode3.text != null || children3 != null && children3.length !== 0) throw new Error("Child node of a contenteditable must be trusted")
return true
} }
//remove //remove
function removeNodes(parent, vnodes, start, end) { function removeNodes(parent, vnodes, start, end) {

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", "name": "mithril",
"version": "2.0.3", "version": "2.0.4",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View file

@ -1,6 +1,6 @@
{ {
"name": "mithril", "name": "mithril",
"version": "2.0.3", "version": "2.0.4",
"description": "A framework for building brilliant applications", "description": "A framework for building brilliant applications",
"author": "Leo Horie", "author": "Leo Horie",
"license": "MIT", "license": "MIT",