Skip to content

jcbhmr/WebIDL-Go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You're probably looking for jcbhmr.me/WebIDL-Go

Development

Bikeshed HTML5

The document's structure is intended to mimic the JavaScript binding section of the Web IDL standard and take inspiration from the Java binding for Web IDL.

Some other prior art resources from how other ecosystems have started adopting Web IDL (or Web API bindings) into their own language idioms are the web-sys crate from the Rust ecosystem and TODO.

  • Names
  • any
  • undefined
  • boolean
  • Integer types
  • Unrestricted float & double
  • Restricted float & double
  • bigint
  • DOMString
  • ByteString
  • USVString
  • object
  • symbol
  • Interface types
  • Callback interface types
  • Dictionary types
  • Enumeration types
  • Callback function types
  • Nullable types
  • Sequences
  • Records
  • Promise types
  • Union types
  • Buffer source types
  • Frozen arrays
  • Observable arrays
  • Extended attributes
  • Legacy extended attributes
  • Overloads
  • Interface object
  • Legacy factory functions
  • Named properties object
  • Constants
  • Attributes
  • Operations
  • Stringifiers
  • Iterable declarations
  • Asynchronous iterable declarations
  • Maplike declarations
  • Setlike declarations
  • Namespaces
  • Exceptions

You'll need to have Bikeshed installed to build the spec. You can quickly install Bikeshed using pipx:

pipx install bikeshed

Once you have Bikeshed installed you can use bikeshed serve to start a local dev server.

bikeshed serve

Currently the dev server does not live reload on changes. speced/bikeshed#1674

Here's a quick rundown of Bikeshed markup:

  • You can use basic Markdown syntax in most places. If you can't then just use HTML <a>, <i>, etc. 🤷‍♀️
  • Use <div class=example> or <p class=note> to create automagic boxes with the fancy backgrounds.
  • {{theThing}}: Autolink to the Web IDL definition of that symbol. Examples: {{getSetCookie}}, {{Response/url}}
  • [[THE-SPEC inline]]: Automagically expands to the title of THE-SPEC. Examples: [[FETCH inline]], [[DOM inline]]
  • Use <pre class=simpledef> to make a quick colon : separated table