Comparing version 1.39.3 to 1.39.4
# Svelte changelog | ||
## 1.39.4 | ||
* Extract shared init logic ([#855](https://github.com/sveltejs/svelte/pull/855)) | ||
* Allow `console.*` calls in event handlers ([#782](https://github.com/sveltejs/svelte/issues/782)) | ||
* Marker comments in output ([#823](https://github.com/sveltejs/svelte/issues/823)) | ||
* Use `textContent` and `innerHTML` where appropriate ([#23](https://github.com/sveltejs/svelte/issues/23)) | ||
* Various improvements to generated code | ||
## 1.39.3 | ||
@@ -4,0 +12,0 @@ |
{ | ||
"name": "svelte", | ||
"version": "1.39.3", | ||
"version": "1.39.4", | ||
"description": "The magical disappearing UI framework", | ||
@@ -5,0 +5,0 @@ "main": "compiler/svelte.js", |
@@ -65,6 +65,5 @@ function noop() {} | ||
// TODO this is out of date | ||
function destroyEach(iterations, detach, start) { | ||
for (var i = start; i < iterations.length; i += 1) { | ||
if (iterations[i]) iterations[i].destroy(detach); | ||
function destroyEach(iterations) { | ||
for (var i = 0; i < iterations.length; i += 1) { | ||
if (iterations[i]) iterations[i].destroy(); | ||
} | ||
@@ -375,2 +374,6 @@ } | ||
function blankObject() { | ||
return Object.create(null); | ||
} | ||
function destroy(detach) { | ||
@@ -418,6 +421,2 @@ this.destroy = noop; | ||
function get(key) { | ||
return key ? this._state[key] : this._state; | ||
} | ||
function fire(eventName, data) { | ||
@@ -433,2 +432,16 @@ var handlers = | ||
function get(key) { | ||
return key ? this._state[key] : this._state; | ||
} | ||
function init(component, options) { | ||
component.options = options; | ||
component._observers = { pre: blankObject(), post: blankObject() }; | ||
component._handlers = blankObject(); | ||
component._root = options._root || component; | ||
component._yield = options._yield; | ||
component._bind = options._bind; | ||
} | ||
function observe(key, callback, options) { | ||
@@ -515,3 +528,3 @@ var group = options && options.defer | ||
this._state = assign({}, oldState, newState); | ||
this._recompute(changed, this._state, oldState, false); | ||
this._recompute(changed, this._state); | ||
if (this._bind) this._bind(changed, this._state); | ||
@@ -574,2 +587,2 @@ dispatchObservers(this, this._observers.pre, changed, this._state, oldState); | ||
export { destroy, destroyDev, differs, dispatchObservers, get, fire, observe, observeDev, on, onDev, set, _set, _setDev, callAll, _mount, _unmount, proto, protoDev, appendNode, insertNode, detachNode, detachBetween, detachBefore, detachAfter, reinsertBetween, reinsertChildren, reinsertAfter, reinsertBefore, destroyEach, createFragment, createElement, createSvgElement, createText, createComment, addListener, removeListener, setAttribute, setXlinkAttribute, getBindingGroupValue, toNumber, timeRangesToArray, children, claimElement, claimText, setInputType, setStyle, linear, generateRule, hash, wrapTransition, transitionManager, noop, assign }; | ||
export { blankObject, destroy, destroyDev, differs, dispatchObservers, fire, get, init, observe, observeDev, on, onDev, set, _set, _setDev, callAll, _mount, _unmount, proto, protoDev, appendNode, insertNode, detachNode, detachBetween, detachBefore, detachAfter, reinsertBetween, reinsertChildren, reinsertAfter, reinsertBefore, destroyEach, createFragment, createElement, createSvgElement, createText, createComment, addListener, removeListener, setAttribute, setXlinkAttribute, getBindingGroupValue, toNumber, timeRangesToArray, children, claimElement, claimText, setInputType, setStyle, linear, generateRule, hash, wrapTransition, transitionManager, noop, assign }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2038348
17798