diff --git a/src/entries/web-runtime.js b/src/entries/web-runtime.js index 8e806ac7..89fe9540 100644 --- a/src/entries/web-runtime.js +++ b/src/entries/web-runtime.js @@ -1,6 +1,6 @@ import Vue from '../runtime/index' -import { update } from '../runtime/dom-updater/index' +import { patch } from '../runtime/dom-backend/index' -Vue.prototype.__update__ = update +Vue.prototype.__patch__ = patch export default Vue diff --git a/src/runtime/dom-updater/index.js b/src/runtime/dom-backend/index.js similarity index 80% rename from src/runtime/dom-updater/index.js rename to src/runtime/dom-backend/index.js index b58ffec4..cca78e97 100644 --- a/src/runtime/dom-updater/index.js +++ b/src/runtime/dom-backend/index.js @@ -1,4 +1,4 @@ -import createUpdater from '../vdom/create-updater' +import createPatchFunction from '../vdom/patch' import * as nodeOps from './node-ops' import classes from './modules/class' import style from './modules/style' @@ -7,7 +7,7 @@ import attrs from './modules/attrs' import events from './modules/events' import directives from './modules/directives' -export const update = createUpdater({ +export const patch = createPatchFunction({ nodeOps, modules: [ classes, diff --git a/src/runtime/dom-updater/modules/attrs.js b/src/runtime/dom-backend/modules/attrs.js similarity index 100% rename from src/runtime/dom-updater/modules/attrs.js rename to src/runtime/dom-backend/modules/attrs.js diff --git a/src/runtime/dom-updater/modules/class.js b/src/runtime/dom-backend/modules/class.js similarity index 100% rename from src/runtime/dom-updater/modules/class.js rename to src/runtime/dom-backend/modules/class.js diff --git a/src/runtime/dom-updater/modules/directives.js b/src/runtime/dom-backend/modules/directives.js similarity index 100% rename from src/runtime/dom-updater/modules/directives.js rename to src/runtime/dom-backend/modules/directives.js diff --git a/src/runtime/dom-updater/modules/events.js b/src/runtime/dom-backend/modules/events.js similarity index 100% rename from src/runtime/dom-updater/modules/events.js rename to src/runtime/dom-backend/modules/events.js diff --git a/src/runtime/dom-updater/modules/pre.js b/src/runtime/dom-backend/modules/pre.js similarity index 100% rename from src/runtime/dom-updater/modules/pre.js rename to src/runtime/dom-backend/modules/pre.js diff --git a/src/runtime/dom-updater/modules/props.js b/src/runtime/dom-backend/modules/props.js similarity index 100% rename from src/runtime/dom-updater/modules/props.js rename to src/runtime/dom-backend/modules/props.js diff --git a/src/runtime/dom-updater/modules/style.js b/src/runtime/dom-backend/modules/style.js similarity index 100% rename from src/runtime/dom-updater/modules/style.js rename to src/runtime/dom-backend/modules/style.js diff --git a/src/runtime/dom-updater/node-ops.js b/src/runtime/dom-backend/node-ops.js similarity index 100% rename from src/runtime/dom-updater/node-ops.js rename to src/runtime/dom-backend/node-ops.js diff --git a/src/runtime/instance/lifecycle.js b/src/runtime/instance/lifecycle.js index 9c857a89..f64e3936 100644 --- a/src/runtime/instance/lifecycle.js +++ b/src/runtime/instance/lifecycle.js @@ -58,11 +58,11 @@ export function lifecycleMixin (Vue) { callHook(this, 'beforeUpdate') } if (!this._vnode) { - // Vue.prototype.__update__ is injected in entry points + // Vue.prototype.__patch__ is injected in entry points // based on the rendering backend used. - this.$el = this.__update__(this.$el, vnode) + this.$el = this.__patch__(this.$el, vnode) } else { - this.$el = this.__update__(this._vnode, vnode) + this.$el = this.__patch__(this._vnode, vnode) } this._vnode = vnode if (this._mounted) { diff --git a/src/runtime/vdom/create-updater.js b/src/runtime/vdom/patch.js similarity index 99% rename from src/runtime/vdom/create-updater.js rename to src/runtime/vdom/patch.js index b19848b9..b1a84807 100644 --- a/src/runtime/vdom/create-updater.js +++ b/src/runtime/vdom/patch.js @@ -36,7 +36,7 @@ function createKeyToOldIdx (children, beginIdx, endIdx) { return map } -export default function createUpdater (backend) { +export default function createPatchFunction (backend) { let i, j const cbs = {}