summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/elements-metadata.js
blob: 49d7bb25adea968126ea94bb51486c698e702209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
var metadataElements = {
  head: {},
  title: {},
  base: {
    href: {type: "url", customGetter: true},
    target: "string",
  },
  link: {
    // Conforming
    href: "url",
    crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}, isNullable: true, defaultVal: null, invalidVal: "anonymous"},
    rel: "string",
    as: {
      type: "enum",
      keywords: ["fetch", "audio", "document", "embed", "font", "image", "manifest", "object", "report", "script", "sharedworker", "style", "track", "video", "worker", "xslt"],
      defaultVal: "",
      invalidVal: ""
    },
    relList: {type: "tokenlist", domAttrName: "rel"},
    media: "string",
    nonce: "string",
    integrity: "string",
    hreflang: "string",
    type: "string",
    sizes: "settable tokenlist",
    referrerPolicy: {type: "enum", keywords: ["", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url"]},

    // Obsolete
    charset: "string",
    rev: "string",
    target: "string",
  },
  meta: {
    // Conforming
    name: "string",
    httpEquiv: {type: "string", domAttrName: "http-equiv"},
    content: "string",
    media: "string",

    // Obsolete
    scheme: "string",
  },
  style: {
    media: "string",
    nonce: "string",
    type: "string",
  },
};

mergeElements(metadataElements);