1 of 38

Demystifying Web Standards

Dominic Farolino // @domfarolino // dom@chromium.org

2 of 38

About me

  • Rising senior @ University of Cincinnati
  • Ex-Microsoft intern
  • Ex-Mozilla intern
  • Chromium committer
  • WHATWG member / editor
  • @ me bro: @domfarolino

3 of 38

What is this talk?

4 of 38

3 Goals

  1. Background & history
  2. Quick-and-dirty intro to technical bits of standards
  3. Motivation/guidance to contribute

5 of 38

What is this talk?

Source: https://londonist.com/london/experience-new-orleans-without-leaving-london-at-this-cocktail-village

6 of 38

Summary

  • What is a standard?
  • Where do web APIs come from?
  • Brief history
  • Tools used in Web Standards
  • How I got started in this community
  • How/where to get involved

7 of 38

What is a standard?

8 of 38

Depends on the context

9 of 38

Reasonable definitions

  • “an idea or thing used as a measure, norm, or model in comparative evaluations”
  • “a form of language that is widely accepted as the usual form”

Our purposes:

  • “A canonical document meant to specify the observable effects of�technology with multiple independent implementations”

10 of 38

Tech with multiple independent implementations

*NIX OS’s

Web Tech

Tons more!!

HTTP

JavaScript

Web Plat APIs

11 of 38

Where do Web APIs come from?

12 of 38

const logicalAnswer = “JavaScript”

13 of 38

APIs exposed

APIs exist as native functions/constructors

14 of 38

What is JavaScript?

Just a language

  • History!
  • Standardized by ECMA (by Netscape)
  • Multiple implementation exist

15 of 38

16 of 38

ECMAScript

  • Needed to be a general standard
  • Goal was to have multiple implementations of the same open lang
  • Thus, only a language; separation of concerns
    • Should only define semantics, constructs, primitives
    • Language shouldn’t know environmental context (DOM support, fetch() etc)

17 of 38

Web API Origins

  • Web APIs are not part of the “language”
  • Effectively “mixins”, baked into UAs (like browsers)
  • Browsers can “support” implementations of DOM, and other APIs

18 of 38

Web Standards Bodies

...more history

19 of 38

WHATWG

  • Web Hypertext Application Technology Working Group
  • Formed after W3C workshop, 2004
  • Canonical “Living Standards”:
    • HTML
    • DOM (document.querySelector, mutationObserver)
    • Fetch
    • Streams

20 of 38

But, APIs are “native” code?

21 of 38

Anatomy of a Web Standard

22 of 38

23 of 38

Fetch Standard

  • Concepts:
    • Request, Response, Headers, various algorithms
  • APIs:
    • fetch()
    • Request
    • Response
    • Headers

24 of 38

Fetch Standard

25 of 38

Fetch Standard: Request Class

26 of 38

Web IDL

27 of 38

Web IDL Responsibilities

  • Act as an abstraction over ES language
  • Can let standards editors write less to create more
  • Takes care of things like:
    • Type conversion
    • Property initialization
    • Construction, etc.
  • https://heycam.github.io/webidl/

28 of 38

How I got involved

29 of 38

30 of 38

31 of 38

32 of 38

33 of 38

34 of 38

Contributions

  • Standardized and implemented console APIs
  • Minor Request() fixes in Chromium
  • Changing how fetch() behaves
    • Fetch used to never send credentials (think cookies)
    • Now does on same-origin requests
  • Standardized `referrerpolicy` attribute on <script> elements
    • Implemented in Chromium
  • Overall point: It’s fun to contribute back to the platform!

35 of 38

Use your voice!

  • Web devs = unique position
  • “Decentralized” platform
    • Not controlled by anyone
    • Therefore controlled by everyone

36 of 38

37 of 38

38 of 38

~Fin~

@domfarolino // dom@chromium.org