Comparing version 0.0.3 to 0.0.4
@@ -15,2 +15,3 @@ var StateMap = require("./state-map.js") | ||
beforePatch: null, | ||
afterPatch: null | ||
} | ||
@@ -59,3 +60,2 @@ // Set defaults | ||
RenderLoop.prototype.onBeforeDiff = function onBeforeDiff(v) { | ||
console.log("this", this) | ||
this.opts.beforeDiff = v | ||
@@ -68,2 +68,6 @@ } | ||
RenderLoop.prototype.onAfterPatch = function onAfterPatch(v) { | ||
this.opts.afterPatch = v | ||
} | ||
RenderLoop.prototype.redraw = function redraw() { | ||
@@ -100,2 +104,5 @@ this.redrawScheduled = false | ||
this.currentTree = newTree | ||
if (this.opts.afterPatch) { | ||
this.opts.afterPatch() | ||
} | ||
} | ||
@@ -102,0 +109,0 @@ } |
{ | ||
"name": "hafnium", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A minimal framework on top of virtual-dom", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
7898
169