Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
2018年、IE6対応サイトを作る
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
boiyama
June 19, 2018
Programming
1k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2018年、IE6対応サイトを作る
We Are JavaScripters! @21st【初心者歓迎LT大会】の発表資料です。
https://wajs.connpass.com/event/87473/
boiyama
June 19, 2018
Transcript
36 slides
2 0 1 8 ɺ I E 6 ର
Ԡ αΠ τ Λ ࡞ Δ 2 0 1 8 . 6 . 1 9 We A re J a v a S c r i p t e r s ! @ 2 1 s t
P ro f i l e • ϑϩϯτΤϯυΤϯδχΞ at PERSOL
• GitHub: boiyaa Twitter: boiyaaaaaa
Ζ ͏ ͱ ࢥ ͬ ͨ ಈ ػ ϠέΫι
2018ݱࡏ IE6 ͷγΣΞ΄΅ 0% Β͍͠͠ IE7~10 ΄΅ 0% Β͍͠ ͍͍ςʔϚ͡Όͳ͍͔
͠ Γ ͱ ͯ͠ɺ ࠓ ࣌ ͷ ͭ
Λ ͏ ੲͳ͕ΒͷίʔσΟϯάΛͯͭ͠·Βͳ͍ Backbone ͱ͔ AngularJS ͷݹ͍όʔδϣϯΘͳ͍ ͠ࠓ࣌ͷ͕ͭ͑ͨΒۤ͡Όͳ͍͔
ࠓ ࣌ ͷ ͭ ͷ α ϙʔ τϒ ϥ
β ௐ Δ • React ͱ͔ Vue ͱ͔ Angular ͱ͔େମΈΜͳ IE9+ • jQuery ͢Β IE9+ • webpack IE9+ ( Parcel, Rollup, FuseBox ෆ໌ ) • ͭ·Γ ES5 ޓϒϥβରԠͱ͍͏͜ͱ
ͱ ͍ ͍ ͭ ͭ ReactDOM υΩϡϝϯτ webpack υΩϡϝϯτ
݁ہͷͱ͜Ζ Polyfill ೖΕͨΒಈ͘ʁ Babel TypeScript ES3 ʹมͰ͖ΔΈ͍ͨͩ͠
ଓ ͍ͯɺ I E 6 ڥ ೖ ख ํ
๏ • Windows XP • ·ͨ BrowserStack
ࠓ ճ B ro w s e r S
t a c k Λ ͏
ແྉϓϥϯͩͱIE6͕͑ͳ͔ͬͨͷͰɺ Ұ൪͍҆ϓϥϯΛܖͨ͠ ͭΓ͚ͩͬͨͲɺ ؒҧ͑ͯؒҰׅʹͯͯ͠ $350 ࢧͬͨ
ͱΓ͋͑ͣ Next.js Ͱ࡞ͬͨͭΛࢼ͢
X P I E 6
͋Εɺ͍͖ͳΓಈ͍ͨ Next.js ͦ͜·Ͱͬͯ͘ΕΜͷʂʁ ͳΘ͚ͳ͍
SSR ͯ͠Δը໘͕ग़ͯΔ͚ͩ ී௨ʹ JS ΤϥʔʹͳͬͯΔ IE6 ͩͱ༰͕Θ͔ΓͣΒ͍ͷͰɺ Ұ୴ IE11 ͷ
IE8 ϞʔυͰσόοά͢Δ
None
IE8- ͰϓϩύςΟ໊ʹ༧ޠΛ͏߹ ϒϥέοτදه͡Όͳ͍ͱΤϥʔ obj.class // error obj[“class”] // ok
ͦͷมΛͬͯ͘ΕΔ es3ify-loader ͱ͍͏ webpack loader ͕͋ͬͨ ͕ Next.js ͷ webpack
config Ͱ͏ͱౖΒΕͨ ૉͷ React + webpack Ͱࢼ͢
͏·͍͚͘͜Ε͕ͰΔ IE8͖ͬ͞ͷग़ͳ͘ͳ͚ͬͨͲผͷΤϥʔ͕ग़ͨ
IE8- ʹ get / set ߏจ͕ͳ͍ ม͢Δํ๏͕͋Δͷ͔Ͳ͏͔Θ͔Βͳͯ͘ ͱΓ͋͑ͣ get /
set ߏจΛؚΜͩϥΠϒϥϦఘΊͨ
React ͖͋ΒΊΔͱͯ͠ Vue Ͱ Angular ͰΘΕͯͨ ͦΜͳத͍͚ͦ͏ͳࠓ࣌ͷͭΈ͚ͭͨ
None
ͱΓ͋͑ͣ webpack Ͱ Hyperapp ΛϏϧυͯ͠ΈͨΒ ͜Ε Next.js ͱಉ༷ʹ es3ify-loader ͰౖΒΕͨ
ؾసʹ Parcel ʹม͑ͨ
parcel ެࣜʹ͋Δ hyperapp ͷαϯϓϧʹ es3ify ΛΈ߹ΘͤΔ ( ࢀߟɿhttps://gist.github.com/ bard/5cb927e7abb6988b2f2e516b5f0e6070 )
͏·͍͚͘͜Ε͕ग़Δ
ES5 Ճϝιου͕ଘࡏ͠ͳ͍͜ͱʹΑΔΤϥʔ ·͊ͦΜͳ͏·͍͔͘ͳ͍
es5-shim, es5-sham Λಋೖͯ͠ରԠͨ͠ ͨͩɺࠓճͷ Object.defineProperty શͳαϙʔτ Ͱͳ͘ɺྫ͑ get, set هड़ࢠΛ͏ͱΤϥʔʹͳΔ
ͦ͏͍ IE8- addEventListener ͡Όͳ͔ͬͨ attachEvent ͱ͍͏ಠ࣮ࣗ ·ͩग़Δ
addEventListener ͷ Polyfill ͋ͬͨ https://gist.github.com/jonathantneal/3748027 ͜ΕΛ es5-shim ͷ࣍ʹಡΈࠐΉ
͍ͦͯͭ͠ʹ
X P I E 8
X P I E 7
X P I E 6 · Ͱ ಈ ͍ ͨ
ʂ
͜͜Ͱྗਚ͖ͨ
· ͱ Ί • https://github.com/boiyaa/i6-challenge • ಈ͘ JS ίʔυͷ҆ getter
/ setter ͷ༗ແ • ·ͩ CSS ͷۤʹೖΕͯͳ͍ɻઈɻ • ͜ͷൃදͷͨΊʹ $350 ࣦͬͨͷ͕௧͍
͞ΑͳΒ
More Decks by boiyama
See All by boiyama
Reproのビジネスサイドを支えるJS
boiyama
0
200
バックオフィスに行ったソフトウェアエンジニアの業務効率化事例
boiyama
1
300
ヤバいESLint/TSLintルール作っちゃったかもしれない
boiyama
0
1.5k
チームをCQRS
boiyama
1
1.7k
フロントエンドのサーバーレス SSR編
boiyama
0
730
Serverless for Front-end Server-Side Rendering
boiyama
1
150
Learning Elm in JS
boiyama
1
590
JSでElmを学ぶ
boiyama
0
130
フロントエンドのサーバーレス SPA編
boiyama
1
1.1k
Other Decks in Programming
See All in Programming
Getting Started with Vibe Coding
miccheng
0
240
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
9.3k
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.4k
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
900
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
690
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
310
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1k
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
190
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
190
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
250
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
Prompt Engineering for Job Search
mfonobong
0
590
Why Our Code Smells
bkeepers
PRO
340
58k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Being A Developer After 40
akosma
PRO
92
590k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Accessibility Awareness
sabderemane
1
300
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
580
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
330
What's in a price? How to price your products and services
michaelherold
247
13k