Skip to content

Add non-normative docs for APIs #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
inexorabletash opened this issue Nov 4, 2016 · 0 comments
Closed

Add non-normative docs for APIs #110

inexorabletash opened this issue Nov 4, 2016 · 0 comments

Comments

@inexorabletash
Copy link
Member

inexorabletash commented Nov 4, 2016

Several specs (Encoding, DOM, etc) have non-normative documentation for examples, something along the lines of:

store = transaction . objectStore( name )

Gets an IDBObjectStore object.

request = store . add(value, _key)

Adds a record to the store with the specified key. Will fail if the a record with the same key is already present.

request = store . put(value, _key)

Adds a record to the store with the specified key. Will overwrite a previous record with the same key.

... which saves developers from having to read spec-ese, especially as the behavior of the async methods is far away in the spec from the IDL entry points. This is a simplified description that mostly dispenses with error cases, and focuses on the purpose of the methods and intended use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant