Skip to main content

Module document

Module document 

Source
Expand description

Discovering, embedding, and removing a C2PA manifest association in an HTML document.

Two associations are specified, both scoped to the document head:

  • an inline manifest, the Base64 content of a <script type="application/c2pa"> element, and
  • an external manifest, referenced by a <link rel="c2pa-manifest" href="…"> element.

The specification prefers the external form. A document shall carry at most one association: two script elements, two link elements, or one of each all mean the document is treated as if no manifests were located.

Enums§

Manifest
A located C2PA manifest association.

Constants§

LINK_REL
The IANA-registered link relation that marks an external Manifest Store.
SCRIPT_TYPE
The script type that marks an inline Manifest Store.

Functions§

embed
Embed a Manifest Store inline, as a script element in the document head.
embed_reference
Reference an external Manifest Store, as a link element in the document head.
extract
Locate the document’s single C2PA manifest association and decode it.
locate_all
The byte ranges of every C2PA manifest element in the document head.
remove
Remove every C2PA manifest element from the document.