Introducing Incremental DOM — Google Developers — Medium
Reactやvirtual-dom、Glimmer(Ember)などVirtual DOMの実装は色々あるが、これらのVirtual DOM実装には2つの問題がある
- 既存のテンプレート言語を利用していない(しにくい)
- モバイルでのパフォーマンス、特にメモリに関しては大きすぎる
これらを解決するためにIncremental DOMと言うものを作っている(WIP)
Introducing Incremental DOM — Google Developers — Medium
Reactやvirtual-dom、Glimmer(Ember)などVirtual DOMの実装は色々あるが、これらのVirtual DOM実装には2つの問題がある
これらを解決するためにIncremental DOMと言うものを作っている(WIP)
If you must nest functions in a way that requires access to multiple this', alias outer this to something meaningful - describe the value it's holding. Treat this as the invisible first argument.
In general though, avoiding the situation (nested functions and frivolous use of this) will frequently produce clearer results.
I was accidentally included in a discussion on how to best name this in nested functions in JavaScript. +1's were given to this suggestion of using _this.
Giving style advice on naming nested this without a meaningful context isn't too helpful in my opinion. Examples below have been altered to have at least some context, although a completely contrived and stupid one.
| fizz = function f() { | |
| fizz = function () { | |
| fizz = function () { | |
| fizz = f | |
| return "Fizz" | |
| } | |
| } | |
| } | |
| buzz = function f() { |
| /** | |
| * Enable route to __noSuchMethod__ when unknown method calling. | |
| * | |
| * @param {Object} obj Target object. | |
| * @return {Object} | |
| */ | |
| function enableMethodMissing(obj) { | |
| var functionHandler = createBaseHandler({}); | |
| functionHandler.get = function(receiver, name) { |
| var o = { | |
| b: "B", | |
| c: "C", | |
| a: "A", | |
| }; | |
| print(JSON.stringify(o)); | |
| // {"b":"B","c":"C","a":"A"} |
| /** | |
| * outerHTML.js | |
| * | |
| * @version 1.4 | |
| * @author think49 | |
| */ | |
| if (!('outerHTML' in document.createElement('p')) && 'innerHTML' in document.createElement('p') && (typeof HTMLElement === 'function' || typeof HTMLElement === 'object')) { | |
| (function () { | |
| var _Node = (typeof Node === 'function' || typeof Node === 'object') ? Node : { |
| /** | |
| * Created by azu. | |
| * Date: 10/11/28 | |
| * License: MIT License | |
| */ | |
| var unsafeWindow = window; | |
| /** | |
| * コンソールにログを吐く |