Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.4k
Microdata project
Josh Matthews edited this pageOct 6, 2017 ·3 revisions
Background information: The WHATWG HTML standard defines aMicrodata API that allows authors to embed machine-readable metadata in web content. The goal of this work is to implement the fundamental pieces required to support this API.
Tracking issue:https://github.com/servo/servo/issues/18528 (please ask questions here)
Initial steps:
- email themozilla.dev.servo mailing list (be sure to subscribe to it first!) introducing your group and asking any necessary questions
- edit the HTMLElement interface to add theitemscope anditemprop attributes.
- Implement stub methods for the attributes in
components/script/dom/htmlelement.rs. - hide the new attributes by default by adding a
[Pref="dom.microdata.enabled"]attribute to each one in the WebIDL file and add a corresponding preference toresources/prefs.json - create new directories
tests/wpt/mozilla/tests/mozilla/microdataandtests/wpt/mozilla/meta/mozilla/microdatawhich will include any tests you write. - add a
__dir__.inifile totests/wpt/mozilla/meta/mozilla/microdatawhichenables the new preference. - tests can now beadded to
tests/wpt/mozilla/tests/mozilla/microdata. - implement the microdata attributes, by adding fields to the
HTMLElementforitemscopeanditemprop.
Subsequent steps:
- implement and test the algorithm toextract JSON from microdata.
- implement and test the algorithm toextract a vCard from microdata.
- use these algorithms to extract metadata from each page after it finishes loading and send it to the compositor
- notify any embedding code of the newly-extracted metadata
- modify theservoshell embedding to use the new notification and create a vCard file if available