mastodon.zunda.ninja is one of the many independent Mastodon servers you can use to participate in the fediverse.
Zundon is a single user instance as home of @zundan as well as a test bed for changes of the code.

Administered by:

Server stats:

1
active users

JavaScriptの関数の中から見えるthisはすげ替えも可能なのわね。ぐえぇ。
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/

ActionCableの例で関数プロパティ中で別の関数プッロパティのthisを挿げ替えてるっぽくてどゆことなん

initialized() {
this.update = this.update.bind(this)
},

update() {
this.documentIsActive ? this.appear() : this.away()
},

あー。このupdate()はコールバックとして呼ばれるからbing()しておかないとthisがコールバック元のコンテキストになっちゃうのかな?

developer.mozilla.orgFunction.prototype.bind() - JavaScript | MDNThe bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.