Upgrade to Pro — share decks privately, control downloads, hide ads and more …

安全なJavaScriptを書く

Kohei Asai
December 15, 2015

 安全なJavaScriptを書く

SCRIPTY #4 on 2015-12-15

Kohei Asai

December 15, 2015
Tweet

More Decks by Kohei Asai

Other Decks in Programming

Transcript

  1. whoami » @axross / Kohei Asai » Gunosy Inc. »

    ωτήഇਓ -> հޢۀք -> Webۀք » SPAॻ͍͓ͯ௞ۚ΋Βͬͯ·͢
  2. assert / unassert » twada/unassert » ίʔυதͷassert()΍console.assert()Λ࡟আ͢Δ΋ͷ » throwͷ୅ΘΓʹassert()Λ࢖ͬͯɺAssertionErrorΛ౤͛Δ »

    assert()ͳͲͷ෦෼͚͕ͩunassertʹΑͬͯ࡟আ͞ΕɺϓϩμΫ γϣϯ࣌ʹ͸AssertionError͕ൃੜ͠ͳ͘ͳΔ » http://www.slideshare.net/t_wada/unassert
  3. ΤϥʔΛऩू͢Δ » window.onerrorͰ΄΅શͯͷྫ֎ΛcatchͰ͖Δ » catchͨ͠΋ͷΛΤϥʔऩूαʔϏεʹ౤͛Δ » Sentry » Airbrake »

    sourcemaps͕͋Ε͹೉ಡԽޙͷίʔυ΋ղऍͯ͘͠ΕΔ » ͋Δ͍͸ɺGoogle AnalyticsʹஷΊΔ » ྫ֎Λऩूͯ͠ɺঢ়گݻ༗΍୺຤ݻ༗ͷόάΛݕग़͠Α͏