Muutke küpsiste eelistusi

E-raamat: Building Browser Extensions: Create Modern Extensions for Chrome, Safari, Firefox, and Edge

  • Formaat: PDF+DRM
  • Ilmumisaeg: 22-Nov-2022
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484287255
Teised raamatud teemal:
  • Formaat - PDF+DRM
  • Hind: 67,91 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: PDF+DRM
  • Ilmumisaeg: 22-Nov-2022
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484287255
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Almost all web developers today have plenty of experience with building regular web page apps, but a lot of that knowledge doesn't transfer over when it comes to creating browser extensions. This book provides a complete reference for how to build modern browser extensions. 

Creating and deploying a browser extension is more like building a mobile app than a website. When you start building an extension you'll often find there are a large number of new concepts and idiosyncrasies to wrangle with. This book reveals how to successfully navigate around these obstacles and how to take advantage of the limited resources available.  

You'll see how a browser extensions work, their component pieces, and how to build and deploy them. Additionally, you'll review all the tricky bits of extension development that most developers have to learn through trial and error. The current transition from manifest v2 to v3 is of special interest, and an entire chapter will be dedicated to this subject. By the end of this book, you will have a rich understanding of what browser extensions are, how they work, all the pitfalls to avoid, and the most efficient ways of building them.

What You’ll Learn
  • Examine the different components of browser extensions and how they behave
  • Review common pitfalls developers encounter when building browser extensions and how to avoid them
  • Develop, deploy, and manage a published browser extension
  • Build a browser extension using modern JavaScript frameworks
Who This Book Is For

Developers tasked with building a supplementary browser extension to go alongside their existing product. This book also targets people that have at least a basic understanding of the fundamentals of web development and wish to quickly understand how they can roll out a browser extension.


About the Author xxiii
About the Technical Reviewer xxv
Acknowledgments xxvii
Foreword xxix
Introduction xxxi
Chapter 1 What Are Browser Extensions?
1(16)
History of Browser Extensions
2(3)
Customizing Software with Plugins
2(1)
History of Web Browsers
3(1)
Native Browser Plugins
4(1)
From Browser Add-ons to Extensions
4(1)
The Browser Extension Landscape
5(9)
Comparing Mobile Apps and Browser Extensions
5(1)
Browser Extension Stores
6(1)
Types of Browser Extensions
7(7)
Summary
14(1)
Credits
15(2)
Chapter 2 Fundamental Elements of Browser Extensions
17(26)
The Browser Model
17(3)
Browser Tabs
19(1)
Same-Origin Policy
20(1)
The Browser Extension Model
20(4)
Independent JavaScript Pages and Runtimes
21(1)
Native APIs and User Interfaces
22(1)
Tab and Domain Access
23(1)
Observing and Intercepting Network Requests
23(1)
Elements of Browser Extensions
24(9)
Extension Manifest
24(1)
Background Scripts
25(1)
The Popup Page
26(2)
The Options Page
28(2)
Content Scripts
30(1)
Devtools Panels and Sidebars
31(2)
Extension Elements in Action
33(9)
Honey
33(2)
LastPass
35(3)
Grammarly
38(2)
React Developer Tools
40(2)
Summary
42(1)
Chapter 3 Browser Extension Crash Course
43(32)
Creating the Manifest
44(1)
Minimum Viable Extension
45(1)
Installing Your Extension
45(5)
Reloading Your Extension
50(2)
Adding a Background Script
52(4)
Adding a Popup Page
56(4)
Adding an Options Page
60(4)
Adding a Content Script
64(3)
Working with Multiple Tabs
67(2)
Adding a Devtools Panel
69(3)
Summary
72(3)
Chapter 4 Browser Extension Architecture
75(22)
Architecture Overview
76(4)
Plurality, Lifecycles, and Updates
80(3)
Background Service Worker
80(1)
Popup and Options Pages
81(1)
Devtools Pages
82(1)
Content Scripts
82(1)
Browser Extension File Server
83(11)
Sandboxed Pages
94(2)
Summary
96(1)
Chapter 5 The Extension Manifest
97(70)
The Manifest File
98(1)
Supporting Different Locales
99(2)
Match Patterns and Globs
101(2)
File Path Match Patterns
101(1)
URL Match Patterns
102(1)
URL Globs
102(1)
Manifest Properties
103(63)
Action
104(6)
Author
110(1)
Automation
110(1)
Background
111(3)
Browser_Action
114(1)
Browser_Specific_Settings
115(1)
Chrome_Settings_Overrides
116(8)
Chrome_Url_Overrides
124(1)
Commands
125(6)
Content_Capabilities
131(1)
Content_Scripts
131(3)
Content_Security_Policy
134(2)
Converted_From_User_Script
136(1)
Cross_Origin_Embedder_Policy
136(1)
Cross_Origin_Opener_Policy
137(1)
Declarative_Net_Request
138(1)
Defaultjocale
139(1)
Description
140(1)
Developer
140(1)
Devtools_Page
141(1)
Differential_Fingerprint
141(1)
Event_Rules
142(1)
Externally_Connectable
142(1)
File_Browser_Handlers
143(1)
File_System_Provider_Capabilities
144(1)
Homepage_Url
145(1)
Hoslpermissions
146(1)
Icons
146(1)
Incognito
147(1)
Key
148(1)
Manifest_Version
149(1)
Minimum_Chrome_Version
150(1)
Nad modules
150(1)
Name
150(1)
Oauth2
151(1)
Offline_Enabled
152(1)
Omnibox
152(1)
Optional_Host_Permissions
153(1)
Optional_Permissions
153(1)
Options_Page
154(1)
Options_Ui
154(3)
Page_Action
157(1)
Permissions
157(1)
Platforms
158(1)
Replacement_Web_App
158(1)
Requirements
159(1)
Sandbox
159(1)
Short_Name
160(1)
Storage
161(1)
System_Indicator
161(1)
Tts_Engine
162(1)
Update_Url
163(1)
Version
163(1)
Version_Name
164(1)
Web_Accessible_Resources
164(2)
Summary
166(1)
Chapter 6 Understanding the Implications of Manifest V3
167(20)
Motivation for Manifest V3
168(2)
Security
168(1)
Performance
168(1)
Privacy and Transparency
169(1)
Revenue
169(1)
Implications of Background Service Workers
170(9)
DOM
171(1)
XMLHttpRequest
171(1)
Timer API
171(1)
Event Handlers
172(2)
Service Worker Persistence
174(2)
Global State and Storage
176(3)
Audio and Video
179(1)
Implications of Content Security Policy Restrictions
179(1)
Implications of DeclarativeNetRequest
180(5)
Summary
185(2)
Chapter 7 Background Scripts
187(38)
Web Page Service Workers vs. Extension Service Workers
187(7)
Similarities
190(2)
Differences
192(2)
Manifest v2 vs. Manifest v3
194(5)
Scripts vs. Service Workers
194(1)
JavaScript Imports
195(1)
No Access to DOM and Limited Global APIs
196(1)
Nonpersistent
197(1)
No Shutdown Event
198(1)
No Programmatic Background Access
199(1)
Working with Background Scripts
199(8)
Inspecting Background Service Workers
200(2)
Service Worker Errors
202(3)
Service Worker Termination
205(2)
Common Patterns
207(13)
Event Handler
208(2)
Secret Management and Authentication
210(1)
Message Hub
211(3)
Storage Manager
214(1)
Injecting Scripts
215(1)
Sniffing Web Traffic
216(1)
Installed/Updated Events
217(1)
Opening Tabs
218(2)
Forcing Service Worker Persistence
220(4)
Implementation
220(3)
Drawbacks and Limitations
223(1)
Summary
224(1)
Chapter 8 Popup and Options Pages
225(20)
Popup Pages
225(8)
Popup Page Properties
226(3)
Opening and Closing Popup Pages
229(2)
Changing the Popup Page
231(1)
Detecting Popup State
231(1)
Suggested Use
232(1)
Options Pages
233(10)
Options Page Properties
234(2)
Opening and Closing Options Pages
236(1)
Detecting Options Pages
237(1)
Suggested Use
238(1)
Content Script Restrictions
239(4)
Summary
243(2)
Chapter 9 Content Scripts
245(24)
Introduction to Content Scripts
245(10)
Injecting CSS
246(1)
Content Script Isolation
247(3)
Page Automation
250(4)
Logging and Errors
254(1)
Extension API Access
255(1)
Modules and Code Splitting
256(1)
Bundling
256(5)
Dynamic Imports
257(3)
Dynamic Script Tags
260(1)
Specialized Content Script Properties
261(1)
Programmatic Injection
262(6)
Summary
268(1)
Chapter 10 Devtools Pages
269(32)
Introduction to Devtools Pages
270(12)
Creating a devtools Page
271(1)
Adding panels and sidebars
272(10)
The Devtools API
282(1)
Sniffing network traffic
283(6)
Inspecting the Page
289(7)
Content Scripts and Devtools Messaging
296(2)
Other Devtools API Features
298(1)
Summary
299(2)
Chapter 11 Extension and Browser APIs
301(44)
Global API Namespace
301(1)
Promises vs. Callbacks
302(1)
Error Handling
303(1)
Context-restricted APIs
303(1)
Events API
304(2)
Format
304(2)
Event Filtering
306(1)
WebExtensions API Quick Reference
306(9)
Permissions
307(1)
Messaging
308(5)
Storage
313(1)
Authentication
314(1)
Network Requests
315(29)
Internationalization
317(1)
Browser and System Control
318(6)
Page and Screen Capture
324(2)
Proxy
326(1)
Browser State Management
327(6)
Tabs and Windows
333(2)
Debugger
335(1)
Search
335(1)
Alarms
336(1)
Scripting
336(2)
DOM
338(1)
Text to Speech
338(1)
Privacy
338(1)
Idle
339(1)
Devtools
339(1)
Extension Introspection
340(1)
Extension Management
341(1)
System State
341(1)
Enterprise Only
342(1)
Firefox Only
342(1)
Chrome OS Only
343(1)
Deprecated
344(1)
Summary
344(1)
Chapter 12 Permissions
345(40)
Permissions Basics
345(3)
Checking Permissions
348(2)
Using Optional Permissions
350(3)
Granting Permissions Declaratively vs. Imperatively
351(1)
Permission Request Idempotence
352(1)
Host Permissions
353(1)
Permissions Lifetime
354(1)
Permissions Warnings
354(5)
Testing Permissions Warnings
356(3)
Considerations for Published Extensions
359(1)
Triggering the Slow Review Queue
359(1)
Auto-Disable Updates
360(1)
Permissions List
361(23)
ActiveTab
361(2)
Alarms
363(1)
Background
363(1)
Bookmarks
363(1)
BrowserSettings
364(1)
BrowsingData
364(1)
CaptivePortal
364(1)
CertificateProvider
364(1)
Clipboard Read
365(1)
Clipboard Write
365(1)
Content Settings
365(1)
Context Menus
366(1)
Contextual Identities
366(1)
Cookies
366(1)
Debugger
366(1)
DeclarativeContent
367(1)
Declarative Net Request
367(1)
Declarative Net Request Feed back
367(1)
Declarative Web Request
367(1)
DesktopCapture
368(1)
Devtools page
368(1)
Dns
368(1)
Document Scan
368(1)
Downloads
369(1)
Downloads.open
369(1)
Enterprise.deviceAttributes
369(1)
Enterprise.hardwarePlatform
369(1)
Enterprise.networkingAttributes
370(1)
Enterprise.platformKeys
370(1)
Experimental
370(1)
FileBrowserHandler
370(1)
File System Provider
370(1)
Find
371(1)
FontSettings
371(1)
Gem
371(1)
Geolocation
371(1)
History
372(1)
Host Permissions
372(2)
Identity
374(1)
Idle
374(1)
LoginState
374(1)
Management
374(1)
Menus
375(1)
Menus.overrideContext
375(1)
Native Messaging
375(1)
Notifications
376(1)
PageCapture
376(1)
Pkcs11
376(1)
Platform Keys
377(1)
Power
377(1)
Printer Provider
377(1)
Printing
377(1)
Printing Metrics
378(1)
Privacy
378(1)
Processes
378(1)
Proxy
378(1)
Scripting
379(1)
Search
379(1)
Sessions
379(1)
SignedInDevices
379(1)
Storage
379(1)
System.cpu
380(1)
System.display
380(1)
System.memory
380(1)
System.storage
380(1)
TabCapture
380(1)
Tab Groups
381(1)
Tab Hide
381(1)
Tabs
381(1)
Theme
382(1)
Top Sites
382(1)
Tts
382(1)
TtsEngine
382(1)
UnlimitedStorage
383(1)
Npn Provider
383(1)
Wallpaper
383(1)
Web Navigation
383(1)
Web Request
384(1)
Webrequestblocking
384(1)
Summary
384(1)
Chapter 13 Networking
385(44)
Comparing Websites and Extensions
385(2)
Networking Architecture
387(2)
Options Pages
387(1)
Popup and Devtools Pages
387(1)
Content Scripts
388(1)
Background Scripts
389(1)
Pinning an Extension ID
389(3)
Authentication Styles
392(3)
No Authentication
392(1)
Content Script Spoofing
393(1)
Cookie Authentication
393(1)
Json Web Token Authentication
394(1)
OAuth and OpenID
394(1)
OAuth, OpenID, and the Identity API
395(8)
OAuth API Methods
396(1)
OAuth Redirect URLs
396(1)
Configuring the Authorization Platform
397(6)
Additional Help
403(1)
OAuth and OpenID Examples
403(9)
Google OAuth with getAuthToken()
404(2)
Google OpenID with launchWebAuthFlow()
406(3)
Manual Github OAuth with launchWebAuthFlow()
409(3)
Networking APIs
412(15)
The web Navigation API
413(3)
The webRequest API
416(4)
The declarative Net Request API
420(7)
Summary
427(2)
Chapter 14 Extension Development and Deployment
429(30)
Local Development
429(13)
Inspecting Your Extension
430(8)
File Changes
438(1)
Error Monitoring
439(2)
Extension Reloads
441(1)
Automated Extension Tests
442(9)
Unit Tests
443(6)
Integration Tests
449(1)
Additional Reading
450(1)
Publishing Extensions
451(1)
Store Listing
451(1)
Privacy Practices
452(1)
Review Process
452(1)
Updating Extensions
452(2)
Update Considerations
452(1)
Cancelling Updates
453(1)
Automated Update Publishing
454(1)
Tracking User Activity
454(4)
Dashboard Metrics
455(1)
Analytics Libraries
455(1)
Setting Up Google Analytics
456(1)
Install and Uninstall Events
457(1)
Summary
458(1)
Chapter 15 Cross-Browser Extensions
459(50)
Introduction to Cross-Browser Support
459(1)
Browser Coverage Tradeoffs
460(2)
Browser Share
460(1)
Chromium Browser Extension Sharing
461(1)
Adapting Your Codebase
462(2)
API Probing
462(1)
Differential Manifests
463(1)
Manifest v2/v3
463(1)
Extension Marketplaces
464(6)
Marketplace Similarities
464(1)
Marketplace Differences
465(1)
Chrome Web Store
465(1)
Add-ons for Firefox
466(1)
Microsoft Edge Add-ons
467(1)
Safari Extensions App Store
468(1)
Opera Addons
469(1)
Mobile Extensions
470(6)
Mobile Extension User Interfaces
470(1)
Kiwi Browser
471(1)
Firefox Mobile
472(2)
iOS Safari
474(2)
Automated Deployment
476(1)
WebExtensions API Support
477(1)
Safari Extension Development
478(27)
Prerequisites
478(1)
Architecture
479(1)
Creating an Extension Project
479(3)
Writing the App
482(6)
Testing on macOS
488(6)
Testing on iOS
494(8)
Deploying to the App Store
502(2)
Converting an Existing Extension
504(1)
Firefox Idiosyncrasies
505(3)
Manifest Versions
505(1)
Sidebars
506(1)
API Additions
507(1)
Summary
508(1)
Chapter 16 Tooling and Frameworks
509(24)
Building Extensions with React
509(8)
Single Entrypoint React Extensions
510(3)
Multiple Entrypoint React Extensions
513(1)
Reactive State Management
514(1)
Routing
515(2)
Mozilla Tools
517(1)
Web-ext
517(1)
Webextension-polyfill
518(1)
Bundlers and CLI Tools
518(3)
Parcel
519(1)
Webpack
520(1)
Plasmo
521(10)
High-level Overview
522(1)
JavaScript Frameworks
523(1)
Documentation and Examples
523(1)
Differential Build Outputs
524(1)
Automatic Manifest Generation
524(1)
Icon Generation
525(1)
Bundling Remote Code
526(1)
Environment Variables
526(1)
Content Script Mounting
527(2)
Extension-friendly Hot Module Replacement
529(1)
Automated Deployment with Browser Platform Publish
530(1)
Useful Sites
531(1)
Summary
532(1)
Index 533
Matt Frisbie has worked in web development for over a decade. During that time, he's been a startup co-founder, an engineer at a Big Four tech company, and the first engineer at a Y Combinator startup that would eventually become a billion-dollar company. As a Google software engineer, Matt worked on both the AdSense and Accelerated Mobile Pages (AMP) platforms; his code contributions run on most of the planet's web browsing devices. Prior to this, Matt was the first engineer at DoorDash, where he helped lay the foundation for a company that has become the leader in online food delivery. Matt has written three books, "Professional JavaScript for Web Developers", "Angular 2 Cookbook", and "AngularJS Web Application Development Cookbook", and recorded two video series, "Introduction to Modern Client-Side Programming" and "Learning AngularJS". He speaks at frontend meetups and webcasts, and is a level 1 sommelier. He majored in Computer Engineering at the University of Illinois Urbana-Champaign. Matt's Twitter handle is @mattfriz.