• Stars
    star
    253
  • Rank 155,888 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Machine-readable references of terms defined in web browser specifications

Webref

Description

This repository contains machine-readable references of CSS properties, definitions, IDL, and other useful terms that can be automatically extracted from web browser specifications. The contents of the repository are updated automatically every 6 hours (although note information about published /TR/ versions of specifications are updated only once per day).

Specifications covered by this repository are technical Web specifications that appear in browser-specs.

The main branch of this repository contains automatically-generated raw extracts from web browser specifications. These extracts come with no guarantee on validity or consistency. For instance, if a specification defines invalid IDL snippets or uses an unknown IDL type, the corresponding IDL extract in this repository will be invalid as well.

The curated branch contains curated extracts. Curated extracts are generated from raw extracts in the ed folder by applying manually-maintained patches to fix invalid content and provide validity and consistency guarantees. The curated branch is updated automatically whenever the main branch is updated, unless patches need to be modified (which requires manual intervention). Curated extracts are published under https://w3c.github.io/webref/ed/.

Additionally, subsets of the curated content get manually reviewed and published as NPM packages on a weekly basis:

Important: The curated extracts only contain data for specifications that are in good standing (to keep the number of manually-maintained patches minimal and manageable). The NPM packages only contain curated extracts of specifications that are in good standing and that target web browsers.

Important: Unless you are ready to deal with invalid content, we strongly recommend that you process contents of the curated branch or NPM packages instead of raw content in the main branch.

Available extracts

This repository contains raw and curated information about nightly versions of Web specifications in the ed folder, as well as raw information about the released version (for /TR/ specifications) in the tr folder.

Note: The tr folder only contains information about released specifications. Specifications that have not been published as /TR/ documents (such as WHATWG specifications or Community Group reports) do not appear under the tr folder in particular.

More often than not, released versions of specifications are much older than their nightly version. Data in the tr folder is more invalid/inconsistent than data in the ed folder as a result. Additionally, no attempt is being made at curating data in the tr folder, use the tr folder at your own risk!

The following subfolders in the curated branch contain individual machine-readable JSON or text files generated from specifications:

  • ed/css: CSS terms (properties, descriptors, value spaces). One file per specification series.
  • ed/dfns: <dfn> terms, along with metadata such as linking text, access level, namespace. One file per specification.
  • ed/elements: Markup elements defined, along with the interface that they implement. One file per specification.
  • ed/headings: Section headings. One file per specification.
  • ed/idl: Raw WebIDL index. One file per specification series.
  • ed/idlnames: WebIDL definitions per referenceable IDL name. One file per IDL name.
  • ed/idlnamesparsed: Parsed WebIDL structure of definitions in the idlnames folder. One file per IDL name.
  • ed/idlparsed: Parsed WebIDL structure of definitions in the idl folder. One file per specification.
  • ed/ids: Fragments defined in the specification. One file per specification.
  • ed/links: Links to other documents, along with targeted fragments. One file per specification.
  • ed/refs: Normative and informative references to other specifications. One file per specification.

Individual files are named after the shortname of the specification, or after the shortname of the specification series for CSS definitions and raw IDL files. Individual files are only created when needed, meaning when the specification actually includes relevant terms.

The ed/index.json file contains the index of specifications that have been crawled, and relative links to individual files that have been created.

This repository uses Reffy, a Web spec exploration tool, to crawl the specifications and generate the data. In particular, the data it contains is the result of running Reffy. The repository does not contain any more data.

Raw WebIDL extracts are used in web-platform-tests, please see their interfaces/README.md for details.

Curation guarantees

Data curation brings the following guarantees.

Web IDL extracts

  • All IDL files can be parsed by the version of webidl2.js referenced in package.json.
  • WebIDL2.validate passes with the exception of the "no-nointerfaceobject" rule about [LegacyNoInterfaceObject], which is in wide use.
  • All types are defined by some specification.
  • All extended attributes are defined by some specification.
  • No duplicate top-level definitions or members.
  • No missing or mismatched types in inheritance chains.
  • No conflicts when applying mixins and partials.

CSS extracts

  • All values in CSS files can be parsed by the version of CSSTree used in peerDependencies in package.json.
  • No duplicate definitions of CSS properties provided that CSS extracts of delta specs are not taken into account (such extracts end with -n.json, where n is a level number).
  • CSS extracts contain a base definition of all CSS properties that get extended by other CSS property definitions (those for which newValues is set).

Elements extracts

  • All Web IDL interfaces referenced by elements exist in Web IDL extracts.

Events extracts

  • All events have a type attribute that match the name of the event
  • All events have a interface attribute to describe the interface used by the Event. The Web IDL interface exists in the latest version of the @webref/idl package at the time the @webref/events package is released, and represents an actual interface (i.e. not a mixin).
  • All events have a targets attribute with a non-empty list of target interfaces on which the event may fire. All Web IDL interfaces in the list exist in the latest version of the @webref/idl package at the time the @webref/events package is released, and represent an actual interface (i.e. not a mixin).
  • The bubbles attribute is always set to a boolean value for target interfaces that belong to a bubbling tree (DOM, IndexedDB, Serial API, Web Bluetooth).
  • The bubbles attribute is only set for target interfaces that belong to a bubbling tree.
  • The bubblingPath attribute is only set for target interfaces on which the event bubbles.
  • The targets attribute contains the top most interfaces in an inheritance chain, unless bubbling conditions differ. For instance, the list may contain { "target": "Element", "bubbles": true } but not also { "target": "HTMLElement", "bubbles": true } since HTMLElement inherits from Element.
  • For target interfaces that belong to a bubbling tree, the targets attribute only contains the deepest interface in the bubbling tree on which the event may fire and bubble. For instance, the list may contain { "target": "HTMLElement", "bubbles": true }, but not also { "target": "Document" } since event would de facto fire at Document through bubbling.

Potential spec anomalies

This repository used to contain analyses of potential spec anomalies, such as missing references and invalid Web IDL definitions. These analyses are now published in the companion w3c/webref-analysis repository.

How to suggest changes or report an error

Feel free to raise issues in this repository as needed. Note that most issues likely more directly apply to underlying tools:

  • Errors in the data are most likely caused by bugs or missing features in Reffy, which is the tool that crawls and parses specifications under the hoods. If you spot an error, please report it in Reffy's issue tracker.
  • If you believe that a spec is missing from the list, please check browser-specs and report it there.

Development notes

GitHub Actions workflows are used to automate most of the tasks in this repo.

Data update

  • Update ED report - crawls the nightly version of specifications and updates the contents of the ed folder. Workflow runs every 6 hours. Specifications that have not been modified since last crawl are skipped, unless the version of Reffy changed in the meantime. A typical crawl takes a few minutes to complete. A full crawl takes up to 12mn.
  • Update TR report - crawls the released version of specifications and updates the contents of the tr folder. Workflow runs once per day. A typical crawl takes a few minutes to complete. A full crawl takes up to 8mn.
  • Curate data & Prepare package PRs - runs whenever crawled data gets updated and updates the curated branch accordingly (provided all tests pass). The job also creates pull requests to release new versions of NPM packages when needed. Each pull request details the diff that would be released, and bumps the package version in the relevant packages/xxx/package.json file.
  • Clean up abandoned files - checks the contents of repository to detect orphan crawl files that are no longer targeted by the latest crawl's result and creates a PR to delete these files from the repository. Runs once per week on Wednesday. The crawl workflows does not delete these files automatically because crawl sometimes fails on a spec due to transient network or spec errors.
  • Test - runs tests on pull requests.
  • Clean patches when issues/PR are closed - drops patches that no longer need to apply because underlying issues got fixed. Runs once per week.

Releases to NPM

  • Publish @webref/xx package if needed - publishes a new version of the @webref/css, @webref/elements, @webref/events or @webref/idl package to NPM, tags the corresponding commits on the main and curated branches, and updates the relevant @webref/xxx@latest tag to point to the right commit on the curated branch. Runs whenever a pre-release PR is merged. Note that the released version is the version that appeared in packages/css/package.json, packages/elements/package.json, packages/events/package.json or packages/idl/package.json before the pre-release PR is merged.
  • @webref/xx release: Request review of pre-release PR - assigns reviewers to NPM package pull requests. Runs once per week.

More Repositories

1

csswg-drafts

CSS Working Group Editor Drafts
Bikeshed
4,283
star
2

IntersectionObserver

Intersection Observer
Bikeshed
3,623
star
3

ServiceWorker

Service Workers
HTML
3,622
star
4

html

Deliverables of the HTML Working Group until October 2018
HTML
1,943
star
5

css-houdini-drafts

Mirror of https://hg.css-houdini.org/drafts
Bikeshed
1,836
star
6

epubcheck

The conformance checker for EPUB publications
Java
1,466
star
7

aria-practices

WAI-ARIA Authoring Practices Guide (APG)
HTML
1,075
star
8

webauthn

Web Authentication: An API for accessing Public Key Credentials
HTML
1,012
star
9

webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
HTML
915
star
10

wcag

Web Content Accessibility Guidelines
HTML
906
star
11

webappsec-change-password-url

A Well-Known URL for Changing Passwords
Bikeshed
892
star
12

webtransport

WebTransport is a web API for flexible data transport
Bikeshed
787
star
13

clreq

Requirements for Chinese Text Layout
HTML
700
star
14

respec

A tool for creating technical documents and web standards
JavaScript
699
star
15

svgwg

SVG Working Group specifications
HTML
656
star
16

webdriver

Remote control interface that enables introspection and control of user agents.
HTML
652
star
17

manifest

Manifest for web apps
HTML
648
star
18

webappsec

Web Application Security Working Group repo
HTML
590
star
19

aria

Accessible Rich Internet Applications (WAI-ARIA)
HTML
582
star
20

trusted-types

A browser API to prevent DOM-Based Cross Site Scripting in modern web applications.
JavaScript
582
star
21

webextensions

Charter and administrivia for the WebExtensions Community Group (WECG)
Bikeshed
567
star
22

chinese-ig

Web中文兴趣组
HTML
534
star
23

payment-request

Payment Request API
HTML
480
star
24

musicxml

MusicXML specification
XSLT
471
star
25

trace-context

Trace Context
Python
434
star
26

webrtc-pc

WebRTC 1.0 API
HTML
423
star
27

web-performance

W3C Web Performance Working Group repo
HTML
395
star
28

webappsec-permissions-policy

A mechanism to selectively enable and disable browser features and APIs
Bikeshed
393
star
29

web-advertising

Web Advertising BG - https://www.w3.org/community/web-adv/
HTML
380
star
30

did-core

W3C Decentralized Identifier Specification v1.0
HTML
369
star
31

miniapp

MiniApps Standardization
JavaScript
359
star
32

web-share

Web API proposal for sharing data from a web page
HTML
353
star
33

Mobile-Checker

The Mobile Checker is a tool for Web developers who want to make their Web page or Web app work better on mobile devices.
JavaScript
320
star
34

webdriver-bidi

Bidirectional WebDriver protocol for browser automation
Bikeshed
309
star
35

picture-in-picture

Picture-in-Picture (PiP)
Bikeshed
307
star
36

web-nfc

Web NFC
HTML
303
star
37

websub

WebSub Spec in Social Web Working Group
HTML
284
star
38

wai-tutorials

W3C WAI’s Web Accessibility Tutorials
JavaScript
284
star
39

epub-specs

Shared workspace for EPUB 3 specifications.
HTML
274
star
40

activitystreams

Activity Streams 2.0
HTML
273
star
41

vc-data-model

W3C Verifiable Credentials Working Group — VC Data Model and Representations specification
HTML
269
star
42

webcrypto

The W3C Web Cryptography API
HTML
263
star
43

EasierRDF

Making RDF easy enough for most developers
Python
260
star
44

danmaku

Bullet Chatting Proposal
HTML
258
star
45

paint-timing

Paint Timing
Bikeshed
251
star
46

webpayments

The document repo for the Web Payments Working Group
HTML
250
star
47

media-source

Media Source Extensions
HTML
245
star
48

longtasks

Long Task API
Bikeshed
233
star
49

IndexedDB

Indexed Database API
Bikeshed
231
star
50

webidl2.js

WebIDL parser
JavaScript
224
star
51

web-of-things-framework

JavaScript
209
star
52

wot

Web of Things
HTML
208
star
53

smufl

Standard Music Font Layout
HTML
204
star
54

webappsec-csp

WebAppSec Content Security Policy
HTML
201
star
55

browser-specs

A machine-readable list of Web specifications
JavaScript
198
star
56

css-validator

W3C CSS Validation Service
Java
194
star
57

web-share-target

Web API proposal for receiving shared data
HTML
191
star
58

silver

Accessibility Guidelines "Silver"
HTML
190
star
59

web-roadmaps

Framework for Web technology roadmaps
HTML
189
star
60

webcomponents-cg

Web Components community group
HTML
183
star
61

editing

Specs and explainers maintained by the editing task force
HTML
181
star
62

w3c-api

The W3C API
HTML
178
star
63

html-aria

ARIA in HTML
HTML
172
star
64

encrypted-media

Encrypted Media Extensions
HTML
169
star
65

w3process

W3C Process Document
HTML
166
star
66

csvw

Documents produced by the CSV on the Web Working Group
HTML
160
star
67

p2p-webtransport

Interface to create and manage QUIC streams
HTML
156
star
68

strategy

team-strat, on GitHub, working in public. Current state: DRAFT
148
star
69

sdw

Repository for the Spatial Data on the Web Working Group
HTML
148
star
70

automotive

W3C Automotive Working Group Specifications
HTML
145
star
71

uievents

UI Events
HTML
144
star
72

clipboard-apis

Clipboard API and events
HTML
143
star
73

webvtt.js

WebVTT parser and validator
JavaScript
143
star
74

push-api

Push API
HTML
142
star
75

wcag21

Repository used during WCAG 2.1 development. New issues, Technique ideas, and comments should be filed at the WCAG repository at https://github.com/w3c/wcag.
HTML
140
star
76

web-annotation

Web Annotation Working Group repository, see README for links to specs
HTML
138
star
77

gamepad

Gamepad
HTML
138
star
78

mnx

Music Notation CG next-generation music markup proposal.
HTML
136
star
79

elements-of-html

Elements of HTML per version
HTML
135
star
80

w3c.github.io

The W3C organisation
HTML
134
star
81

webrtc-stats

WebRTC Statistics
HTML
128
star
82

libwww

Libwww is a highly modular, general-purpose client side Web API written in C for Unix and Windows (Win32). It's well suited for both small and large applications, like browser/editors, robots, batch tools, etc. Pluggable modules provided with libwww include complete HTTP/1.1 (with caching, pipelining, PUT, POST, Digest Authentication, deflate, etc), MySQL logging, FTP, HTML/4, XML (expat), RDF (SiRPAC), WebDAV, and much more. The purpose of libwww is to serve as a testbed for protocol experiments. This is a complete mirror of the libwww CVS repository
C
128
star
83

aria-at

Assistive Technology ARIA Experience Assessment
HTML
127
star
84

sensors

Generic Sensor API
HTML
126
star
85

web-locks

Cross-tab resource coordination API
Bikeshed
125
star
86

ortc

ORTC Community Group specification repository (see W3C WebRTC for official standards track)
HTML
124
star
87

dxwg

Data Catalog Vocabulary (DCAT)
HTML
124
star
88

wot-thing-description

Web of Things (WoT) Thing Description
HTML
122
star
89

webrtc-encoded-transform

WebRTC Encoded Transform
Bikeshed
121
star
90

mediasession

Media Session API
Bikeshed
120
star
91

Unicorn

Unicorn - W3C's Unified Validator
Java
118
star
92

mediacapture-main

Media Capture and Streams specification (aka getUserMedia)
HTML
118
star
93

sparql-dev

SPARQL dev Community Group
117
star
94

web-animations

🚫 Old repository for the Web Animations specification 🚫. Updated repository:
HTML
116
star
95

resource-timing

Resource Timing
HTML
116
star
96

csswg-test

The former CSS WG test repository
115
star
97

rdf-star

RDF-star specification
HTML
115
star
98

did-spec-registries

DID Spec Registry (Note)
HTML
114
star
99

performance-timeline

Performance Timeline
HTML
113
star
100

navigation-timing

Navigation Timing
HTML
113
star