Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Microdata project

Josh Matthews edited this pageOct 6, 2017 ·3 revisions

Implement Microdata API

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 incomponents/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 directoriestests/wpt/mozilla/tests/mozilla/microdata andtests/wpt/mozilla/meta/mozilla/microdata which will include any tests you write.
  • add a__dir__.ini file totests/wpt/mozilla/meta/mozilla/microdata whichenables the new preference.
  • tests can now beadded totests/wpt/mozilla/tests/mozilla/microdata.
  • implement the microdata attributes, by adding fields to theHTMLElement foritemscope anditemprop.

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

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp