Michael Best

Results 149 comments of Michael Best

The only time you would see `init` called more than once for the "same" binding is if the node has actually been re-rendered, like within the `template` or `with` bindings.

@egucciar I think you're running into the problem that [all bindings fire together](http://www.knockmeout.net/2012/06/knockoutjs-performance-gotcha-3-all-bindings.html). This was fixed in Knockout 3.0, but the classBindingProvider still works like 2.x. Thus if you have...

Check out https://github.com/ErikSchierboom/knockout-pre-rendered

No, Knockout doesn't care what you use on the server to pre-render the HTML.

We use [PhantomJS](http://phantomjs.org/) to run Knockout unit-tests, and I imagine it could be used to do some server-side rendering.

Here's another project that could help: https://github.com/prerender/prerender

What about using `setTimeout` in the parent's cleanup function?

> If useing `setTimeout`, what about parent's parent? True. It doesn't solve the problem well, since the `setTimeout` callbacks will run in the wrong order.

``` javascript ko.bindingHandlers['withlight'] = { 'init': function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { var bindingValue = valueAccessor(); if (typeof bindingValue != 'object' || bindingValue === null) throw new Error('withlight must be...

Oops. Last commit also included some unrelated changes to dependentObservable.