4 ms·
Interesting results. The only problem with that kind of private method is that another Cell method wouldn't be able to call it either.
by AndyKelley 13y ago
Interesting results. The only problem with that kind of private method is that another Cell method wouldn't be able to call it either.
- kbenson 13y agoYeah, for that you can go back to your original solution, but wrap it all in a (function(){ })() so the scope of the functions is limited to that function. I think you need to assign the Cell function to window.Cell as well to escape the scope for that one component. Unfortunately, it was much slower when I tested it last night. Close to 60% slower compared to your original solution, or 7% - 10% slower than the original prototype method version.