Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Scaffold for Read and Debug JavaScript
Search
Koji Saiki
September 24, 2019
Programming
0
77
Scaffold for Read and Debug JavaScript
Introduction information for javascript rookie, reader, debugger, javascript product supporter
Koji Saiki
September 24, 2019
Tweet
Share
More Decks by Koji Saiki
See All by Koji Saiki
Angular で PCF した話
kojisaiki
0
550
Why is the subject of the story about Java support JDK?
kojisaiki
0
130
いまどきのSIer的品質向上
kojisaiki
0
150
誰も教えてくれなかったSEとしてただ一つ必要なこと
kojisaiki
0
450
真・なぜ誰もこう書いてくれないDependency Injection入門
kojisaiki
0
770
なぜ誰もこう書いてくれない Dependency Injection
kojisaiki
5
1.8k
Other Decks in Programming
See All in Programming
CSC509 Lecture 11
javiergs
PRO
0
310
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
470
AIを駆使して新しい技術を効率的に理解する方法
nogu66
1
650
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
39
13k
How Software Deployment tools have changed in the past 20 years
geshan
0
970
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
2
2.3k
Nitro v3
kazupon
2
320
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
10
5.2k
Doc Translate - LLMを活用したコードドキュメント自動翻訳VSCode拡張機能
eycjur
0
100
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
160
Building AI with AI
inesmontani
PRO
1
250
What's New in Web AI?
christianliebel
PRO
0
130
Featured
See All Featured
The Language of Interfaces
destraynor
162
25k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
680
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
How GitHub (no longer) Works
holman
315
140k
How STYLIGHT went responsive
nonsquared
100
5.9k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Being A Developer After 40
akosma
91
590k
Transcript
Scaffold for Read and Debug JavaScript KOJI SAIKI@SAIKOU9901 2019/09/24
Who am I ? 佐伯紘二(サイキ コウジ) Now: Support Engineer@Microsoft for
Dynamics C&E / PowerApps / Flow Old: Application Engineer with Typescript / Java etc. Twitter: @saikou9901 Github: @kojisaiki
Preface 社内のサポートエンジニア仲間向けの勉強会資料を公開用に調整したものです。 JavaScript を読んだりデバッグしたりする際に参考になれば。 特に大切な内容は↓マーク。
Line-up Background Use Case How JS Works Tips
Background 技術背景
Netscape で誕生 1995 年に Netscape Communications の Brendan Eich が開発した。
1996 年に Internet Explorer 3.0 に搭載された後、普及率アップ。
Java とは技術的な関係なし Java が当時流行っていた。 Sun Microsystems と Netscape Communications が業務提携していた。
JSは「実装」。「仕様」は “ECMAScript” 標準仕様は “ECMAScript” (エクマスクリプト)。実装ごとに独自拡張がある。 開発者 Brendan Eich を中心とした標準化団体 Ecma
International がメンテナンスしている。 http://ecma-international.org/
Use Case どのように 使用されているか
WEBページにアクションをつける HTML は文書構造、 CSS は Look and Feel 、 JavaScript
は Action (Behavior) を定義する。
Node.js によるサーバサイド開発 2009 年に Ryan Dahl により開発された。
普及により汎用スクリプト言語化 モバイルネイティブアプリや、Unityによるゲーム開発も行われる。
TypeScriptによりさらに使いやすく Microsoft が 2012 年に公開した TypeScript は JavaScript へのトランスパイル言語。 型推論などにより開発が超便利に。
How JS Works どうやって 動いてるのか
JavaScriptのエンジン ブラウザごとに JavaScript エンジンが搭載されている。
エンジンがスクリプトを順番に実行 スクリプトの上から順番に実行される。 「巻上げ」という特殊な仕様があり、 関数宣言は後ろに書いてもOK。 https://developer.mozilla.org/ja/docs/Web /JavaScript/Reference/Statements/functio n#Function_declaration_hoisting
イベントによる処理実行 よくある OnClick や OnSubmit はこれ。 Event は ECMAScript ではなく、W3C
の DOM Standardでインタフェースだ け決まっている。 https://www.w3.org/TR/domcore/ ブラウザ間の互換性問題はこの辺で よく起きる。
Tips JSを捌くための
リファレンスは Mozilla でおk 仕様はとにかくこのサイト。ブラウザごとの取り扱いや ECMAScript 対応表もある。 https://developer.mozilla.org/ja/docs/Web/JavaScript
動作見るなら F12 のコンソール コンソールでスクリプトを試せる。 ウィンドウごとにエンジンが動いているので、変数宣言範囲はウィンドウごと。
特殊な値 null, undefined, NaN null: プロパティが宣言されているが、値なし。 undefined: プロパティの宣言なし。 NaN: 数値に変換できなかった結果。この値は
Number 型にしか出現しない。
HTMLで宣言=実行開始 HTMLで読み込み宣言される箇所でスクリプ トが実行される。 HTMLのロードが途中で止まっている場合は、 その直前のスクリプトを疑う。 JS ファイルのロードを body 末尾にするという プラクティスがある。
https://allabout.co.jp/gm/gc/380498/2/
とにかくシングルスレッド setTimeout 等はタスクキューに詰める。処理が終わらないと次のタスクは処理されない。 https://qiita.com/Kikulin/items/3e980d00102c5c7cf600
Line-up Background Use Case How JS Works Tips
Thank you! References: https://ja.wikipedia.org/wiki/JavaScript https://github.com/tc39/ecma262 https://dom.spec.whatwg.org/ https://developer.mozilla.org/ja/docs/Web https://allabout.co.jp/gm/gc/380498/2/ https://christina04.hatenablog.com/entry/2017/03/13/190000 https://qiita.com/Kikulin/items/3e980d00102c5c7cf600