タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

javascriptとjavaScriptとthisに関するkimihitoのブックマーク (2)

  • Understanding JavaScript Function Invocation and "this"

    Over the years, I've seen a lot of confusion about JavaScript function invocation. In particular, a lot of people have complained that the semantics of this in function invocations is confusing. In my opinion, a lot of this confusion is cleared up by understanding the core function invocation primitive, and then looking at all other ways of invoking a function as sugar on top of that primitive. In

  • JavaScriptの”this”をめぐる冒険 |

    JavaScriptの"this"って難しいですよね。理解しないまま使ってると、思わぬところでグローバルオブジェクトを指していたり、そもそもvarでプライベートな変数にすべきところにもthisを使っていたり…。私もthisには散々悩まされてきたので、そろそろ完璧に理解しようと思い、以下の記事をまとめてみました。間違いを見つけたら指摘して頂けるとありがたいです。なお、文中の引用文章は読みやすさを考慮して適宜改行、強調を行っています。 thisとは何か。 まずは仕様書を見てみましょう。 ECMA-262 3rd 11.1.1 The this Keyword The this keyword evaluates to the this value of the execution context. ECMA-262 5th 11.1.1 The this Keyword  The this k

  • 1