SlideShare a Scribd company logo
Yevgeniy Valeyev
Front-end developer at Sytac
valeyev.pro
@yv_dev
Brief history of Web
Components
Agenda
Why do we need componentization?
Additional componentization techniques
Beginning
HTML Components
XBL
Web Components
Pros & Cons
Why do we need components?
Isolation for different parts of an application
Complexity reduction
Hides details of implementation
Reusability
Additional componentization techniques
● Isolation for styles
● Isolation for javascript
○ Module pattern
○ Workers
● Iframes
○ Security and risks
○ Iframe seamless [proposed]
Beginning. HTML Components by Microsoft
1998 - Microsoft proposed HTML Components which were supported in IE 5.5
You could write them in JScript (ECMA 262) or VBScript (Visual Basic Script)
Required Microsoft ActiveX Scripting interfaces
HTML Component (.htc)
XBL by Mozilla
2001 - Mozilla introduces XBL
2007 - Release of XBL 2
XBL was an addition to Mozilla’s XUL
And was supported by all products of Mozilla
XBL by Mozilla
XBL by Mozilla
Differences between XBL and HTC
VS.
XML HTML
Gecko Runtime Environment (GRE) ActiveX/ Internet Explorer
Multiple bindings One component per file
Success of first attempts
2007 - W3C released Candidate Recommendation of XBL 2
2011 - HTML Components officially deprecated in IE 10
2012 - Work on XBL 2 was abandoned. The specification was not implemented by
any other browser
Next attempt by Google
2013 - first mentioning of Web Components, version 0
Supported only in Chrome and Opera with enabled flag
Was based on ideas described in XBL
2016 - added official support of v1 in Chrome and Opera
2014 - added official support of v0 in Chrome and Opera
2015 - several meetings to discuss what goes to v1 and what to
further versions
Web Components
● Custom elements
○ `is` attribute // <button is=”my-custom-button”>Test</button>
● Shadow DOM
○ CSS Scoping // :host, :host-context, ::slotted
● Templates
● HTML Imports // <link rel="import" href="/imports/test.html">
Examples of Web Components
Let’s see some code . . .
Custom elements
Name has to contain a dash
Custom Elements
reactions
Shadow DOM Styling
&encapsulation
Templates (example)Can’t be ‘polyfilled’
Benefits of Shadow DOM
● Styles encapsulation
● It could be an alternative to iframe, but Shadow DOM is a part of your document
Benefits of Custom elements
● Logic encapsulation within HTML element
● Semantic markup
Why Template is good
● Content of a template is parsed but not executed until we inject it in a DOM
● We work directly with DOM
Why HTML imports are good
● Allows import of other HTML files / injecting Web Components
Cons of Web Components
Cross-browser support ?
Could cause styles duplication
Links
XUL & XBL consequences for
Mozilla
XBL component example
XBL on MDN
HTML Components example
HTC on W3C
HTC vs XBL, book p.206
Mentions of Web Components in the
past
Browsers support for v1 and v0
Custom elements v1 and v0
Templates example
Custom elements example
Styling example
Shadow DOM disadvantage
Yevgeniy Valeyev
valeyev.pro
@yv_dev

More Related Content

Viewers also liked

Miscellaneous emergencies and maneuvers jakub muransky
Miscellaneous  emergencies and maneuvers jakub muranskyMiscellaneous  emergencies and maneuvers jakub muransky
Miscellaneous emergencies and maneuvers jakub muransky
Jakub Muransky
 
22 liberalnye reformy-60-70e_g-nxpowerlite
22 liberalnye reformy-60-70e_g-nxpowerlite22 liberalnye reformy-60-70e_g-nxpowerlite
22 liberalnye reformy-60-70e_g-nxpowerlite
GalinaAlekseevna
 
CURRICULUM VITAE HD
CURRICULUM VITAE  HDCURRICULUM VITAE  HD
CURRICULUM VITAE HD
sam_blues
 
3 vneshnjaja politikaaleksandra-nxpowerlite
3 vneshnjaja politikaaleksandra-nxpowerlite3 vneshnjaja politikaaleksandra-nxpowerlite
3 vneshnjaja politikaaleksandra-nxpowerlite
GalinaAlekseevna
 
смотр песни и строя
смотр песни и строясмотр песни и строя
смотр песни и строя
lavrenteva
 
Survey for horror film media
Survey for horror film mediaSurvey for horror film media
Survey for horror film media
Kathy McEwan
 
2016 highlights-q4
2016 highlights-q42016 highlights-q4
2016 highlights-q4
arista2017rd
 
How to use present simple in a short stories
How to use present simple in a short storiesHow to use present simple in a short stories
How to use present simple in a short stories
Tariq Aziz
 
Защита детей от киберпреступлений
Защита детей от киберпреступленийЗащита детей от киберпреступлений
Защита детей от киберпреступлений
Олег Николаевич Сюрин
 
Powerpoint CV - R Niewold
Powerpoint CV - R NiewoldPowerpoint CV - R Niewold
Powerpoint CV - R NiewoldRikkert Niewold
 

Viewers also liked (11)

Miscellaneous emergencies and maneuvers jakub muransky
Miscellaneous  emergencies and maneuvers jakub muranskyMiscellaneous  emergencies and maneuvers jakub muransky
Miscellaneous emergencies and maneuvers jakub muransky
 
Scribe
ScribeScribe
Scribe
 
22 liberalnye reformy-60-70e_g-nxpowerlite
22 liberalnye reformy-60-70e_g-nxpowerlite22 liberalnye reformy-60-70e_g-nxpowerlite
22 liberalnye reformy-60-70e_g-nxpowerlite
 
CURRICULUM VITAE HD
CURRICULUM VITAE  HDCURRICULUM VITAE  HD
CURRICULUM VITAE HD
 
3 vneshnjaja politikaaleksandra-nxpowerlite
3 vneshnjaja politikaaleksandra-nxpowerlite3 vneshnjaja politikaaleksandra-nxpowerlite
3 vneshnjaja politikaaleksandra-nxpowerlite
 
смотр песни и строя
смотр песни и строясмотр песни и строя
смотр песни и строя
 
Survey for horror film media
Survey for horror film mediaSurvey for horror film media
Survey for horror film media
 
2016 highlights-q4
2016 highlights-q42016 highlights-q4
2016 highlights-q4
 
How to use present simple in a short stories
How to use present simple in a short storiesHow to use present simple in a short stories
How to use present simple in a short stories
 
Защита детей от киберпреступлений
Защита детей от киберпреступленийЗащита детей от киберпреступлений
Защита детей от киберпреступлений
 
Powerpoint CV - R Niewold
Powerpoint CV - R NiewoldPowerpoint CV - R Niewold
Powerpoint CV - R Niewold
 

Similar to Brief history of web components

Webcomponents TLV October 2014
Webcomponents TLV October 2014Webcomponents TLV October 2014
Webcomponents TLV October 2014
Dmitry Bakaleinik
 
Leveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in GutenbergLeveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in Gutenberg
Felix Arntz
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
sonumanoj
 
Polymer Web Framework - Swecha Boot Camp
Polymer Web Framework - Swecha Boot CampPolymer Web Framework - Swecha Boot Camp
Polymer Web Framework - Swecha Boot Camp
Swecha | స్వేచ్ఛ
 
JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!
_Dewy_
 
Introduction to lightning Web Component
Introduction to lightning Web ComponentIntroduction to lightning Web Component
Introduction to lightning Web Component
Mohith Shrivastava
 
Introduction to lightning web component
Introduction to lightning web component Introduction to lightning web component
Introduction to lightning web component
Sudipta Deb ☁
 
Webcomponents v2
Webcomponents v2Webcomponents v2
Webcomponents v2
Dmitry Bakaleinik
 
Web Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use CasesWeb Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use Cases
sumitamar
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5
Vinayak Tavargeri
 
Travelling light for the long haul
Travelling light for the long haulTravelling light for the long haul
Travelling light for the long haul
Ian Robinson
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
mfrancis
 
Lightning Web Component in Salesforce
Lightning Web Component in SalesforceLightning Web Component in Salesforce
Lightning Web Component in Salesforce
Jitendra Zaa
 
Web components, so close!
Web components, so close!Web components, so close!
Web components, so close!
Aleks Zinevych
 
HTML5 Comprehensive Guide
HTML5 Comprehensive GuideHTML5 Comprehensive Guide
HTML5 Comprehensive Guide
Alexei Skachykhin
 
Angular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERE
Nadav Mary
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
Paxcel Technologies
 
Web Components
Web ComponentsWeb Components
Web Components
FITC
 
Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...
Marios Fakiolas
 
HTML literals, the JSX of the platform
HTML literals, the JSX of the platformHTML literals, the JSX of the platform
HTML literals, the JSX of the platform
Kenneth Rohde Christiansen
 

Similar to Brief history of web components (20)

Webcomponents TLV October 2014
Webcomponents TLV October 2014Webcomponents TLV October 2014
Webcomponents TLV October 2014
 
Leveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in GutenbergLeveraging the Power of Custom Elements in Gutenberg
Leveraging the Power of Custom Elements in Gutenberg
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
 
Polymer Web Framework - Swecha Boot Camp
Polymer Web Framework - Swecha Boot CampPolymer Web Framework - Swecha Boot Camp
Polymer Web Framework - Swecha Boot Camp
 
JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!
 
Introduction to lightning Web Component
Introduction to lightning Web ComponentIntroduction to lightning Web Component
Introduction to lightning Web Component
 
Introduction to lightning web component
Introduction to lightning web component Introduction to lightning web component
Introduction to lightning web component
 
Webcomponents v2
Webcomponents v2Webcomponents v2
Webcomponents v2
 
Web Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use CasesWeb Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use Cases
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5
 
Travelling light for the long haul
Travelling light for the long haulTravelling light for the long haul
Travelling light for the long haul
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
 
Lightning Web Component in Salesforce
Lightning Web Component in SalesforceLightning Web Component in Salesforce
Lightning Web Component in Salesforce
 
Web components, so close!
Web components, so close!Web components, so close!
Web components, so close!
 
HTML5 Comprehensive Guide
HTML5 Comprehensive GuideHTML5 Comprehensive Guide
HTML5 Comprehensive Guide
 
Angular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERE
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
 
Web Components
Web ComponentsWeb Components
Web Components
 
Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...
 
HTML literals, the JSX of the platform
HTML literals, the JSX of the platformHTML literals, the JSX of the platform
HTML literals, the JSX of the platform
 

Recently uploaded

2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 

Recently uploaded (20)

2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 

Brief history of web components

  • 1. Yevgeniy Valeyev Front-end developer at Sytac valeyev.pro @yv_dev
  • 2. Brief history of Web Components
  • 3. Agenda Why do we need componentization? Additional componentization techniques Beginning HTML Components XBL Web Components Pros & Cons
  • 4. Why do we need components? Isolation for different parts of an application Complexity reduction Hides details of implementation Reusability
  • 5. Additional componentization techniques ● Isolation for styles ● Isolation for javascript ○ Module pattern ○ Workers ● Iframes ○ Security and risks ○ Iframe seamless [proposed]
  • 6. Beginning. HTML Components by Microsoft 1998 - Microsoft proposed HTML Components which were supported in IE 5.5 You could write them in JScript (ECMA 262) or VBScript (Visual Basic Script) Required Microsoft ActiveX Scripting interfaces
  • 8. XBL by Mozilla 2001 - Mozilla introduces XBL 2007 - Release of XBL 2 XBL was an addition to Mozilla’s XUL And was supported by all products of Mozilla
  • 11. Differences between XBL and HTC VS. XML HTML Gecko Runtime Environment (GRE) ActiveX/ Internet Explorer Multiple bindings One component per file
  • 12. Success of first attempts 2007 - W3C released Candidate Recommendation of XBL 2 2011 - HTML Components officially deprecated in IE 10 2012 - Work on XBL 2 was abandoned. The specification was not implemented by any other browser
  • 13. Next attempt by Google 2013 - first mentioning of Web Components, version 0 Supported only in Chrome and Opera with enabled flag Was based on ideas described in XBL 2016 - added official support of v1 in Chrome and Opera 2014 - added official support of v0 in Chrome and Opera 2015 - several meetings to discuss what goes to v1 and what to further versions
  • 14. Web Components ● Custom elements ○ `is` attribute // <button is=”my-custom-button”>Test</button> ● Shadow DOM ○ CSS Scoping // :host, :host-context, ::slotted ● Templates ● HTML Imports // <link rel="import" href="/imports/test.html">
  • 15. Examples of Web Components Let’s see some code . . .
  • 16. Custom elements Name has to contain a dash
  • 19. Templates (example)Can’t be ‘polyfilled’
  • 20. Benefits of Shadow DOM ● Styles encapsulation ● It could be an alternative to iframe, but Shadow DOM is a part of your document Benefits of Custom elements ● Logic encapsulation within HTML element ● Semantic markup
  • 21. Why Template is good ● Content of a template is parsed but not executed until we inject it in a DOM ● We work directly with DOM Why HTML imports are good ● Allows import of other HTML files / injecting Web Components
  • 22. Cons of Web Components Cross-browser support ? Could cause styles duplication
  • 23. Links XUL & XBL consequences for Mozilla XBL component example XBL on MDN HTML Components example HTC on W3C HTC vs XBL, book p.206 Mentions of Web Components in the past Browsers support for v1 and v0 Custom elements v1 and v0 Templates example Custom elements example Styling example Shadow DOM disadvantage

Editor's Notes

  1. Web Components is trending technology these days and of course it’s also very useful. It consists of set of technologies which are supported partially or fully in modern browsers. This technology provides you native ability for componentization, and creating, for instance some functional bricks/widgets which will be completely reusable, so you could create collections of reusable widgets. But the decision to create this technologie did not come out of nothing, long time ago , by the standards of the web of course , appeared a need to isolate different parts of the application, like isolating styles or javascript functionality . Isolation helps reduce complexity of the application and also allows to hide details of the implementation so this logic become more reusable. Real need for isolation appeared when become an era of single page application. So needed to isolate pieces of your application to reduce complexity of such an application.
  2. _ Js: workers no UI access _ Iframe: risk of xss; seamless can’t allow partial styles; iframes limits dev. With creating APIs;
  3. It used a declarative model for attaching events and APIs to a host element (with isolation in mind) and parsed components into a “viewlink” (a “Shadow DOM”)
  4. _ 1998 from IE5.5 till IE10; _ JScript (ECMA 262) or VBScript, or other third party which work with ActiveX ----------------------------------------- <PUBLIC:COMPONENT> <PUBLIC:PROPERTY NAME="testColor" /> <PUBLIC:ATTACH EVENT="onmouseover" ONEVENT="onOver()" /> <SCRIPT LANGUAGE="JScript"> function onOver() { // … do stuff } </SCRIPT> </PUBLIC:COMPONENT> --------------------------------------------- <body> <ul> <li testcolor=”red” style="behavior:url(test.htc)">Foo Foo Foo</li> </ul> </body>
  5. A declarative binding language with two binding flavors (similar to Microsoft’s HTML Components), XBL supported the additional features of host content model distribution and content generation.
  6. _ XBL (XML Binding Language) (2001) , XBL2 (2007), for XUL user-interface language _ March, 2007 _ Gecko layout engine is the only implementation _ abandoned by the W3C in 2012 #test-component { -moz-binding: url("my-component-binding.xml#my-component"); . . . }
  7. _ <children> accept children ) _ you can define multiple bindings per XML file <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml"> <binding id="my-component" applyauthorstyles="true"> <content> <html:span style="/* some CSS */"> <children/> </html:span> </content> <implementation> <constructor> ... </constructor> <method name=”doSomething”> <body> … </body> </method> <property name=”status” onset=”. . .” onget=”. . .” /> <implementation> </binding> </bindings>
  8. _ Mentionings of Web Components - https://www.w3.org/wiki/Webapps/Meetings#Web_Components _ v0 v1 - http://stackoverflow.com/questions/40323180/what-are-the-differences-between-custom-elements-v0-and-v1 _ can I use - http://caniuse.com/#search=web%20components _ http://www.2ality.com/2015/08/web-component-status.html
  9. _ let by Google, used XBL ideas of Mozilla but broken monolithic to blocks. v0-v1 _ custom elements - https://jsbin.com/cimepeh/edit?html,js,output _ templates - https://jsbin.com/visuqo/edit?html,output , doesn’t load source in template (better than script because DOM, better then hidden element because don’t load early) _ shadow dom - https://jsbin.com/yaxegon/edit?html,js,console,output ; element can be registered only once; _ styling - https://jsbin.com/feliyej/edit?html,css,js,output WC XSS ????
  10. _ shadow dom - https://jsbin.com/yaxegon/edit?html,js,console,output ; element can be registered only once; _ styling - https://jsbin.com/feliyej/edit?html,css,js,output
  11. _ XBL on Wikipedia _ video 2015 - are we there?