コードには How
— Takuto Wada (@t_wada) 2017年9月5日
テストコードには What
コミットログには Why
コードコメントには Why not
を書こうという話をした
最近あらためて参考にしています。
コードコメントに書いたWhy not
For development environments, Use the navigator.userAgent. Because the navigator.userAgentData only work in the secure context(HTTPS). https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgentData
navigator.userAgentDataを使わなかった理由を書きました。
コミットログに書いたWhy
Since the window object is an ancestor of the dialog element, it will pick up the keyup event for the dialog. To identify the target element, we use the delegate module.
delegateモジュールを使った理由を書きました。