SlideShare a Scribd company logo
1 of 31
Oleksandr Zinevych
Software Engineer at Datamart inc.
Chrome Extensions
▪ What is Chrome Extensions
▪ Common Architecture
▪ How all parts connects together
▪ Chrome Javascript API’s
▪ Known issues, and possible workarounds
Agenda
What is chrome extension?
Extensions are small software
programs that can modify and
enhance the functionality of the
Chrome browser.
Chrome
Extension
(.crx)
CSS
JS
HTM
L
General structure of chrome extension
Example of manifest.json
Background/Event pages
Background page, an invisible page that holds the main logic of the extension
Content scripts
Content scripts are JS files that run in the context of
web pages.
▪ Use limited chrome.* APIs
▪ Cannot use variables or functions
defined by their extension's
pages
▪ Cannot use variables or functions
defined by web pages or by other
content scripts
▪ Eval and related functions are disabled
▪ Inline JavaScript will not be executed
▪ Only local script and and object resources are loaded
Content Security Policy (CSP)
Chrome Javascript API’s
Chrome
API’s
Notifications
Tabs
History Downloads
GCM
…
Basic communication
Google Chrome browser
Background
Page
Tab
Content Script ?
Message Passing
Simple one-time requests
Message Passing
Long-lived
connections
Content Scripts - Sandbox
Content Scripts
Web Page
DOM
JS
In manifest.json is an array of strings specifying the paths of packaged
resources that are expected to be usable in the context of a web page.
web_accessible_recourses
Chrome extension architecture
Browser
Background
Page
Tab
Web Page
Content Script
Web accessible
resources
DOM
Access to current web page scope
Content
Scripts
Web
Accessible
Recourses
Web Page
Content
Scripts
web_accessible_recourses
Chrome extension architecture
Browser
Background
Page
Tab
Web Page
Content Script
Web accessible
resources
Javascript
DOM
Tips and tricks
This function becomes invalid when the event listener returns,
unless you return true from the event listener to indicate you
wish to send a response asynchronously (this will keep the
message channel open to the other end until sendResponse is
called).
Keep the message channel open
Pre-render
Google Chrome browser
Some text typed
Item 1
Item 2
Item 3
Item 4
….
Item 8
Hidden Tab
When typing into the address bar, browser try to predict which links could be selected
from the proposed list, and pre-render them into the hidden tab. It will replace the
current tab, in case the appropriate list item will be clicked.
Hidden Tab Hidden Tab
Hidden Tab
Address Bar:
For performance reasons Chrome can spawn a separate,
invisible tab, and swap an existing tab with this pre-rendered
tab.
Tab Id – not a constant
Tab navigation delay
Background page
Tab
Content Scripts
1.
2.
3.
1. Send message, Content script made some activity which cause
navigation, send response.
2. Check if page load is complete or in progress, send response.
3. Send message to Content Scripts. Here navigation started and request
is broken.
Access clipboard data
Background Page
The history and webNavigation API’s uses a transition type to
describe how the browser navigated to a particular URL. In
addition, several transition qualifiers can be returned that
further define the navigation.
Transition types and qualifiers
TransitionType: "link", "typed“, "auto_bookmark", "auto_subframe",
"manual_subframe", "generated",
"auto_toplevel", "form_submit","reload", "keyword",
or "keyword_generated"
TransitionQualifiers:
"client_redirect", "server_redirect", "forward_back",
or "from_address_bar"
History of specific tab is unavailable.
▪ search - Searches the history for the last visit time of each page matching the
query
▪ getVisits - Retrieves information about visits to a URL
▪ addUrl - Adds a URL to the history at the current time with a transition type of
"link"
▪ deleteUrl - Removes all occurrences of the given URL
▪ deleteRange - Removes all items within the specified date range from the history
▪ deleteAll - Deletes all items from the history
History API
Highlighting – the only one available way of tab visual editing.
Both makes the tab active, and immediately switch to it.
Tab visual appearance
In chrome.windows API, during creation or updating some
window, window State property can be one of the following
options:
▪ fullscreen in Mac OS – move window to the separate desktop.
▪ maximize in Mac OS – change window height to the whole
available height on screen.
Resizing
NPAPI Plugins(Deprecated)
You can bundle an NPAPI plugin with your extension, allowing you to call into native
binary code from JavaScript.
NaCL and PNaCl
▪ Native Client is a sandbox for running compiled C and C++ code in the
browser efficiently and securely, independent of the user’s operating
system
▪ Portable Native Client extends that technology with architecture
independence, letting developers compile their code once to run in any
website and on any architecture
Pros:
▪ Easy and fast develop
▪ Good for small functionality
Cons:
▪ Scopes, Scopes, Scopes!!!!
▪ Limited and asynchronous API’s
▪ Security limitations
Conclusion
Thanks!

More Related Content

What's hot

Html, CSS & Web Designing
Html, CSS & Web DesigningHtml, CSS & Web Designing
Html, CSS & Web DesigningLeslie Steele
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheetMichael Jhon
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS Dave Kelly
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3Doris Chen
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginnersSingsys Pte Ltd
 
JavaScript - Chapter 3 - Introduction
 JavaScript - Chapter 3 - Introduction JavaScript - Chapter 3 - Introduction
JavaScript - Chapter 3 - IntroductionWebStackAcademy
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation Salman Memon
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)Webtech Learning
 
Building Chrome Extensions
Building Chrome ExtensionsBuilding Chrome Extensions
Building Chrome ExtensionsRon Reiter
 
Introduction to JavaScript (1).ppt
Introduction to JavaScript (1).pptIntroduction to JavaScript (1).ppt
Introduction to JavaScript (1).pptMuhammadRehan856177
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Chris Poteet
 
Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Devang Garach
 

What's hot (20)

Html, CSS & Web Designing
Html, CSS & Web DesigningHtml, CSS & Web Designing
Html, CSS & Web Designing
 
Html training slide
Html training slideHtml training slide
Html training slide
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
JavaScript - Chapter 3 - Introduction
 JavaScript - Chapter 3 - Introduction JavaScript - Chapter 3 - Introduction
JavaScript - Chapter 3 - Introduction
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
 
Xml
XmlXml
Xml
 
Building Chrome Extensions
Building Chrome ExtensionsBuilding Chrome Extensions
Building Chrome Extensions
 
Java script
Java scriptJava script
Java script
 
Introduction to JavaScript (1).ppt
Introduction to JavaScript (1).pptIntroduction to JavaScript (1).ppt
Introduction to JavaScript (1).ppt
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3
 
CSS Selectors
CSS SelectorsCSS Selectors
CSS Selectors
 

Viewers also liked

Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & ExtensionsVarun Raj
 
Internals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScriptInternals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScriptfpatton
 
Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappFred Lin
 
Debugging webOS applications
Debugging webOS applicationsDebugging webOS applications
Debugging webOS applicationsfpatton
 
Web components, so close!
Web components, so close!Web components, so close!
Web components, so close!Aleks Zinevych
 
A Complete Guide To Chrome Extension Development
A Complete Guide  To Chrome Extension  DevelopmentA Complete Guide  To Chrome Extension  Development
A Complete Guide To Chrome Extension DevelopmentSteven James
 
Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaMarakana Inc.
 
Browser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google ChromeBrowser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google ChromeKenneth Auchenberg
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Kazuhiro Ogura
 
Architecture of a Modern Web App - SpringOne India
Architecture of a Modern Web App - SpringOne IndiaArchitecture of a Modern Web App - SpringOne India
Architecture of a Modern Web App - SpringOne IndiaJeremy Grelle
 
Watson - a supercomputer
Watson - a supercomputerWatson - a supercomputer
Watson - a supercomputerHarshil Darji
 
Introduction To Google Chrome Os
Introduction To Google Chrome OsIntroduction To Google Chrome Os
Introduction To Google Chrome OsSaurabh Jinturkar
 
Google Chrome Extensions
Google Chrome ExtensionsGoogle Chrome Extensions
Google Chrome ExtensionsSamantha Morra
 
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingModularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingWidhian Bramantya
 
Chrome extensions
Chrome extensions Chrome extensions
Chrome extensions Ahmad Tahhan
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOSfpatton
 
IBM Watson & Open Source Software - LinuxCon 2012
IBM Watson & Open Source Software - LinuxCon 2012IBM Watson & Open Source Software - LinuxCon 2012
IBM Watson & Open Source Software - LinuxCon 2012iportilla
 

Viewers also liked (20)

Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & Extensions
 
Internals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScriptInternals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScript
 
Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox Webapp
 
Debugging webOS applications
Debugging webOS applicationsDebugging webOS applications
Debugging webOS applications
 
Palm WebOS Overview
Palm WebOS OverviewPalm WebOS Overview
Palm WebOS Overview
 
What is a shell script
What is a shell scriptWhat is a shell script
What is a shell script
 
Web components, so close!
Web components, so close!Web components, so close!
Web components, so close!
 
A Complete Guide To Chrome Extension Development
A Complete Guide  To Chrome Extension  DevelopmentA Complete Guide  To Chrome Extension  Development
A Complete Guide To Chrome Extension Development
 
Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar Gargenta
 
Browser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google ChromeBrowser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google Chrome
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)
 
Architecture of a Modern Web App - SpringOne India
Architecture of a Modern Web App - SpringOne IndiaArchitecture of a Modern Web App - SpringOne India
Architecture of a Modern Web App - SpringOne India
 
Watson - a supercomputer
Watson - a supercomputerWatson - a supercomputer
Watson - a supercomputer
 
Introduction To Google Chrome Os
Introduction To Google Chrome OsIntroduction To Google Chrome Os
Introduction To Google Chrome Os
 
Google Chrome Extensions
Google Chrome ExtensionsGoogle Chrome Extensions
Google Chrome Extensions
 
Web o sppt
Web o spptWeb o sppt
Web o sppt
 
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingModularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented Programming
 
Chrome extensions
Chrome extensions Chrome extensions
Chrome extensions
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
IBM Watson & Open Source Software - LinuxCon 2012
IBM Watson & Open Source Software - LinuxCon 2012IBM Watson & Open Source Software - LinuxCon 2012
IBM Watson & Open Source Software - LinuxCon 2012
 

Similar to Chrome extensions

Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pagesNilesh Bafna
 
Chrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpointChrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpointf20190876
 
Making Chrome Extension with AngularJS
Making Chrome Extension with AngularJSMaking Chrome Extension with AngularJS
Making Chrome Extension with AngularJSBen Lau
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 
Tool it Up! - Session #2 - NetPanel
Tool it Up! - Session #2 - NetPanelTool it Up! - Session #2 - NetPanel
Tool it Up! - Session #2 - NetPaneltoolitup
 
Java Script - A New Look
Java Script - A New LookJava Script - A New Look
Java Script - A New Lookrumsan
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Startstaobao.com
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)Shrijan Tiwari
 
An overview on Developing Chrome Extensions
An overview on Developing Chrome ExtensionsAn overview on Developing Chrome Extensions
An overview on Developing Chrome ExtensionsAces Mndr
 
Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerSuresh Patidar
 
Navigating the critical rendering path - Jamie Alberico - VirtuaCon
Navigating the critical rendering path -  Jamie Alberico - VirtuaConNavigating the critical rendering path -  Jamie Alberico - VirtuaCon
Navigating the critical rendering path - Jamie Alberico - VirtuaConJamie Indigo
 

Similar to Chrome extensions (20)

Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Chrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpointChrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpoint
 
Making Chrome Extension with AngularJS
Making Chrome Extension with AngularJSMaking Chrome Extension with AngularJS
Making Chrome Extension with AngularJS
 
#Webperf Choreography
#Webperf Choreography#Webperf Choreography
#Webperf Choreography
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
06 Javascript
06 Javascript06 Javascript
06 Javascript
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Asp.net
Asp.netAsp.net
Asp.net
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Tool it Up! - Session #2 - NetPanel
Tool it Up! - Session #2 - NetPanelTool it Up! - Session #2 - NetPanel
Tool it Up! - Session #2 - NetPanel
 
introduction to web application development
introduction to web application developmentintroduction to web application development
introduction to web application development
 
Java Script - A New Look
Java Script - A New LookJava Script - A New Look
Java Script - A New Look
 
technology@web
technology@webtechnology@web
technology@web
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Starts
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)
 
An overview on Developing Chrome Extensions
An overview on Developing Chrome ExtensionsAn overview on Developing Chrome Extensions
An overview on Developing Chrome Extensions
 
What is HTML 5?
What is HTML 5?What is HTML 5?
What is HTML 5?
 
Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web worker
 
Performance (browser)
Performance (browser)Performance (browser)
Performance (browser)
 
Navigating the critical rendering path - Jamie Alberico - VirtuaCon
Navigating the critical rendering path -  Jamie Alberico - VirtuaConNavigating the critical rendering path -  Jamie Alberico - VirtuaCon
Navigating the critical rendering path - Jamie Alberico - VirtuaCon
 

Recently uploaded

WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfryanfarris8
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2WSO2
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2
 

Recently uploaded (20)

WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
 

Chrome extensions

  • 1. Oleksandr Zinevych Software Engineer at Datamart inc. Chrome Extensions
  • 2. ▪ What is Chrome Extensions ▪ Common Architecture ▪ How all parts connects together ▪ Chrome Javascript API’s ▪ Known issues, and possible workarounds Agenda
  • 3. What is chrome extension? Extensions are small software programs that can modify and enhance the functionality of the Chrome browser. Chrome Extension (.crx) CSS JS HTM L
  • 4. General structure of chrome extension
  • 6. Background/Event pages Background page, an invisible page that holds the main logic of the extension
  • 7. Content scripts Content scripts are JS files that run in the context of web pages. ▪ Use limited chrome.* APIs ▪ Cannot use variables or functions defined by their extension's pages ▪ Cannot use variables or functions defined by web pages or by other content scripts
  • 8. ▪ Eval and related functions are disabled ▪ Inline JavaScript will not be executed ▪ Only local script and and object resources are loaded Content Security Policy (CSP)
  • 10. Basic communication Google Chrome browser Background Page Tab Content Script ?
  • 13. Content Scripts - Sandbox Content Scripts Web Page DOM JS
  • 14. In manifest.json is an array of strings specifying the paths of packaged resources that are expected to be usable in the context of a web page. web_accessible_recourses
  • 15. Chrome extension architecture Browser Background Page Tab Web Page Content Script Web accessible resources DOM
  • 16. Access to current web page scope Content Scripts Web Accessible Recourses Web Page Content Scripts web_accessible_recourses
  • 17. Chrome extension architecture Browser Background Page Tab Web Page Content Script Web accessible resources Javascript DOM
  • 19. This function becomes invalid when the event listener returns, unless you return true from the event listener to indicate you wish to send a response asynchronously (this will keep the message channel open to the other end until sendResponse is called). Keep the message channel open
  • 20. Pre-render Google Chrome browser Some text typed Item 1 Item 2 Item 3 Item 4 …. Item 8 Hidden Tab When typing into the address bar, browser try to predict which links could be selected from the proposed list, and pre-render them into the hidden tab. It will replace the current tab, in case the appropriate list item will be clicked. Hidden Tab Hidden Tab Hidden Tab Address Bar:
  • 21. For performance reasons Chrome can spawn a separate, invisible tab, and swap an existing tab with this pre-rendered tab. Tab Id – not a constant
  • 22. Tab navigation delay Background page Tab Content Scripts 1. 2. 3. 1. Send message, Content script made some activity which cause navigation, send response. 2. Check if page load is complete or in progress, send response. 3. Send message to Content Scripts. Here navigation started and request is broken.
  • 24. The history and webNavigation API’s uses a transition type to describe how the browser navigated to a particular URL. In addition, several transition qualifiers can be returned that further define the navigation. Transition types and qualifiers TransitionType: "link", "typed“, "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit","reload", "keyword", or "keyword_generated" TransitionQualifiers: "client_redirect", "server_redirect", "forward_back", or "from_address_bar"
  • 25. History of specific tab is unavailable. ▪ search - Searches the history for the last visit time of each page matching the query ▪ getVisits - Retrieves information about visits to a URL ▪ addUrl - Adds a URL to the history at the current time with a transition type of "link" ▪ deleteUrl - Removes all occurrences of the given URL ▪ deleteRange - Removes all items within the specified date range from the history ▪ deleteAll - Deletes all items from the history History API
  • 26. Highlighting – the only one available way of tab visual editing. Both makes the tab active, and immediately switch to it. Tab visual appearance
  • 27. In chrome.windows API, during creation or updating some window, window State property can be one of the following options: ▪ fullscreen in Mac OS – move window to the separate desktop. ▪ maximize in Mac OS – change window height to the whole available height on screen. Resizing
  • 28. NPAPI Plugins(Deprecated) You can bundle an NPAPI plugin with your extension, allowing you to call into native binary code from JavaScript.
  • 29. NaCL and PNaCl ▪ Native Client is a sandbox for running compiled C and C++ code in the browser efficiently and securely, independent of the user’s operating system ▪ Portable Native Client extends that technology with architecture independence, letting developers compile their code once to run in any website and on any architecture
  • 30. Pros: ▪ Easy and fast develop ▪ Good for small functionality Cons: ▪ Scopes, Scopes, Scopes!!!! ▪ Limited and asynchronous API’s ▪ Security limitations Conclusion