CINXE.COM
WebXR Device API
<!doctype html><html lang="en"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"> <title>WebXR Device API</title> <meta content="CRD" name="w3c-status"> <meta content="Bikeshed version 82ce88815, updated Thu Sep 7 16:33:55 2023 -0700" name="generator"> <link href="https://www.w3.org/TR/webxr/" rel="canonical"> <meta content="27cd3d1e0eea2826d1d568d2e9ea4a5535c6df3c" name="document-revision"> <style> .head h1:after { content: url(images/spec-logo.png); float: right; } .unstable::before { content: "This section is not stable"; display: block; font-weight: bold; text-align: right; color: red; } .unstable { border: thin solid pink; border-radius: .5em; padding: .5em; margin: .5em calc(-0.5em - 1px); background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='290'><text transform='rotate(-45)' text-anchor='middle' font-family='sans-serif' font-weight='bold' font-size='70' y='210' opacity='.1'>Unstable</text></svg>"); background-repeat: repeat; background-color: #FFF4F4; } .unstable h3:first-of-type { margin-top: 0.5rem; } .unstable.example:not(.no-marker)::before { content: "Example " counter(example) " (Unstable)"; float: none; } .non-normative::before { content: "This section is non-normative."; font-style: italic; } .tg { border-collapse: collapse; border-spacing: 0; } .tg th { border-style: solid; border-width: 1px; background: var(--def-bg); font-family: sans-serif; font-weight: bold; border-color: var(--def-border); } .tg td { padding: 4px 5px; background-color: var(--def-bg); font-family: monospace; border-style: solid; border-width: 1px; border-color: var(--def-border); overflow: hidden; word-break: normal; } </style> <style>/* Boilerplate: style-autolinks */ .css.css, .property.property, .descriptor.descriptor { color: var(--a-normal-text); font-size: inherit; font-family: inherit; } .css::before, .property::before, .descriptor::before { content: "‘"; } .css::after, .property::after, .descriptor::after { content: "’"; } .property, .descriptor { /* Don't wrap property and descriptor names */ white-space: nowrap; } .type { /* CSS value <type> */ font-style: italic; } pre .property::before, pre .property::after { content: ""; } [data-link-type="property"]::before, [data-link-type="propdesc"]::before, [data-link-type="descriptor"]::before, [data-link-type="value"]::before, [data-link-type="function"]::before, [data-link-type="at-rule"]::before, [data-link-type="selector"]::before, [data-link-type="maybe"]::before { content: "‘"; } [data-link-type="property"]::after, [data-link-type="propdesc"]::after, [data-link-type="descriptor"]::after, [data-link-type="value"]::after, [data-link-type="function"]::after, [data-link-type="at-rule"]::after, [data-link-type="selector"]::after, [data-link-type="maybe"]::after { content: "’"; } [data-link-type].production::before, [data-link-type].production::after, .prod [data-link-type]::before, .prod [data-link-type]::after { content: ""; } [data-link-type=element], [data-link-type=element-attr] { font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace; font-size: .9em; } [data-link-type=element]::before { content: "<" } [data-link-type=element]::after { content: ">" } [data-link-type=biblio] { white-space: pre; } @media (prefers-color-scheme: dark) { :root { --selflink-text: black; --selflink-bg: silver; --selflink-hover-text: white; } } </style> <style>/* Boilerplate: style-colors */ /* Any --*-text not paired with a --*-bg is assumed to have a transparent bg */ :root { color-scheme: light dark; --text: black; --bg: white; --unofficial-watermark: url(https://www.w3.org/StyleSheets/TR/2016/logos/UD-watermark); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #707070; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #f8f8f8; --tocnav-active-text: #c00; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #f7f8f9; --tocsidebar-shadow: rgba(0,0,0,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #3980b5; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #005a9c; --hr-text: var(--text); --algo-border: #def; --del-text: red; --del-bg: transparent; --ins-text: #080; --ins-bg: transparent; --a-normal-text: #034575; --a-normal-underline: #bbb; --a-visited-text: var(--a-normal-text); --a-visited-underline: #707070; --a-hover-bg: rgba(75%, 75%, 75%, .25); --a-active-text: #c00; --a-active-underline: #c00; --blockquote-border: silver; --blockquote-bg: transparent; --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: #fbe9e9; --issue-text: var(--text); --issueheading-text: #831616; --example-border: #e0cb52; --example-bg: #fcfaee; --example-text: var(--text); --exampleheading-text: #574b0f; --note-border: #52e052; --note-bg: #e9fbe9; --note-text: var(--text); --noteheading-text: hsl(120, 70%, 30%); --notesummary-underline: silver; --assertion-border: #aaa; --assertion-bg: #eee; --assertion-text: black; --advisement-border: orange; --advisement-bg: #fec; --advisement-text: var(--text); --advisementheading-text: #b35f00; --warning-border: red; --warning-bg: hsla(40,100%,50%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #F5F0FF; --amendment-text: var(--text); --amendmentheading-text: #220066; --def-border: #8ccbf2; --def-bg: #def; --def-text: var(--text); --defrow-border: #bbd7e9; --datacell-border: silver; --indexinfo-text: #707070; --indextable-hover-text: black; --indextable-hover-bg: #f7f8f9; --outdatedspec-bg: rgba(0, 0, 0, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } @media (prefers-color-scheme: dark) { :root { --text: #ddd; --bg: black; --unofficial-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='%23100808' transform='translate(200 200) rotate(-45) translate(-200 -200)' stroke='%23100808' stroke-width='3'%3E%3Ctext x='50%25' y='220' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EUNOFFICIAL%3C/text%3E%3Ctext x='50%25' y='305' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EDRAFT%3C/text%3E%3C/g%3E%3C/svg%3E"); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #999; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #080808; --tocnav-active-text: #f44; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #080808; --tocsidebar-shadow: rgba(255,255,255,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #6af; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #8af; --hr-text: var(--text); --algo-border: #456; --del-text: #f44; --del-bg: transparent; --ins-text: #4a4; --ins-bg: transparent; --a-normal-text: #6af; --a-normal-underline: #555; --a-visited-text: var(--a-normal-text); --a-visited-underline: var(--a-normal-underline); --a-hover-bg: rgba(25%, 25%, 25%, .2); --a-active-text: #f44; --a-active-underline: var(--a-active-text); --borderedblock-bg: rgba(255, 255, 255, .05); --blockquote-border: silver; --blockquote-bg: var(--borderedblock-bg); --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: var(--borderedblock-bg); --issue-text: var(--text); --issueheading-text: hsl(0deg, 70%, 70%); --example-border: hsl(50deg, 90%, 60%); --example-bg: var(--borderedblock-bg); --example-text: var(--text); --exampleheading-text: hsl(50deg, 70%, 70%); --note-border: hsl(120deg, 100%, 35%); --note-bg: var(--borderedblock-bg); --note-text: var(--text); --noteheading-text: hsl(120, 70%, 70%); --notesummary-underline: silver; --assertion-border: #444; --assertion-bg: var(--borderedblock-bg); --assertion-text: var(--text); --advisement-border: orange; --advisement-bg: #222218; --advisement-text: var(--text); --advisementheading-text: #f84; --warning-border: red; --warning-bg: hsla(40,100%,20%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #080010; --amendment-text: var(--text); --amendmentheading-text: #cc00ff; --def-border: #8ccbf2; --def-bg: #080818; --def-text: var(--text); --defrow-border: #136; --datacell-border: silver; --indexinfo-text: #aaa; --indextable-hover-text: var(--text); --indextable-hover-bg: #181818; --outdatedspec-bg: rgba(255, 255, 255, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } /* In case a transparent-bg image doesn't expect to be on a dark bg, which is quite common in practice... */ img { background: white; } } </style> <style>/* Boilerplate: style-counters */ body { counter-reset: example figure issue; } .issue { counter-increment: issue; } .issue:not(.no-marker)::before { content: "Issue " counter(issue); } .example { counter-increment: example; } .example:not(.no-marker)::before { content: "Example " counter(example); } .invalid.example:not(.no-marker)::before, .illegal.example:not(.no-marker)::before { content: "Invalid Example" counter(example); } figcaption { counter-increment: figure; } figcaption:not(.no-marker)::before { content: "Figure " counter(figure) " "; } </style> <style>/* Boilerplate: style-dfn-panel */ :root { --dfnpanel-bg: #ddd; --dfnpanel-text: var(--text); } @media (prefers-color-scheme: dark) { :root { --dfnpanel-bg: #222; --dfnpanel-text: var(--text); } } .dfn-panel { position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.75em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--dfnpanel-bg); color: var(--dfnpanel-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .dfn-panel:not(.on) { display: none; } .dfn-panel * { margin: 0; padding: 0; text-indent: 0; } .dfn-panel > b { display: block; } .dfn-panel a { color: var(--dfnpanel-text); } .dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; } .dfn-panel > b + b { margin-top: 0.25em; } .dfn-panel ul { padding: 0 0 0 1em; list-style: none; } .dfn-panel li a { white-space: pre; display: inline-block; max-width: calc(300px - 1.5em - 1em); overflow: hidden; text-overflow: ellipsis; } .dfn-panel.activated { display: inline-block; position: fixed; left: .5em; bottom: 2em; margin: 0 auto; max-width: calc(100vw - 1.5em - .4em - .5em); max-height: 30vh; } .dfn-paneled[role="button"] { cursor: pointer; } </style> <style>/* Boilerplate: style-dfn-panel */ :root { --dfnpanel-bg: #ddd; --dfnpanel-text: var(--text); } @media (prefers-color-scheme: dark) { :root { --dfnpanel-bg: #222; --dfnpanel-text: var(--text); } } .dfn-panel { position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.75em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--dfnpanel-bg); color: var(--dfnpanel-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .dfn-panel:not(.on) { display: none; } .dfn-panel * { margin: 0; padding: 0; text-indent: 0; } .dfn-panel > b { display: block; } .dfn-panel a { color: var(--dfnpanel-text); } .dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; } .dfn-panel > b + b { margin-top: 0.25em; } .dfn-panel ul { padding: 0 0 0 1em; list-style: none; } .dfn-panel li a { white-space: pre; display: inline-block; max-width: calc(300px - 1.5em - 1em); overflow: hidden; text-overflow: ellipsis; } .dfn-panel.activated { display: inline-block; position: fixed; left: .5em; bottom: 2em; margin: 0 auto; max-width: calc(100vw - 1.5em - .4em - .5em); max-height: 30vh; } .dfn-paneled[role="button"] { cursor: pointer; } </style> <style>/* Boilerplate: style-issues */ a[href].issue-return { float: right; float: inline-end; color: var(--issueheading-text); font-weight: bold; text-decoration: none; } </style> <style>/* Boilerplate: style-md-lists */ /* This is a weird hack for me not yet following the commonmark spec regarding paragraph and lists. */ [data-md] > :first-child { margin-top: 0; } [data-md] > :last-child { margin-bottom: 0; } </style> <style>/* Boilerplate: style-mdn-anno */ :root { --mdn-bg: #EEE; --mdn-shadow: #999; --mdn-nosupport-text: #ccc; } @media (prefers-color-scheme: dark) { :root { --mdn-bg: #222; --mdn-shadow: #444; --mdn-nosupport-text: #666; } } .mdn-anno { background: var(--mdn-bg, #EEE); border-radius: .25em; box-shadow: 0 0 3px var(--mdn-shadow, #999); color: var(--text, black); font: 1em sans-serif; hyphens: none; max-width: min-content; overflow: hidden; padding: 0.2em; position: absolute; right: 0.3em; top: auto; white-space: nowrap; word-wrap: normal; z-index: 8; } .mdn-anno.unpositioned { display: none; } .mdn-anno.overlapping-main { opacity: .2; transition: opacity .1s; } .mdn-anno[open] { opacity: 1; z-index: 9; min-width: 9em; } .mdn-anno:hover { opacity: 1; outline: var(--text, black) 1px solid; } .mdn-anno > summary { font-weight: normal; text-align: right; cursor: pointer; display: block; } .mdn-anno > summary > .less-than-two-engines-flag { color: red; padding-right: 2px; } .mdn-anno > summary > .all-engines-flag { color: green; padding-right: 2px; } .mdn-anno > summary > span { color: #fff; background-color: #000; font-weight: normal; font-family: zillaslab, Palatino, "Palatino Linotype", serif; padding: 2px 3px 0px 3px; line-height: 1.3em; vertical-align: top; } .mdn-anno > .feature { margin-top: 20px; } .mdn-anno > .feature:not(:first-of-type) { border-top: 1px solid #999; margin-top: 6px; padding-top: 2px; } .mdn-anno > .feature > .less-than-two-engines-text { color: red; } .mdn-anno > .feature > .all-engines-text { color: green; } .mdn-anno > .feature > p { font-size: .75em; margin-top: 6px; margin-bottom: 0; } .mdn-anno > .feature > p + p { margin-top: 3px; } .mdn-anno > .feature > .support { display: block; font-size: 0.6em; margin: 0; padding: 0; margin-top: 2px; } .mdn-anno > .feature > .support + div { padding-top: 0.5em; } .mdn-anno > .feature > .support > hr { display: block; border: none; border-top: 1px dotted #999; padding: 3px 0px 0px 0px; margin: 2px 3px 0px 3px; } .mdn-anno > .feature > .support > hr::before { content: ""; } .mdn-anno > .feature > .support > span { padding: 0.2em 0; display: block; display: table; } .mdn-anno > .feature > .support > span.no { color: var(--mdn-nosupport-text); filter: grayscale(100%); } .mdn-anno > .feature > .support > span.no::before { opacity: 0.5; } .mdn-anno > .feature > .support > span:first-of-type { padding-top: 0.5em; } .mdn-anno > .feature > .support > span > span { padding: 0 0.5em; display: table-cell; } .mdn-anno > .feature > .support > span > span:first-child { width: 100%; } .mdn-anno > .feature > .support > span > span:last-child { width: 100%; white-space: pre; padding: 0; } .mdn-anno > .feature > .support > span::before { content: ' '; display: table-cell; min-width: 1.5em; height: 1.5em; background: no-repeat center center; background-size: contain; text-align: right; font-size: 0.75em; font-weight: bold; } .mdn-anno > .feature > .support > .chrome_android::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); } .mdn-anno > .feature > .support > .firefox_android::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } .mdn-anno > .feature > .support > .chrome::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); } .mdn-anno > .feature > .support > .edge_blink::before { background-image: url(https://resources.whatwg.org/browser-logos/edge.svg); } .mdn-anno > .feature > .support > .edge::before { background-image: url(https://resources.whatwg.org/browser-logos/edge_legacy.svg); } .mdn-anno > .feature > .support > .firefox::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } .mdn-anno > .feature > .support > .ie::before { background-image: url(https://resources.whatwg.org/browser-logos/ie.png); } .mdn-anno > .feature > .support > .safari_ios::before { background-image: url(https://resources.whatwg.org/browser-logos/safari-ios.svg); } .mdn-anno > .feature > .support > .nodejs::before { background-image: url(https://nodejs.org/static/images/favicons/favicon.ico); } .mdn-anno > .feature > .support > .opera_android::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); } .mdn-anno > .feature > .support > .opera::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); } .mdn-anno > .feature > .support > .safari::before { background-image: url(https://resources.whatwg.org/browser-logos/safari.png); } .mdn-anno > .feature > .support > .samsunginternet_android::before { background-image: url(https://resources.whatwg.org/browser-logos/samsung.svg); } .mdn-anno > .feature > .support > .webview_android::before { background-image: url(https://resources.whatwg.org/browser-logos/android-webview.png); } .name-slug-mismatch { color: red; } .caniuse-status:hover { z-index: 9; } /* dt, li, .issue, .note, and .example are "position: relative", so to put annotation at right margin, must move to right of containing block */; .h-entry:not(.status-LS) dt > .mdn-anno, .h-entry:not(.status-LS) li > .mdn-anno, .h-entry:not(.status-LS) .issue > .mdn-anno, .h-entry:not(.status-LS) .note > .mdn-anno, .h-entry:not(.status-LS) .example > .mdn-anno { right: -6.7em; } .h-entry p + .mdn-anno { margin-top: 0; } h2 + .mdn-anno.after { margin: -48px 0 0 0; } h3 + .mdn-anno.after { margin: -46px 0 0 0; } h4 + .mdn-anno.after { margin: -42px 0 0 0; } h5 + .mdn-anno.after { margin: -40px 0 0 0; } h6 + .mdn-anno.after { margin: -40px 0 0 0; } </style> <style>/* Boilerplate: style-selflinks */ :root { --selflink-text: white; --selflink-bg: gray; --selflink-hover-text: black; } .heading, .issue, .note, .example, li, dt { position: relative; } a.self-link { position: absolute; top: 0; left: calc(-1 * (3.5rem - 26px)); width: calc(3.5rem - 26px); height: 2em; text-align: center; border: none; transition: opacity .2s; opacity: .5; } a.self-link:hover { opacity: 1; } .heading > a.self-link { font-size: 83%; } .example > a.self-link, .note > a.self-link, .issue > a.self-link { /* These blocks are overflow:auto, so positioning outside doesn't work. */ left: auto; right: 0; } li > a.self-link { left: calc(-1 * (3.5rem - 26px) - 2em); } dfn > a.self-link { top: auto; left: auto; opacity: 0; width: 1.5em; height: 1.5em; background: var(--selflink-bg); color: var(--selflink-text); font-style: normal; transition: opacity .2s, background-color .2s, color .2s; } dfn:hover > a.self-link { opacity: 1; } dfn > a.self-link:hover { color: var(--selflink-hover-text); } a.self-link::before { content: "¶"; } .heading > a.self-link::before { content: "§"; } dfn > a.self-link::before { content: "#"; } </style> <style>/* Boilerplate: style-syntax-highlighting */ pre.idl.highlight { background: var(--borderedblock-bg, var(--def-bg)); } </style> <style>/* Boilerplate: style-syntax-highlighting */ code.highlight { padding: .1em; border-radius: .3em; } pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; } .highlight:not(.idl) { background: rgba(0, 0, 0, .03); } c-[a] { color: #990055 } /* Keyword.Declaration */ c-[b] { color: #990055 } /* Keyword.Type */ c-[c] { color: #708090 } /* Comment */ c-[d] { color: #708090 } /* Comment.Multiline */ c-[e] { color: #0077aa } /* Name.Attribute */ c-[f] { color: #669900 } /* Name.Tag */ c-[g] { color: #222222 } /* Name.Variable */ c-[k] { color: #990055 } /* Keyword */ c-[l] { color: #000000 } /* Literal */ c-[m] { color: #000000 } /* Literal.Number */ c-[n] { color: #0077aa } /* Name */ c-[o] { color: #999999 } /* Operator */ c-[p] { color: #999999 } /* Punctuation */ c-[s] { color: #a67f59 } /* Literal.String */ c-[t] { color: #a67f59 } /* Literal.String.Single */ c-[u] { color: #a67f59 } /* Literal.String.Double */ c-[cp] { color: #708090 } /* Comment.Preproc */ c-[c1] { color: #708090 } /* Comment.Single */ c-[cs] { color: #708090 } /* Comment.Special */ c-[kc] { color: #990055 } /* Keyword.Constant */ c-[kn] { color: #990055 } /* Keyword.Namespace */ c-[kp] { color: #990055 } /* Keyword.Pseudo */ c-[kr] { color: #990055 } /* Keyword.Reserved */ c-[ld] { color: #000000 } /* Literal.Date */ c-[nc] { color: #0077aa } /* Name.Class */ c-[no] { color: #0077aa } /* Name.Constant */ c-[nd] { color: #0077aa } /* Name.Decorator */ c-[ni] { color: #0077aa } /* Name.Entity */ c-[ne] { color: #0077aa } /* Name.Exception */ c-[nf] { color: #0077aa } /* Name.Function */ c-[nl] { color: #0077aa } /* Name.Label */ c-[nn] { color: #0077aa } /* Name.Namespace */ c-[py] { color: #0077aa } /* Name.Property */ c-[ow] { color: #999999 } /* Operator.Word */ c-[mb] { color: #000000 } /* Literal.Number.Bin */ c-[mf] { color: #000000 } /* Literal.Number.Float */ c-[mh] { color: #000000 } /* Literal.Number.Hex */ c-[mi] { color: #000000 } /* Literal.Number.Integer */ c-[mo] { color: #000000 } /* Literal.Number.Oct */ c-[sb] { color: #a67f59 } /* Literal.String.Backtick */ c-[sc] { color: #a67f59 } /* Literal.String.Char */ c-[sd] { color: #a67f59 } /* Literal.String.Doc */ c-[se] { color: #a67f59 } /* Literal.String.Escape */ c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */ c-[si] { color: #a67f59 } /* Literal.String.Interpol */ c-[sx] { color: #a67f59 } /* Literal.String.Other */ c-[sr] { color: #a67f59 } /* Literal.String.Regex */ c-[ss] { color: #a67f59 } /* Literal.String.Symbol */ c-[vc] { color: #0077aa } /* Name.Variable.Class */ c-[vg] { color: #0077aa } /* Name.Variable.Global */ c-[vi] { color: #0077aa } /* Name.Variable.Instance */ c-[il] { color: #000000 } /* Literal.Number.Integer.Long */ @media (prefers-color-scheme: dark) { .highlight:not(.idl) { background: rgba(255, 255, 255, .05); } c-[a] { color: #d33682 } /* Keyword.Declaration */ c-[b] { color: #d33682 } /* Keyword.Type */ c-[c] { color: #2aa198 } /* Comment */ c-[d] { color: #2aa198 } /* Comment.Multiline */ c-[e] { color: #268bd2 } /* Name.Attribute */ c-[f] { color: #b58900 } /* Name.Tag */ c-[g] { color: #cb4b16 } /* Name.Variable */ c-[k] { color: #d33682 } /* Keyword */ c-[l] { color: #657b83 } /* Literal */ c-[m] { color: #657b83 } /* Literal.Number */ c-[n] { color: #268bd2 } /* Name */ c-[o] { color: #657b83 } /* Operator */ c-[p] { color: #657b83 } /* Punctuation */ c-[s] { color: #6c71c4 } /* Literal.String */ c-[t] { color: #6c71c4 } /* Literal.String.Single */ c-[u] { color: #6c71c4 } /* Literal.String.Double */ c-[ch] { color: #2aa198 } /* Comment.Hashbang */ c-[cp] { color: #2aa198 } /* Comment.Preproc */ c-[cpf] { color: #2aa198 } /* Comment.PreprocFile */ c-[c1] { color: #2aa198 } /* Comment.Single */ c-[cs] { color: #2aa198 } /* Comment.Special */ c-[kc] { color: #d33682 } /* Keyword.Constant */ c-[kn] { color: #d33682 } /* Keyword.Namespace */ c-[kp] { color: #d33682 } /* Keyword.Pseudo */ c-[kr] { color: #d33682 } /* Keyword.Reserved */ c-[ld] { color: #657b83 } /* Literal.Date */ c-[nc] { color: #268bd2 } /* Name.Class */ c-[no] { color: #268bd2 } /* Name.Constant */ c-[nd] { color: #268bd2 } /* Name.Decorator */ c-[ni] { color: #268bd2 } /* Name.Entity */ c-[ne] { color: #268bd2 } /* Name.Exception */ c-[nf] { color: #268bd2 } /* Name.Function */ c-[nl] { color: #268bd2 } /* Name.Label */ c-[nn] { color: #268bd2 } /* Name.Namespace */ c-[py] { color: #268bd2 } /* Name.Property */ c-[ow] { color: #657b83 } /* Operator.Word */ c-[mb] { color: #657b83 } /* Literal.Number.Bin */ c-[mf] { color: #657b83 } /* Literal.Number.Float */ c-[mh] { color: #657b83 } /* Literal.Number.Hex */ c-[mi] { color: #657b83 } /* Literal.Number.Integer */ c-[mo] { color: #657b83 } /* Literal.Number.Oct */ c-[sa] { color: #6c71c4 } /* Literal.String.Affix */ c-[sb] { color: #6c71c4 } /* Literal.String.Backtick */ c-[sc] { color: #6c71c4 } /* Literal.String.Char */ c-[dl] { color: #6c71c4 } /* Literal.String.Delimiter */ c-[sd] { color: #6c71c4 } /* Literal.String.Doc */ c-[se] { color: #6c71c4 } /* Literal.String.Escape */ c-[sh] { color: #6c71c4 } /* Literal.String.Heredoc */ c-[si] { color: #6c71c4 } /* Literal.String.Interpol */ c-[sx] { color: #6c71c4 } /* Literal.String.Other */ c-[sr] { color: #6c71c4 } /* Literal.String.Regex */ c-[ss] { color: #6c71c4 } /* Literal.String.Symbol */ c-[fm] { color: #268bd2 } /* Name.Function.Magic */ c-[vc] { color: #cb4b16 } /* Name.Variable.Class */ c-[vg] { color: #cb4b16 } /* Name.Variable.Global */ c-[vi] { color: #cb4b16 } /* Name.Variable.Instance */ c-[vm] { color: #cb4b16 } /* Name.Variable.Magic */ c-[il] { color: #657b83 } /* Literal.Number.Integer.Long */ } </style> <style>/* Boilerplate: style-var-click-highlighting */ /* Colors were chosen in Lab using https://nixsensor.com/free-color-converter/ D50 2deg illuminant, L in [0,100], a and b in [-128, 128] 0 = lab(85,0,85) 1 = lab(85,80,30) 2 = lab(85,-40,40) 3 = lab(85,-50,0) 4 = lab(85,5,15) 5 = lab(85,-10,-50) 6 = lab(85,35,-15) */ var { cursor: pointer; } var.selected0 { background-color: #F4D200; box-shadow: 0 0 0 2px #F4D200; } var.selected1 { background-color: #FF87A2; box-shadow: 0 0 0 2px #FF87A2; } var.selected2 { background-color: #96E885; box-shadow: 0 0 0 2px #96E885; } var.selected3 { background-color: #3EEED2; box-shadow: 0 0 0 2px #3EEED2; } var.selected4 { background-color: #EACFB6; box-shadow: 0 0 0 2px #EACFB6; } var.selected5 { background-color: #82DDFF; box-shadow: 0 0 0 2px #82DDFF; } var.selected6 { background-color: #FFBCF2; box-shadow: 0 0 0 2px #FFBCF2; } </style> <link href="https://www.w3.org/StyleSheets/TR/2021/W3C-CRD" rel="stylesheet"> <body class="h-entry"> <div class="head"> <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p> <h1 class="p-name no-ref" id="title">WebXR Device API</h1> <p id="w3c-state"><a href="https://www.w3.org/standards/types#CRD">W3C Candidate Recommendation Draft</a>, <time class="dt-updated" datetime="2024-10-21">21 October 2024</time></p> <details open> <summary>More details about this document</summary> <div data-fill-with="spec-metadata"> <dl> <dt>This version: <dd><a class="u-url" href="https://www.w3.org/TR/2024/CRD-webxr-20241021/">https://www.w3.org/TR/2024/CRD-webxr-20241021/</a> <dt>Latest published version: <dd><a href="https://www.w3.org/TR/webxr/">https://www.w3.org/TR/webxr/</a> <dt>Editor's Draft: <dd><a href="https://immersive-web.github.io/webxr/">https://immersive-web.github.io/webxr/</a> <dt>Previous Versions: <dd><a href="https://www.w3.org/TR/2024/CRD-webxr-20240927/" rel="prev">https://www.w3.org/TR/2024/CRD-webxr-20240927/</a> <dt>History: <dd><a class="u-url" href="https://www.w3.org/standards/history/webxr/">https://www.w3.org/standards/history/webxr/</a> <dt>Implementation Report: <dd><a href="https://wpt.fyi/results/webxr?label=master&label=experimental&aligned">https://wpt.fyi/results/webxr?label=master&label=experimental&aligned</a> <dt>Feedback: <dd><a href="https://github.com/immersive-web/webxr/issues/">GitHub</a> <dt class="editor">Editors: <dd class="editor p-author h-card vcard" data-editor-id="87824"><a class="p-name fn u-email email" href="mailto:bajones@google.com">Brandon Jones</a> (<a class="p-org org" href="https://google.com/">Google</a>) <dd class="editor p-author h-card vcard" data-editor-id="109489"><a class="p-name fn u-email email" href="mailto:manishearth@google.com">Manish Goregaokar</a> (<span class="p-org org">Google [Mozilla until 2020]</span>) <dd class="editor p-author h-card vcard" data-editor-id="106988"><a class="p-name fn u-email email" href="mailto:cabanier@meta.com">Rik Cabanier</a> (<a class="p-org org" href="https://meta.com">Meta</a>) <dt class="editor">Former Editor: <dd class="editor p-author h-card vcard" data-editor-id="93109"><a class="p-name fn u-email email" href="mailto:nhw@amazon.com">Nell Waliczek</a> (<a class="p-org org" href="https://amazon.com/">Amazon [Microsoft until 2018]</a>) <dt>Participate: <dd><a href="https://github.com/immersive-web/webxr/issues/new">File an issue</a> (<a href="https://github.com/immersive-web/webxr/issues">open issues</a>) <dd><a href="https://lists.w3.org/Archives/Public/public-immersive-web-wg/">Mailing list archive</a> <dd><a href="irc://irc.w3.org:6665/">W3C’s #immersive-web IRC</a> </dl> </div> </details> <div data-fill-with="warning"></div> <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/policies/#copyright">Copyright</a> © 2024 <a href="https://www.w3.org/">World Wide Web Consortium</a>. <abbr title="World Wide Web Consortium">W3C</abbr><sup>®</sup> <a href="https://www.w3.org/policies/#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/policies/#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/copyright/software-license/" rel="license" title="W3C Software and Document License">permissive document license</a> rules apply. </p> <hr title="Separator for header"> </div> <div class="p-summary" data-fill-with="abstract"> <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2> <p>This specification describes support for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays, on the Web.</p> </div> <h2 class="no-num no-toc no-ref heading settled" id="sotd"><span class="content">Status of this document</span></h2> <div data-fill-with="status"> <p> <em>This section describes the status of this document at the time of its publication. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision of this technical report can be found in the <a href="https://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports index</a> at https://www.w3.org/TR/.</em> </p> <p> The Immersive Web Working Group maintains <a href="https://github.com/immersive-web/webxr/issues">a list of all bug reports that the group has not yet addressed</a>. This draft highlights some of the pending issues that are still to be discussed in the working group. No decision has been taken on the outcome of these issues including whether they are valid. Pull requests with proposed specification text for outstanding issues are strongly encouraged. </p> <p> This document was published by the <a href="https://www.w3.org/groups/wg/immersive-web">Immersive Web Working Group</a> as a Candidate Recommendation Draft using the <a href="https://www.w3.org/policies/process/20231103/#recs-and-notes">Recommendation track</a>. This document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation. </p> <p> Publication as a Candidate Recommendation does not imply endorsement by <abbr title="World Wide Web Consortium">W3C</abbr> and its Members. A Candidate Recommendation Draft integrates changes from the previous Candidate Recommendation that the Working Group intends to include in a subsequent Candidate Recommendation Snapshot. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress. </p> <p> The entrance criteria for this document to enter the Proposed Recommendation stage is to have a minimum of two independent and interoperable user agents that implementation all the features of this specification, which will be determined by passing the user agent tests defined in the test suite developed by the Working Group. The Working Group will prepare an implementation report to track progress. </p> <p> This document was produced by a group operating under the <a href="https://www.w3.org/policies/patent-policy/">W3C Patent Policy</a>. W3C maintains a <a href="https://www.w3.org/groups/wg/immersive-web/ipr" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/policies/patent-policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/policies/patent-policy/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p> <p> This document is governed by the <a href="https://www.w3.org/policies/process/20231103/" id="w3c_process_revision">03 November 2023 W3C Process Document</a>. </p> <p> For changes since the last draft, see the <a href="#changes">Changes</a> section. </p> <p></p> </div> <div data-fill-with="at-risk"></div> <nav data-fill-with="table-of-contents" id="toc"> <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2> <ol class="toc" role="directory"> <li> <a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a> <ol class="toc"> <li><a href="#terminology"><span class="secno">1.1</span> <span class="content">Terminology</span></a> <li><a href="#applicationflow"><span class="secno">1.2</span> <span class="content">Application flow</span></a> </ol> <li> <a href="#model"><span class="secno">2</span> <span class="content">Model</span></a> <ol class="toc"> <li><a href="#xr-device-concept"><span class="secno">2.1</span> <span class="content">XR device</span></a> </ol> <li> <a href="#initialization"><span class="secno">3</span> <span class="content">Initialization</span></a> <ol class="toc"> <li><a href="#navigator-xr-attribute"><span class="secno">3.1</span> <span class="content">navigator.xr</span></a> <li><a href="#xrsystem-interface"><span class="secno">3.2</span> <span class="content">XRSystem</span></a> <li><a href="#xrsessionmode-enum"><span class="secno">3.3</span> <span class="content">XRSessionMode</span></a> <li><a href="#feature-dependencies"><span class="secno">3.4</span> <span class="content">Feature Dependencies</span></a> </ol> <li> <a href="#session"><span class="secno">4</span> <span class="content">Session</span></a> <ol class="toc"> <li><a href="#xrsession-interface"><span class="secno">4.1</span> <span class="content">XRSession</span></a> <li><a href="#xrrenderstate-interface"><span class="secno">4.2</span> <span class="content">XRRenderState</span></a> <li><a href="#animation-frames"><span class="secno">4.3</span> <span class="content">Animation Frames</span></a> <li><a href="#compositor"><span class="secno">4.4</span> <span class="content">The XR Compositor</span></a> </ol> <li> <a href="#frame"><span class="secno">5</span> <span class="content">Frame Loop</span></a> <ol class="toc"> <li><a href="#xrframe-interface"><span class="secno">5.1</span> <span class="content">XRFrame</span></a> </ol> <li> <a href="#spaces"><span class="secno">6</span> <span class="content">Spaces</span></a> <ol class="toc"> <li><a href="#xrspace-interface"><span class="secno">6.1</span> <span class="content">XRSpace</span></a> <li><a href="#xrreferencespace-interface"><span class="secno">6.2</span> <span class="content">XRReferenceSpace</span></a> <li><a href="#xrboundedreferencespace-interface"><span class="secno">6.3</span> <span class="content">XRBoundedReferenceSpace</span></a> </ol> <li> <a href="#views"><span class="secno">7</span> <span class="content">Views</span></a> <ol class="toc"> <li><a href="#xrview-interface"><span class="secno">7.1</span> <span class="content">XRView</span></a> <li><a href="#primary-and-secondary-views"><span class="secno">7.2</span> <span class="content">Primary and Secondary Views</span></a> <li><a href="#xrviewport-interface"><span class="secno">7.3</span> <span class="content">XRViewport</span></a> </ol> <li> <a href="#geometricprimitives"><span class="secno">8</span> <span class="content">Geometric Primitives</span></a> <ol class="toc"> <li><a href="#matrices"><span class="secno">8.1</span> <span class="content">Matrices</span></a> <li><a href="#normalization"><span class="secno">8.2</span> <span class="content">Normalization</span></a> <li><a href="#xrrigidtransform-interface"><span class="secno">8.3</span> <span class="content">XRRigidTransform</span></a> </ol> <li> <a href="#pose"><span class="secno">9</span> <span class="content">Pose</span></a> <ol class="toc"> <li><a href="#xrpose-interface"><span class="secno">9.1</span> <span class="content">XRPose</span></a> <li><a href="#xrviewerpose-interface"><span class="secno">9.2</span> <span class="content">XRViewerPose</span></a> </ol> <li> <a href="#input"><span class="secno">10</span> <span class="content">Input</span></a> <ol class="toc"> <li><a href="#xrinputsource-interface"><span class="secno">10.1</span> <span class="content">XRInputSource</span></a> <li><a href="#transient-input"><span class="secno">10.2</span> <span class="content">Transient input</span></a> <li><a href="#xrinputsourcearray-interface"><span class="secno">10.3</span> <span class="content">XRInputSourceArray</span></a> </ol> <li> <a href="#layers"><span class="secno">11</span> <span class="content">Layers</span></a> <ol class="toc"> <li><a href="#xrlayer-interface"><span class="secno">11.1</span> <span class="content">XRLayer</span></a> <li><a href="#xrwebgllayer-interface"><span class="secno">11.2</span> <span class="content">XRWebGLLayer</span></a> <li><a href="#contextcompatibility"><span class="secno">11.3</span> <span class="content">WebGL Context Compatibility</span></a> </ol> <li> <a href="#events"><span class="secno">12</span> <span class="content">Events</span></a> <ol class="toc"> <li><a href="#xrsessionevent-interface"><span class="secno">12.1</span> <span class="content">XRSessionEvent</span></a> <li><a href="#xrinputsourceevent-interface"><span class="secno">12.2</span> <span class="content">XRInputSourceEvent</span></a> <li><a href="#xrinputsourceschangeevent-interface"><span class="secno">12.3</span> <span class="content">XRInputSourcesChangeEvent</span></a> <li><a href="#xrreferencespaceevent-interface"><span class="secno">12.4</span> <span class="content">XRReferenceSpaceEvent</span></a> <li><a href="#event-types"><span class="secno">12.5</span> <span class="content">Event Types</span></a> </ol> <li> <a href="#security"><span class="secno">13</span> <span class="content">Security, Privacy, and Comfort Considerations</span></a> <ol class="toc"> <li><a href="#sensitive-information-header"><span class="secno">13.1</span> <span class="content">Sensitive Information</span></a> <li> <a href="#user-intention"><span class="secno">13.2</span> <span class="content">User intention</span></a> <ol class="toc"> <li><a href="#user-activation"><span class="secno">13.2.1</span> <span class="content">User activation</span></a> <li><a href="#application-launch"><span class="secno">13.2.2</span> <span class="content">Launching a web application</span></a> <li><a href="#user-consent"><span class="secno">13.2.3</span> <span class="content">Implicit and Explicit consent</span></a> <li><a href="#consent-duration"><span class="secno">13.2.4</span> <span class="content">Duration of consent</span></a> </ol> <li><a href="#mid-session-consent"><span class="secno">13.3</span> <span class="content">Mid-session consent</span></a> <li> <a href="#data-adjustments-header"><span class="secno">13.4</span> <span class="content">Data adjustments</span></a> <ol class="toc"> <li><a href="#throttling-header"><span class="secno">13.4.1</span> <span class="content">Throttling</span></a> <li><a href="#rounding-and-friends"><span class="secno">13.4.2</span> <span class="content">Rounding, quantization, and fuzzing</span></a> <li><a href="#limiting-header"><span class="secno">13.4.3</span> <span class="content">Limiting</span></a> </ol> <li> <a href="#protected-functionality"><span class="secno">13.5</span> <span class="content">Protected functionality</span></a> <ol class="toc"> <li><a href="#protect-immersiveness"><span class="secno">13.5.1</span> <span class="content">Immersiveness</span></a> <li><a href="#protect-poses"><span class="secno">13.5.2</span> <span class="content">Poses</span></a> <li><a href="#protect-reference-spaces"><span class="secno">13.5.3</span> <span class="content">Reference spaces</span></a> </ol> <li><a href="#trustedenvironment-security"><span class="secno">13.6</span> <span class="content">Trusted Environment</span></a> <li><a href="#contextisolation-security"><span class="secno">13.7</span> <span class="content">Context Isolation</span></a> <li> <a href="#fingerprinting-security"><span class="secno">13.8</span> <span class="content">Fingerprinting</span></a> <ol class="toc"> <li><a href="#issessionsupported-fingerprinting"><span class="secno">13.8.1</span> <span class="content">Fingerprinting considerations of <code class="idl"><span>isSessionSupported()</span></code></span></a> <li><a href="#automatic-granting-xr-session-supported"><span class="secno">13.8.2</span> <span class="content">Considerations for when to automatically grant <span>"xr-session-supported"</span></span></a> </ol> </ol> <li> <a href="#integrations"><span class="secno">14</span> <span class="content">Integrations</span></a> <ol class="toc"> <li><a href="#permissions-policy"><span class="secno">14.1</span> <span class="content">Permissions Policy</span></a> <li><a href="#permissions"><span class="secno">14.2</span> <span class="content">Permissions API Integration</span></a> </ol> <li> <a href="#changes"><span class="secno"></span> <span class="content"> Changes</span></a> <ol class="toc"> <li><a href="#changes-from-20220331"><span class="secno"></span> <span class="content"> Changes from the <span>Candidate Recommendation Snapshot, 31 March 2022</span></span></a> <li><a href="#changes-from-20200724"><span class="secno"></span> <span class="content"> Changes from the <span>Working Draft 24 July 2020</span></span></a> <li><a href="#changes-from-20191010"><span class="secno"></span> <span class="content"> Changes from the <span>Working Draft 10 October 2019</span></span></a> <li><a href="#changes-from-20190205"><span class="secno"></span> <span class="content"> Changes from the <span>First Public Working Draft 5 Feburary 2019</span></span></a> </ol> <li><a href="#ack"><span class="secno">15</span> <span class="content">Acknowledgements</span></a> <li> <a href="#w3c-conformance"><span class="secno"></span> <span class="content">Conformance</span></a> <ol class="toc"> <li><a href="#w3c-conventions"><span class="secno"></span> <span class="content">Document conventions</span></a> <li><a href="#w3c-conformant-algorithms"><span class="secno"></span> <span class="content">Conformant Algorithms</span></a> </ol> <li> <a href="#index"><span class="secno"></span> <span class="content">Index</span></a> <ol class="toc"> <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a> <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a> </ol> <li> <a href="#references"><span class="secno"></span> <span class="content">References</span></a> <ol class="toc"> <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a> <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a> </ol> <li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a> </ol> </nav> <main> <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2> <section class="non-normative"> <p>Hardware that enables Virtual Reality (VR) and Augmented Reality (AR) applications are now broadly available to consumers, offering an immersive computing platform with both new opportunities and challenges. The ability to interact directly with immersive hardware is critical to ensuring that the web is well equipped to operate as a first-class citizen in this environment.</p> <p>Immersive computing introduces strict requirements for high-precision, low-latency communication in order to deliver an acceptable experience. It also brings unique <a href="#security">security</a> concerns for a platform like the web. The WebXR Device API provides the interfaces necessary to enable developers to build compelling, comfortable, and safe immersive applications on the web across a wide variety of hardware form factors.</p> <p>Other web interfaces, such as the <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/orientation-sensor/#relativeorientationsensor" id="ref-for-relativeorientationsensor">RelativeOrientationSensor</a></code> and <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/orientation-sensor/#absoluteorientationsensor" id="ref-for-absoluteorientationsensor">AbsoluteOrientationSensor</a></code>, can be repurposed to surface input from some devices to polyfill the WebXR Device API in limited situations. These interfaces cannot support multiple features of high-end immersive experiences, however, such as <a data-link-type="dfn" href="#6dof" id="ref-for-6dof">6DoF</a> tracking, presentation to headset peripherals, or tracked input devices.</p> </section> <h3 class="heading settled" data-level="1.1" id="terminology"><span class="secno">1.1. </span><span class="content">Terminology</span><a class="self-link" href="#terminology"></a></h3> <p>This document uses the acronym <b>XR</b> throughout to refer to the spectrum of hardware, applications, and techniques used for Virtual Reality, Augmented Reality, and other related technologies. Examples include, but are not limited to:</p> <ul> <li data-md> <p>Head-mounted displays, whether they are opaque, transparent, or utilize video passthrough</p> <li data-md> <p>Mobile devices with positional tracking</p> <li data-md> <p>Fixed displays with head tracking capabilities</p> </ul> <p>The important commonality between them being that they offer some degree of spatial tracking with which to simulate a view of virtual content.</p> <p>Terms like "XR device", "XR application", etc. are generally understood to apply to any of the above. Portions of this document that only apply to a subset of these devices will indicate so as appropriate.</p> <p>The terms <a data-link-type="dfn" href="#3dof" id="ref-for-3dof">3DoF</a> and <a data-link-type="dfn" href="#6dof" id="ref-for-6dof①">6DoF</a> are used throughout this document to describe the tracking capabilities of <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device">XR devices</a>.</p> <ul> <li data-md> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="3dof">3DoF</dfn> device, short for "Three Degrees of Freedom", is one that can only track rotational movement. This is common in devices which rely exclusively on accelerometer and gyroscope readings to provide tracking. <a data-link-type="dfn" href="#3dof" id="ref-for-3dof①">3DoF</a> devices do not respond to translational movements from the user, though they may employ algorithms to estimate translational changes based on modeling of the neck or arms.</p> <li data-md> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="6dof">6DoF</dfn> device, short for "Six Degrees of Freedom", is one that can track both rotation and translation, enabling precise 1:1 tracking in space. This typically requires some level of understanding of the user’s environment. That environmental understanding may be achieved via inside-out tracking, where sensors on the tracked device itself (such as cameras or depth sensors) are used to determine the device’s position, or outside-in tracking, where external devices placed in the user’s environment (like a camera or light emitting device) provides a stable point of reference against which the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①">XR device</a> can determine its position.</p> </ul> <h3 class="heading settled" data-level="1.2" id="applicationflow"><span class="secno">1.2. </span><span class="content">Application flow</span><a class="self-link" href="#applicationflow"></a></h3> <section class="non-normative"> <p>Most applications using the WebXR Device API will follow a similar usage pattern:</p> <ul> <li data-md> <p>Query <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported">navigator.xr.isSessionSupported()</a></code> to determine if the desired type of XR content is supported by the hardware and UA.</p> <li data-md> <p>If so, advertise the XR content to the user.</p> <li data-md> <p>Wait for the window to have <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#transient-activation" id="ref-for-transient-activation">transient activation</a>. This is most commonly indicated by the user clicking a button on the page indicating they want to begin viewing XR content.</p> <li data-md> <p>Request an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession">XRSession</a></code> within the user activation event with <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-requestsession" id="ref-for-dom-xrsystem-requestsession">navigator.xr.requestSession()</a></code>.</p> <li data-md> <p>If the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①">XRSession</a></code> request succeeds, use it to run a <a href="#frame">frame loop</a> to respond to XR input and produce images to display on the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device">XR device</a> in response.</p> <li data-md> <p>Continue running the <a href="#frame">frame loop</a> until the <a data-link-type="dfn" href="#shut-down-the-session" id="ref-for-shut-down-the-session">session is shut down</a> by the UA or the user indicates they want to exit the XR content.</p> </ul> </section> <h2 class="heading settled" data-level="2" id="model"><span class="secno">2. </span><span class="content">Model</span><a class="self-link" href="#model"></a></h2> <h3 class="heading settled" data-level="2.1" id="xr-device-concept"><span class="secno">2.1. </span><span class="content">XR device</span><a class="self-link" href="#xr-device-concept"></a></h3> <p>An <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-noexport id="xr-device">XR device</dfn> is a physical unit of hardware that can present immersive content to the user. Content is considered to be "immersive" if it produces visual, audio, haptic, or other sensory output that simulates or augments various aspects of the user’s environment. Most frequently this involves tracking the user’s motion in space and producing outputs that are synchronized to the user’s movement. On desktop clients, this is usually a headset peripheral. On mobile clients, it may represent the mobile device itself in conjunction with a viewer harness. It may also represent devices without stereo-presentation capabilities but with more advanced tracking.</p> <p>An <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device②">XR device</a> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-supported-modes">list of supported modes</dfn> (a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list">list</a> of <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#string" id="ref-for-string">strings</a>) that <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain">contains</a> the enumeration values of <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode">XRSessionMode</a></code> that the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device③">XR device</a> supports.</p> <p>Each <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device④">XR device</a> has a <dfn class="dfn-paneled" data-dfn-for="XR device" data-dfn-type="dfn" data-noexport id="xr-device-set-of-granted-features">set of granted features</dfn> for each <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①">XRSessionMode</a></code> in its <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes">list of supported modes</a>, which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-set" id="ref-for-ordered-set">set</a> of <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor">feature descriptors</a> which MUST be initially an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-set" id="ref-for-ordered-set①">set</a>.</p> <p>The user agent has a <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-noexport id="list-of-immersive-xr-devices">list of immersive XR devices</dfn> (a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①">list</a> of <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑤">XR device</a>), which MUST be initially an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②">list</a>.</p> <p>The user agent has an <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-noexport id="immersive-xr-device">immersive XR device</dfn> (<code>null</code> or <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑥">XR device</a>) which is initially <code>null</code> and represents the active <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑦">XR device</a> from the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices">list of immersive XR devices</a>. This object MAY live on a separate thread and be updated asynchronously.</p> <p>The user agent MUST have a <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-noexport id="default-inline-xr-device">default inline XR device</dfn>, which is an <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑧">XR device</a> that MUST <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain①">contain</a> <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline">"inline"</a></code> in its <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes①">list of supported modes</a>. The <a data-link-type="dfn" href="#default-inline-xr-device" id="ref-for-default-inline-xr-device">default inline XR device</a> MUST NOT report any pose information, and MUST NOT report <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source">XR input source</a>s or events other than those created by pointer events.</p> <p class="note" role="note"><span class="marker">Note:</span> The <a data-link-type="dfn" href="#default-inline-xr-device" id="ref-for-default-inline-xr-device①">default inline XR device</a> exists purely as a convenience for developers, allowing them to use the same rendering and input logic for both inline and immersive content. The <a data-link-type="dfn" href="#default-inline-xr-device" id="ref-for-default-inline-xr-device②">default inline XR device</a> does not expose any information not already available to the developer through other mechanisms on the page (such as pointer events for input), it only surfaces those values in an XR-centric format.</p> <p>The user agent MUST have a <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-noexport id="inline-xr-device">inline XR device</dfn>, which is an <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device⑨">XR device</a> that MUST <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain②">contain</a> <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①">"inline"</a></code> in its <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes②">list of supported modes</a>. The <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device">inline XR device</a> MAY be the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device">immersive XR device</a> if the tracking it provides makes sense to expose to inline content or the <a data-link-type="dfn" href="#default-inline-xr-device" id="ref-for-default-inline-xr-device③">default inline XR device</a> otherwise.</p> <p class="note" role="note"><span class="marker">Note:</span> On phones, the <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device①">inline XR device</a> may report pose information derived from the phone’s internal sensors, such as the gyroscope and accelerometer. On desktops and laptops without similar sensors, the <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device②">inline XR device</a> will not be able to report a pose, and as such should fall back to the <a data-link-type="dfn" href="#default-inline-xr-device" id="ref-for-default-inline-xr-device④">default inline XR device</a>. In case the user agent is already running on an <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①⓪">XR device</a>, the <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device③">inline XR device</a> will be the same device, and may support multiple <a data-link-type="dfn" href="#view" id="ref-for-view">views</a>. User consent must be given before any tracking or input features beyond what the <a data-link-type="dfn" href="#default-inline-xr-device" id="ref-for-default-inline-xr-device⑤">default inline XR device</a> exposes are provided.</p> <p>The current values of <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices①">list of immersive XR devices</a>, <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device④">inline XR device</a>, and <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①">immersive XR device</a> MAY live on a separate thread and be updated asynchronously. These objects SHOULD NOT be directly accessed in steps that are not running <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel">in parallel</a>.</p> <h2 class="heading settled" data-level="3" id="initialization"><span class="secno">3. </span><span class="content">Initialization</span><a class="self-link" href="#initialization"></a></h2> <h3 class="heading settled" data-level="3.1" id="navigator-xr-attribute"><span class="secno">3.1. </span><span class="content">navigator.xr</span><a class="self-link" href="#navigator-xr-attribute"></a></h3> <pre class="idl highlight def"><c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/system-state.html#navigator" id="ref-for-navigator"><c- g>Navigator</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrsystem" id="ref-for-xrsystem"><c- n>XRSystem</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSystem" href="#dom-navigator-xr" id="ref-for-dom-navigator-xr"><c- g>xr</c-></a>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Navigator" data-dfn-type="attribute" data-export id="dom-navigator-xr"><code>xr</code></dfn> attribute’s getter MUST return the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①">XRSystem</a></code> object that is associated with it.</p> <h3 class="heading settled" data-level="3.2" id="xrsystem-interface"><span class="secno">3.2. </span><span class="content">XRSystem</span><a class="self-link" href="#xrsystem-interface"></a></h3> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrsystem"><code><c- g>XRSystem</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget"><c- n>EventTarget</c-></a> { // Methods <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise" id="ref-for-idl-promise"><c- b>Promise</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean"><c- b>boolean</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported①"><c- g>isSessionSupported</c-></a>(<a data-link-type="idl-name" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode②"><c- n>XRSessionMode</c-></a> <dfn class="idl-code" data-dfn-for="XRSystem/isSessionSupported(mode)" data-dfn-type="argument" data-export id="dom-xrsystem-issessionsupported-mode-mode"><code><c- g>mode</c-></code><a class="self-link" href="#dom-xrsystem-issessionsupported-mode-mode"></a></dfn>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject" id="ref-for-NewObject"><c- g>NewObject</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise" id="ref-for-idl-promise①"><c- b>Promise</c-></a><<a data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession②"><c- n>XRSession</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsystem-requestsession" id="ref-for-dom-xrsystem-requestsession①"><c- g>requestSession</c-></a>(<a data-link-type="idl-name" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode③"><c- n>XRSessionMode</c-></a> <dfn class="idl-code" data-dfn-for="XRSystem/requestSession(mode, options), XRSystem/requestSession(mode)" data-dfn-type="argument" data-export id="dom-xrsystem-requestsession-mode-options-mode"><code><c- g>mode</c-></code><a class="self-link" href="#dom-xrsystem-requestsession-mode-options-mode"></a></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-xrsessioninit" id="ref-for-dictdef-xrsessioninit"><c- n>XRSessionInit</c-></a> <dfn class="idl-code" data-dfn-for="XRSystem/requestSession(mode, options), XRSystem/requestSession(mode)" data-dfn-type="argument" data-export id="dom-xrsystem-requestsession-mode-options-options"><code><c- g>options</c-></code><a class="self-link" href="#dom-xrsystem-requestsession-mode-options-options"></a></dfn> = {}); // Events <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsystem-ondevicechange" id="ref-for-dom-xrsystem-ondevicechange"><c- g>ondevicechange</c-></a>; }; </pre> <p>The user agent MUST create an <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem②">XRSystem</a></code> object when a <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/system-state.html#navigator" id="ref-for-navigator①">Navigator</a></code> object is created and associate it with that object.</p> <p>An <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem③">XRSystem</a></code> object is the entry point to the API, used to query for XR features available to the user agent and initiate communication with XR hardware via the creation of <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③">XRSession</a></code>s.</p> <p>The user agent MUST be able to <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="enumerate-immersive-xr-devices">enumerate immersive XR devices</dfn> attached to the system, at which time each available device is placed in the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices②">list of immersive XR devices</a>. Subsequent algorithms requesting enumeration MUST reuse the cached <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices③">list of immersive XR devices</a>. Enumerating the devices <a data-link-type="dfn" href="#should-not-initialize-device-tracking" id="ref-for-should-not-initialize-device-tracking">should not initialize device tracking</a>. After the first enumeration the user agent MUST begin monitoring device connection and disconnection, adding connected devices to the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices④">list of immersive XR devices</a> and removing disconnected devices.</p> <div class="algorithm" data-algorithm="xr-device-selection"> <p>Each time the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑤">list of immersive XR devices</a> changes the user agent should <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="select-an-immersive-xr-device">select an immersive XR device</dfn> by running the following steps:</p> <ol> <li data-md> <p>Let <var>oldDevice</var> be the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②">immersive XR device</a>.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑥">list of immersive XR devices</a> is an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list③">list</a>, set the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device③">immersive XR device</a> to <code>null</code>.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑦">list of immersive XR devices</a>'s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size">size</a> is one, set the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device④">immersive XR device</a> to the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑧">list of immersive XR devices</a>[0].</p> <li data-md> <p>Set the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device⑤">immersive XR device</a> as follows:</p> <dl class="switch"> <dt data-md>If there are any active <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④">XRSession</a></code>s and the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices⑨">list of immersive XR devices</a> <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain③">contains</a> <var>oldDevice</var>: <dd data-md> <p>Set the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device⑥">immersive XR device</a> to <var>oldDevice</var>.</p> <dt data-md>Otherwise: <dd data-md> <p>Set the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device⑦">immersive XR device</a> to a device of the user agent’s choosing.</p> </dl> <li data-md> <p>The user agent MAY update the <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device⑤">inline XR device</a> to the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device⑧">immersive XR device</a> if appropriate, or the <a data-link-type="dfn" href="#default-inline-xr-device" id="ref-for-default-inline-xr-device⑥">default inline XR device</a> otherwise.</p> <li data-md> <p>If this is the first time devices have been enumerated or <var>oldDevice</var> equals the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device⑨">immersive XR device</a>, abort these steps.</p> <li data-md> <p><a data-link-type="dfn" href="#shut-down-the-session" id="ref-for-shut-down-the-session①">Shut down</a> any active <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤">XRSession</a></code>s.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task">Queue a task</a> to set the <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible">XR compatible</a> boolean of all <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase">WebGLRenderingContextBase</a></code> instances to <code>false</code>.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①">Queue a task</a> to <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire">fire an event</a> named <a class="idl-code" data-link-type="event" href="#eventdef-xrsystem-devicechange" id="ref-for-eventdef-xrsystem-devicechange">devicechange</a> on the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-global" id="ref-for-concept-relevant-global">relevant Global object</a>'s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator" id="ref-for-dom-navigator">navigator</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-navigator-xr" id="ref-for-dom-navigator-xr①">xr</a></code>.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②">Queue a task</a> to fire appropriate <code>change</code> events on any <code class="idl"><a data-link-type="idl" href="#xrpermissionstatus" id="ref-for-xrpermissionstatus">XRPermissionStatus</a></code> objects who are affected by the change in the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①⓪">immersive XR device</a> or <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device⑥">inline XR device</a>.</p> </ol> <p class="note" role="note"><span class="marker">Note:</span> These steps should always be run <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel①">in parallel</a>.</p> </div> <p class="note" role="note"><span class="marker">Note:</span> The user agent is allowed to use any criteria it wishes to <a data-link-type="dfn" href="#select-an-immersive-xr-device" id="ref-for-select-an-immersive-xr-device">select an immersive XR device</a> when the <a data-link-type="dfn" href="#list-of-immersive-xr-devices" id="ref-for-list-of-immersive-xr-devices①⓪">list of immersive XR devices</a> contains multiple devices. For example, the user agent may always select the first item in the list, or provide settings UI that allows users to manage device priority. Ideally the algorithm used to select the default device is stable and will result in the same device being selected across multiple browsing sessions.</p> <div class="algorithm" data-algorithm="ensure-device-selected"> <p>The user agent can <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="ensure-an-immersive-xr-device-is-selected">ensure an immersive XR device is selected</dfn> by running the following steps:</p> <ol> <li data-md> <p>If <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①①">immersive XR device</a> is not <code>null</code>, return <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①②">immersive XR device</a> and abort these steps.</p> <li data-md> <p><a data-link-type="dfn" href="#enumerate-immersive-xr-devices" id="ref-for-enumerate-immersive-xr-devices">Enumerate immersive XR devices</a>.</p> <li data-md> <p><a data-link-type="dfn" href="#select-an-immersive-xr-device" id="ref-for-select-an-immersive-xr-device①">Select an immersive XR device</a>.</p> <li data-md> <p>Return the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①③">immersive XR device</a>.</p> </ol> <p class="note" role="note"><span class="marker">Note:</span> These steps should always be run <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel②">in parallel</a>.</p> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSystem" data-dfn-type="attribute" data-export id="dom-xrsystem-ondevicechange"><code>ondevicechange</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes">Event handler IDL attribute</a> for the <a class="idl-code" data-link-type="event" href="#eventdef-xrsystem-devicechange" id="ref-for-eventdef-xrsystem-devicechange①">devicechange</a> event type.</p> <div class="algorithm" data-algorithm="session-supported"> The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSystem" data-dfn-type="method" data-export id="dom-xrsystem-issessionsupported"><code>isSessionSupported(<var>mode</var>)</code></dfn> method queries if a given <var>mode</var> may be supported by the user agent and device capabilities. <p>When this method is invoked, it MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-new-promise" id="ref-for-a-new-promise">a new Promise</a> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm">relevant realm</a> of this <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem④">XRSystem</a></code>.</p> <li data-md> <p>If <var>mode</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline②">"inline"</a></code>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve">resolve</a> <var>promise</var> with <code>true</code> and return it.</p> <li data-md> <p>If the requesting document’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin" id="ref-for-concept-origin">origin</a> is not allowed to use the "xr-spatial-tracking" <a href="#permissions-policy">permissions policy</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject">reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#securityerror" id="ref-for-securityerror">SecurityError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException">DOMException</a></code> and return it.</p> <li data-md> <p>Check whether the session <var>mode</var> is supported as follows:</p> <dl class="switch"> <dt data-md>If the user agent and system are known to <a data-link-type="dfn" href="#never-support" id="ref-for-never-support">never support</a> <var>mode</var> sessions <dd data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve①">Resolve</a> <var>promise</var> with <code>false</code>.</p> <dt data-md>If the user agent and system are known to <a data-link-type="dfn" href="#usually-support" id="ref-for-usually-support">usually support</a> <var>mode</var> sessions <dd data-md> <p><var>promise</var> MAY be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve②">resolved</a> with <code>true</code> provided that all instances of this user agent <a data-link-type="dfn" href="#indistinguishable-by-user-agent-string" id="ref-for-indistinguishable-by-user-agent-string">indistinguishable by user agent string</a> produce the same result here.</p> <dt data-md>Otherwise <dd data-md> <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel③">in parallel</a>:</p> <ol> <li data-md> <p>Let <var>device</var> be the result of <a data-link-type="dfn" href="#ensure-an-immersive-xr-device-is-selected" id="ref-for-ensure-an-immersive-xr-device-is-selected">ensuring an immersive XR device is selected</a>.</p> <li data-md> <p>If <var>device</var> is null, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve③">resolve</a> <var>promise</var> with <code>false</code> and abort these steps.</p> <li data-md> <p>If <var>device</var>’s <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes③">list of supported modes</a> does not <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain④">contain</a> <var>mode</var>, <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task③">queue a task</a> to <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve④">resolve</a> <var>promise</var> with <code>false</code> and abort these steps.</p> <li data-md> <p><a data-link-type="dfn" href="https://www.w3.org/TR/permissions/#dfn-request-permission-to-use" id="ref-for-dfn-request-permission-to-use">request permission to use</a> the <a data-link-type="dfn" href="https://www.w3.org/TR/permissions/#dfn-powerful-feature" id="ref-for-dfn-powerful-feature">powerful feature</a> <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported">"xr-session-supported"</a> with <code class="idl"><a data-link-type="idl" href="#dictdef-xrsessionsupportedpermissiondescriptor" id="ref-for-dictdef-xrsessionsupportedpermissiondescriptor">XRSessionSupportedPermissionDescriptor</a></code> with <code class="idl"><a data-link-type="idl" href="#dom-xrsessionsupportedpermissiondescriptor-mode" id="ref-for-dom-xrsessionsupportedpermissiondescriptor-mode">mode</a></code> equal to <var>mode</var>. If it returns <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstate-denied" id="ref-for-dom-permissionstate-denied">"denied"</a></code> <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task④">queue a task</a> to <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve⑤">resolve</a> <var>promise</var> with <code>false</code> and abort these steps. <span class="note">See <a href="#issessionsupported-fingerprinting">Fingerprinting considerations</a> for more information.</span></p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑤">queue a task</a> to <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve⑥">resolve</a> <var>promise</var> with <code>true</code>.</p> </ol> </dl> <li data-md> <p>Return <var>promise</var>.</p> </ol> </div> <p class="note" role="note"> Note: The purpose of <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported②">isSessionSupported()</a></code> is not to report with perfect accuracy the user agent’s ability to create an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥">XRSession</a></code>, but to inform the page whether or not advertising the ability to create sessions of the given mode is advised. A certain level of false-positives are expected, even when user agent checks for the presence of the necessary hardware/software prior to resolving the method. (For example, even if the appropriate hardware is present it may have given exclusive access to another application at the time a session is requested.) </p> <p>It is expected that most pages with XR content will call <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported③">isSessionSupported()</a></code> early in the document lifecycle. As such, calling <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported④">isSessionSupported()</a></code> SHOULD avoid displaying any modal or otherwise intrusive UI. Calling <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported⑤">isSessionSupported()</a></code> MUST NOT trigger device-selection UI, MUST NOT interfere with any running XR applications on the system, and MUST NOT cause XR-related applications to launch such as system trays or storefronts.</p> <div class="example" id="example-5e0d77ba"> <a class="self-link" href="#example-5e0d77ba"></a> The following code checks to see if <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr">immersive-vr</a></code> sessions are supported. <pre class="highlight"><c- a>const</c-> supported <c- o>=</c-> <c- k>await</c-> navigator<c- p>.</c->xr<c- p>.</c->isSessionSupported<c- p>(</c-><c- t>'immersive-vr'</c-><c- p>);</c-> <c- k>if</c-> <c- p>(</c->supported<c- p>)</c-> <c- p>{</c-> <c- c1>// 'immersive-vr' sessions may be supported.</c-> <c- c1>// Page should advertise support to the user.</c-> <c- p>}</c-> <c- k>else</c-> <c- p>{</c-> <c- c1>// 'immersive-vr' sessions are not supported.</c-> <c- p>}</c-> </pre> </div> <p>The <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem⑤">XRSystem</a></code> object has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="pending-immersive-session">pending immersive session</dfn> boolean, which MUST be initially <code>false</code>, an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="active-immersive-session">active immersive session</dfn>, which MUST be initially <code>null</code>, and a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-inline-sessions">list of inline sessions</dfn>, which MUST be initially empty.</p> <div class="algorithm" data-algorithm="request-session"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSystem" data-dfn-type="method" data-export data-lt="requestSession(mode, options)|requestSession(mode)" id="dom-xrsystem-requestsession"><code>requestSession(<var>mode</var>, <var>options</var>)</code></dfn> method attempts to initialize an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦">XRSession</a></code> for the given <var>mode</var> if possible, entering immersive mode if necessary.</p> <p>When this method is invoked, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-new-promise" id="ref-for-a-new-promise①">a new Promise</a> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①">relevant realm</a> of this <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem⑥">XRSystem</a></code>.</p> <li data-md> <p>Let <var>immersive</var> be <code>true</code> if <var>mode</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session">immersive session</a> mode, and <code>false</code> otherwise.</p> <li data-md> <p>Let <var>global object</var> be the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-global" id="ref-for-concept-relevant-global①">relevant Global object</a> for the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem⑦">XRSystem</a></code> on which this method was invoked.</p> <li data-md> <p>Check whether the session request is allowed as follows:</p> <dl class="switch"> <dt data-md>If <var>immersive</var> is <code>true</code>: <dd data-md> <ol> <li data-md> <p>Check if an <a data-link-type="dfn" href="#immersive-session-request-is-allowed" id="ref-for-immersive-session-request-is-allowed">immersive session request is allowed</a> for the <var>global object</var>, and if not <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject①">reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#securityerror" id="ref-for-securityerror①">SecurityError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException①">DOMException</a></code> and return <var>promise</var>.</p> <li data-md> <p>If <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session">pending immersive session</a> is <code>true</code> or <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session">active immersive session</a> is not <code>null</code>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject②">reject</a> <var>promise</var> with an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror">InvalidStateError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException②">DOMException</a></code> and return <var>promise</var>.</p> <li data-md> <p>Set <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session①">pending immersive session</a> to <code>true</code>.</p> </ol> <dt data-md>Otherwise: <dd data-md> <p>Check if an <a data-link-type="dfn" href="#inline-session-request-is-allowed" id="ref-for-inline-session-request-is-allowed">inline session request is allowed</a> for the <var>global object</var>, and if not <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject③">reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#securityerror" id="ref-for-securityerror②">SecurityError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException③">DOMException</a></code> and return <var>promise</var>.</p> </dl> <li data-md> <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel④">in parallel</a>:</p> <ol> <li data-md> <p>Let <var>requiredFeatures</var> be <var>options</var>’ <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures">requiredFeatures</a></code>.</p> <li data-md> <p>Let <var>optionalFeatures</var> be <var>options</var>’ <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures">optionalFeatures</a></code>.</p> <li data-md> <p>Set <var>device</var> to the result of <a data-link-type="dfn" href="#obtain-the-current-device" id="ref-for-obtain-the-current-device">obtaining the current device</a> for <var>mode</var>, <var>requiredFeatures</var>, and <var>optionalFeatures</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑥">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p>If <var>device</var> is <code>null</code> or <var>device</var>’s <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes④">list of supported modes</a> does not <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain⑤">contain</a> <var>mode</var>, run the following steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject④">Reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notsupportederror" id="ref-for-notsupportederror">NotSupportedError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException④">DOMException</a></code>.</p> <li data-md> <p>If <var>immersive</var> is <code>true</code>, set <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session②">pending immersive session</a> to <code>false</code>.</p> <li data-md> <p>Abort these steps.</p> </ol> <li data-md> <p>Let <var>descriptor</var> be an <code class="idl"><a data-link-type="idl" href="#dictdef-xrpermissiondescriptor" id="ref-for-dictdef-xrpermissiondescriptor">XRPermissionDescriptor</a></code> initialized with <var>mode</var>, <var>requiredFeatures</var>, and <var>optionalFeatures</var></p> <li data-md> <p>Let <var>status</var> be an <code class="idl"><a data-link-type="idl" href="#xrpermissionstatus" id="ref-for-xrpermissionstatus①">XRPermissionStatus</a></code>, initially <code>null</code></p> <li data-md> <p><a data-link-type="dfn" href="#request-the-xr-permission" id="ref-for-request-the-xr-permission">Request the xr permission</a> with <var>descriptor</var> and <var>status</var>.</p> <li data-md> <p>If <var>status</var>’ <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state">state</a></code> is <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstate-denied" id="ref-for-dom-permissionstate-denied①">"denied"</a></code> run the following steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject⑤">Reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notsupportederror" id="ref-for-notsupportederror①">NotSupportedError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException⑤">DOMException</a></code>.</p> <li data-md> <p>If <var>immersive</var> is <code>true</code>, set <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session③">pending immersive session</a> to <code>false</code>.</p> <li data-md> <p>Abort these steps.</p> </ol> <li data-md> <p>Let <var>granted</var> be a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-set" id="ref-for-ordered-set②">set</a> obtained from <var>status</var>’ <code class="idl"><a data-link-type="idl" href="#dom-xrpermissionstatus-granted" id="ref-for-dom-xrpermissionstatus-granted">granted</a></code>.</p> <li data-md> <p>Let <var>session</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new">new</a> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧">XRSession</a></code> object in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②">relevant realm</a> of this <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem⑧">XRSystem</a></code>.</p> <li data-md> <p><a data-link-type="dfn" href="#initialize-the-session" id="ref-for-initialize-the-session">Initialize the session</a> with <var>session</var>, <var>mode</var>, <var>granted</var>, and <var>device</var>.</p> <li data-md> <p>Potentially set the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session①">active immersive session</a> as follows:</p> <dl class="switch"> <dt data-md>If <var>immersive</var> is <code>true</code>: <dd data-md> <p>Set the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session②">active immersive session</a> to <var>session</var>, and set <a data-link-type="dfn" href="#pending-immersive-session" id="ref-for-pending-immersive-session④">pending immersive session</a> to <code>false</code>.</p> <dt data-md>Otherwise: <dd data-md> <p>Append <var>session</var> to the <a data-link-type="dfn" href="#list-of-inline-sessions" id="ref-for-list-of-inline-sessions">list of inline sessions</a>.</p> </dl> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve⑦">Resolve</a> <var>promise</var> with <var>session</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑦">Queue a task</a> to perform the following steps:</p> <div class="note" role="note">Note: These steps ensure that initial <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange">inputsourceschange</a></code> events occur after the initial session is resolved.</div> <ol> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#xrsession-promise-resolved" id="ref-for-xrsession-promise-resolved">promise resolved</a> flag to <code>true</code>.</p> <li data-md> <p>Let <var>sources</var> be any existing input sources attached to <var>session</var>.</p> <li data-md> <p>If <var>sources</var> is non-empty, perform the following steps:</p> <ol> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources">list of active XR input sources</a> to <var>sources</var>.</p> <li data-md> <p>Fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange①">inputsourceschange</a></code> on <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added">added</a></code> set to <var>sources</var>.</p> </ol> </ol> </ol> </ol> <li data-md> <p>Return <var>promise</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="device-for-mode"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="obtain-the-current-device">obtain the current device</dfn> for an <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode④">XRSessionMode</a></code> <var>mode</var>, <var>requiredFeatures</var>, and <var>optionalFeatures</var> the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Choose <var>device</var> as follows:</p> <dl class="switch"> <dt data-md>If <var>mode</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①">immersive session</a> mode: <dd data-md> <p>Set <var>device</var> to the result of <a data-link-type="dfn" href="#ensure-an-immersive-xr-device-is-selected" id="ref-for-ensure-an-immersive-xr-device-is-selected①">ensuring an immersive XR device is selected</a>.</p> <dt data-md>Else if <var>requiredFeatures</var> or <var>optionalFeatures</var> are not empty: <dd data-md> <p>Set <var>device</var> to the <a data-link-type="dfn" href="#inline-xr-device" id="ref-for-inline-xr-device⑦">inline XR device</a>.</p> <dt data-md>Otherwise: <dd data-md> <p>Set <var>device</var> to the <a data-link-type="dfn" href="#default-inline-xr-device" id="ref-for-default-inline-xr-device⑦">default inline XR device</a>.</p> </dl> <li data-md> <p>Return <var>device</var>.</p> </ol> <p class="note" role="note"><span class="marker">Note:</span> These steps should always be run <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑤">in parallel</a>.</p> </div> <div class="example" id="example-a21d5a3f"> <a class="self-link" href="#example-a21d5a3f"></a> The following code attempts to retrieve an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr①">immersive-vr</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨">XRSession</a></code>. <pre class="highlight"><c- a>const</c-> xrSession <c- o>=</c-> <c- k>await</c-> navigator<c- p>.</c->xr<c- p>.</c->requestSession<c- p>(</c-><c- u>"immersive-vr"</c-><c- p>);</c-> </pre> </div> <h3 class="heading settled" data-level="3.3" id="xrsessionmode-enum"><span class="secno">3.3. </span><span class="content">XRSessionMode</span><a class="self-link" href="#xrsessionmode-enum"></a></h3> <p>The <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode⑤">XRSessionMode</a></code> enum defines the modes that an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪">XRSession</a></code> can operate in.</p> <pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrsessionmode"><code><c- g>XRSessionMode</c-></code></dfn> { <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline③"><c- s>"inline"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr②"><c- s>"immersive-vr"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-immersive-ar" id="ref-for-dom-xrsessionmode-immersive-ar"><c- s>"immersive-ar"</c-></a> }; </pre> <ul> <li data-md> <p>A session mode of <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionMode" data-dfn-type="enum-value" data-export data-lt=""inline"|inline" id="dom-xrsessionmode-inline"><code>inline</code></dfn> indicates that the session’s output will be shown as an element in the HTML document. <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline④">inline</a></code> session content MUST be displayed in mono (i.e., with a single <a data-link-type="dfn" href="#view" id="ref-for-view①">view</a>). It MAY allow for <a data-link-type="dfn" href="#viewer" id="ref-for-viewer">viewer</a> tracking. User agents MUST allow <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑤">inline</a></code> sessions to be created.</p> <li data-md> <p>A session mode of <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionMode" data-dfn-type="enum-value" data-export data-lt=""immersive-vr"|immersive-vr" id="dom-xrsessionmode-immersive-vr"><code>immersive-vr</code></dfn> indicates that the session’s output will be given <a data-link-type="dfn" href="#exclusive-access" id="ref-for-exclusive-access">exclusive access</a> to the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①④">immersive XR device</a> display and that content <b>is not</b> intended to be integrated with the user’s environment.</p> <li data-md> <p>The behavior of the <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionMode" data-dfn-type="enum-value" data-export data-lt=""immersive-ar"|immersive-ar" id="dom-xrsessionmode-immersive-ar"><code>immersive-ar</code></dfn> session mode is defined in the <a href="https://www.w3.org/TR/webxr-ar-module-1/">WebXR AR Module</a> and MUST NOT be added to the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①⑤">immersive XR device</a>'s <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes⑤">list of supported modes</a> unless the UA implements that module.</p> </ul> <p>In this document, the term <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="inline-session">inline session</dfn> is synonymous with an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑥">inline</a></code> session and the term <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="immersive-session">immersive session</dfn> refers to either an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr③">immersive-vr</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-immersive-ar" id="ref-for-dom-xrsessionmode-immersive-ar①">immersive-ar</a></code> session.</p> <p><a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②">Immersive sessions</a> MUST provide some level of <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①">viewer</a> tracking, and content MUST be shown at the proper scale relative to the user and/or the surrounding environment. Additionally, <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session③">Immersive sessions</a> MUST be given <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="exclusive-access">exclusive access</dfn> to the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①⑥">immersive XR device</a>, meaning that while the <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session④">immersive session</a> is <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-visible" id="ref-for-dom-xrvisibilitystate-visible">"visible"</a></code> the HTML document is not shown on the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①⑦">immersive XR device</a>'s display, nor does content from any other source have exclusive access. <a data-link-type="dfn" href="#exclusive-access" id="ref-for-exclusive-access①">Exclusive access</a> does not prevent the user agent from overlaying its own UI, however this UI SHOULD be minimal.</p> <p class="note" role="note"><span class="marker">Note:</span> UA may choose to overlay content for accessibility or safety such as guardian boundaries, obstructions or the user’s hands when there are no alternative input sources.</p> <p class="note" role="note"><span class="marker">Note:</span> Future specifications or modules may expand the definition of <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑤">immersive session</a> to include additional session modes.</p> <p class="note" role="note"><span class="marker">Note:</span> Examples of ways <a data-link-type="dfn" href="#exclusive-access" id="ref-for-exclusive-access②">exclusive access</a> may be presented include stereo content displayed on a virtual reality headset.</p> <p class="note" role="note"><span class="marker">Note:</span> As an example of overlaid UI, the user agent or operating system in an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑥">immersive session</a> may show notifications over the rendered content.</p> <p class="note" role="note"><span class="marker">Note:</span> While the HTML document is not shown on the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①⑧">immersive XR device</a>'s display during an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑦">immersive session</a>, it may still be shown on a separate display, e.g. when the user is entering the <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑧">immersive session</a> from a 2d browser on their computer tethered to their <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device①⑨">immersive XR device</a>.</p> <h3 class="heading settled" data-level="3.4" id="feature-dependencies"><span class="secno">3.4. </span><span class="content">Feature Dependencies</span><a class="self-link" href="#feature-dependencies"></a></h3> <p>Some features of an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①">XRSession</a></code> may not be universally available for a number of reasons, among which is the fact not all XR devices can support the full set of features. Another consideration is that some features expose <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information">sensitive information</a> which may require a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent">user intent</a> before functioning.</p> <p>Since it is a poor user experience to initialize the underlying XR platform and create an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②">XRSession</a></code> only to immediately notify the user that the applications cannot function correctly, developers can indicate <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="required-features">required features</dfn> by passing an <code class="idl"><a data-link-type="idl" href="#dictdef-xrsessioninit" id="ref-for-dictdef-xrsessioninit①">XRSessionInit</a></code> dictionary to <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-requestsession" id="ref-for-dom-xrsystem-requestsession②">requestSession()</a></code>. This will block the creation of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①③">XRSession</a></code> if any of the <a data-link-type="dfn" href="#required-features" id="ref-for-required-features">required features</a> are unavailable due to device limitations or in the absence of a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①">user intent</a> to expose <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information①">sensitive information</a> related to the feature.</p> <p>Additionally, developers are encouraged to design experiences which progressively enhance their functionality when run on more capable devices. <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="optional-features">Optional features</dfn> which the experience does not require but will take advantage of when available must also be indicated in an <code class="idl"><a data-link-type="idl" href="#dictdef-xrsessioninit" id="ref-for-dictdef-xrsessioninit②">XRSessionInit</a></code> dictionary to ensure that <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent②">user intent</a> can be determined before enabling the feature if necessary.</p> <pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrsessioninit"><code><c- g>XRSessionInit</c-></code></dfn> { <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence"><c- b>sequence</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="dict-member" data-type="sequence<DOMString> " href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures①"><c- g>requiredFeatures</c-></a>; <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence①"><c- b>sequence</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="dict-member" data-type="sequence<DOMString> " href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures①"><c- g>optionalFeatures</c-></a>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionInit" data-dfn-type="dict-member" data-export id="dom-xrsessioninit-requiredfeatures"><code>requiredFeatures</code></dfn> array contains any <a data-link-type="dfn" href="#required-features" id="ref-for-required-features①">Required features</a> for the experience. If any value in the list is not a recognized <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor①">feature descriptor</a> the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④">XRSession</a></code> will not be created. If any feature listed in the <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures②">requiredFeatures</a></code> array is not supported by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①">XR device</a> or, if necessary, has not received a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent③">user intent</a> the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤">XRSession</a></code> will not be created.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionInit" data-dfn-type="dict-member" data-export id="dom-xrsessioninit-optionalfeatures"><code>optionalFeatures</code></dfn> array contains any <a data-link-type="dfn" href="#optional-features" id="ref-for-optional-features">Optional features</a> for the experience. If any value in the list is not a recognized <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor②">feature descriptor</a> it will be ignored. Features listed in the <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures②">optionalFeatures</a></code> array will be enabled if supported by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②">XR device</a> and, if necessary, given a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent④">user intent</a>, but will not block creation of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑥">XRSession</a></code> if absent.</p> <p>Values given in the feature lists are considered a valid <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="feature-descriptor">feature descriptor</dfn> if the value is one of the following:</p> <ul> <li data-md> <p>The string representation of any <code class="idl"><a data-link-type="idl" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype">XRReferenceSpaceType</a></code> enum value</p> </ul> <p>Future iterations of this specification and additional modules may expand the list of accepted <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor③">feature descriptors</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> If a feature needs additional initialization, <code class="idl"><a data-link-type="idl" href="#dictdef-xrsessioninit" id="ref-for-dictdef-xrsessioninit③">XRSessionInit</a></code> should be extended with a new field for that feature.</p> <p>Depending on the <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode⑥">XRSessionMode</a></code> requested, certain <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor④">feature descriptors</a> are added to the <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures③">requiredFeatures</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures③">optionalFeatures</a></code> lists by default. The following table describes the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="default-features">default features</dfn> associated with each session type and feature list:</p> <table class="tg"> <thead> <tr> <th>Feature <th>Sessions <th>List <tbody> <tr> <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer">"viewer"</a></code> <td><a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session">Inline sessions</a> and <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session⑨">immersive sessions</a> <td><code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures④">requiredFeatures</a></code> <tr> <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local">"local"</a></code> <td><a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⓪">Immersive sessions</a> <td><code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures⑤">requiredFeatures</a></code> </table> <p>The combined list of <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑤">feature descriptors</a> given by the <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-requiredfeatures" id="ref-for-dom-xrsessioninit-requiredfeatures⑥">requiredFeatures</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures④">optionalFeatures</a></code> are collectively considered the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="requested-features">requested features</dfn> for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑦">XRSession</a></code>.</p> <p>Some <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑥">feature descriptors</a>, when present in the <a data-link-type="dfn" href="#requested-features" id="ref-for-requested-features">requested features</a> list, are subject to <a href="#permissions-policy">permissions policy</a> and/or requirements that <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑤">user intent</a> to use the feature is well understood, via either <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent">implicit consent</a>. The following table describes the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="feature-requirements">feature requirements</dfn> that must be satisfied prior to being enabled:</p> <table class="tg"> <thead> <tr> <th>Feature <th><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/dom.html#concept-document-permissions-policy" id="ref-for-concept-document-permissions-policy">Permissions Policy</a> Required <th>Consent Required <tbody> <tr> <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local①">"local"</a></code> <td>"xr-spatial-tracking" <td><a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session①">Inline sessions</a> require consent <tr> <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor">"local-floor"</a></code> <td>"xr-spatial-tracking" <td>Always requires consent <tr> <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor">"bounded-floor"</a></code> <td>"xr-spatial-tracking" <td>Always requires consent <tr> <td><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded">"unbounded"</a></code> <td>"xr-spatial-tracking" <td>Always requires consent </table> <p class="note" role="note"><span class="marker">Note:</span> <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local②">"local"</a></code> is always included in the <a data-link-type="dfn" href="#requested-features" id="ref-for-requested-features①">requested features</a> of <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①①">immersive sessions</a> as a <a data-link-type="dfn" href="#default-features" id="ref-for-default-features">default feature</a>, and as such <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①②">immersive sessions</a> always need to obtain <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent①">implicit consent</a>.</p> <p><a data-link-type="dfn" href="#requested-features" id="ref-for-requested-features②">Requested features</a> can only be enabled for a session if the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device③">XR device</a> is <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="capable-of-supporting">capable of supporting</dfn> the feature, which means that the feature is known to be supported by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device④">XR device</a> in some configurations, even if the current configuration has not yet been verified as supporting the feature. The user agent MAY apply more rigorous constraints if desired in order to yield a more consistent user experience.</p> <p class="note" role="note"><span class="marker">Note:</span> For example, several VR devices support either configuring a safe boundary for the user to move around within or skipping boundary configuration and operating in a mode where the user is expected to stand in place. Such a device can be considered to be <a data-link-type="dfn" href="#capable-of-supporting" id="ref-for-capable-of-supporting">capable of supporting</a> <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor①">"bounded-floor"</a></code> <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace">XRReferenceSpace</a></code>s even if they are currently not configured with safety boundaries, because it’s expected that the user could configure the device appropriately if the experience required it. This is to allow user agents to avoid fully initializing the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑤">XR device</a> or waiting for the user’s environment to be recognized prior to <a data-link-type="dfn" href="#resolve-the-requested-features" id="ref-for-resolve-the-requested-features">resolving the requested features</a> if desired. If, however, the user agent knows the boundary state at the time the session is requested without additional initialization it may choose to reject the <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor②">"bounded-floor"</a></code> feature if the safety boundary is not already configured.</p> <h2 class="heading settled" data-level="4" id="session"><span class="secno">4. </span><span class="content">Session</span><a class="self-link" href="#session"></a></h2> <h3 class="heading settled" data-level="4.1" id="xrsession-interface"><span class="secno">4.1. </span><span class="content">XRSession</span><a class="self-link" href="#xrsession-interface"></a></h3> <p>Any interaction with XR hardware is done via an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑧">XRSession</a></code> object, which can only be retrieved by calling <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-requestsession" id="ref-for-dom-xrsystem-requestsession③">requestSession()</a></code> on the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem⑨">XRSystem</a></code> object. Once a session has been successfully acquired, it can be used to <code class="idl"><a data-link-type="idl" href="#dom-xrframe-getviewerpose" id="ref-for-dom-xrframe-getviewerpose">poll the viewer pose</a></code>, query information about the user’s environment, and present imagery to the user.</p> <p>The user agent, when possible, <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="should-not-initialize-device-tracking">SHOULD NOT initialize device tracking</dfn> or rendering capabilities until an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑨">XRSession</a></code> has been acquired. This is to prevent unwanted side effects of engaging the XR systems when they’re not actively being used, such as increased battery usage or related utility applications from appearing when first navigating to a page that only wants to test for the presence of XR hardware in order to advertise XR features. Not all XR platforms offer ways to detect the hardware’s presence without initializing tracking, however, so this is only a strong recommendation.</p> <pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrvisibilitystate"><code><c- g>XRVisibilityState</c-></code></dfn> { <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-visible" id="ref-for-dom-xrvisibilitystate-visible①"><c- s>"visible"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-visible-blurred" id="ref-for-dom-xrvisibilitystate-visible-blurred"><c- s>"visible-blurred"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-hidden" id="ref-for-dom-xrvisibilitystate-hidden"><c- s>"hidden"</c-></a>, }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext②"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrsession"><code><c- g>XRSession</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget①"><c- n>EventTarget</c-></a> { // Attributes <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-xrvisibilitystate" id="ref-for-enumdef-xrvisibilitystate"><c- n>XRVisibilityState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRVisibilityState" href="#dom-xrsession-visibilitystate" id="ref-for-dom-xrsession-visibilitystate"><c- g>visibilityState</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-float" id="ref-for-idl-float"><c- b>float</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="float?" href="#dom-xrsession-framerate" id="ref-for-dom-xrsession-framerate"><c- g>frameRate</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-Float32Array" id="ref-for-idl-Float32Array"><c- b>Float32Array</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array?" href="#dom-xrsession-supportedframerates" id="ref-for-dom-xrsession-supportedframerates"><c- g>supportedFrameRates</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrenderstate" id="ref-for-xrrenderstate"><c- n>XRRenderState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRenderState" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate"><c- g>renderState</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject②"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray"><c- n>XRInputSourceArray</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSourceArray" href="#dom-xrsession-inputsources" id="ref-for-dom-xrsession-inputsources"><c- g>inputSources</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject③"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray①"><c- n>XRInputSourceArray</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSourceArray" href="#dom-xrsession-trackedsources" id="ref-for-dom-xrsession-trackedsources"><c- g>trackedSources</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array"><c- b>FrozenArray</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString②"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMString>" href="#dom-xrsession-enabledfeatures" id="ref-for-dom-xrsession-enabledfeatures"><c- g>enabledFeatures</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean①"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrsession-issystemkeyboardsupported" id="ref-for-dom-xrsession-issystemkeyboardsupported"><c- g>isSystemKeyboardSupported</c-></a>; // Methods <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined"><c- b>undefined</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrsession-updaterenderstate" id="ref-for-dom-xrsession-updaterenderstate"><c- g>updateRenderState</c-></a>(<c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-xrrenderstateinit" id="ref-for-dictdef-xrrenderstateinit"><c- n>XRRenderStateInit</c-></a> <dfn class="idl-code" data-dfn-for="XRSession/updateRenderState(state), XRSession/updateRenderState()" data-dfn-type="argument" data-export id="dom-xrsession-updaterenderstate-state-state"><code><c- g>state</c-></code><a class="self-link" href="#dom-xrsession-updaterenderstate-state-state"></a></dfn> = {}); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise" id="ref-for-idl-promise②"><c- b>Promise</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined①"><c- b>undefined</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsession-updatetargetframerate" id="ref-for-dom-xrsession-updatetargetframerate"><c- g>updateTargetFrameRate</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-float" id="ref-for-idl-float①"><c- b>float</c-></a> <dfn class="idl-code" data-dfn-for="XRSession/updateTargetFrameRate(rate)" data-dfn-type="argument" data-export id="dom-xrsession-updatetargetframerate-rate-rate"><code><c- g>rate</c-></code><a class="self-link" href="#dom-xrsession-updatetargetframerate-rate-rate"></a></dfn>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject" id="ref-for-NewObject①"><c- g>NewObject</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise" id="ref-for-idl-promise③"><c- b>Promise</c-></a><<a data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace①"><c- n>XRReferenceSpace</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsession-requestreferencespace" id="ref-for-dom-xrsession-requestreferencespace"><c- g>requestReferenceSpace</c-></a>(<a data-link-type="idl-name" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype①"><c- n>XRReferenceSpaceType</c-></a> <dfn class="idl-code" data-dfn-for="XRSession/requestReferenceSpace(type)" data-dfn-type="argument" data-export id="dom-xrsession-requestreferencespace-type-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrsession-requestreferencespace-type-type"></a></dfn>); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe"><c- g>requestAnimationFrame</c-></a>(<a data-link-type="idl-name" href="#callbackdef-xrframerequestcallback" id="ref-for-callbackdef-xrframerequestcallback"><c- n>XRFrameRequestCallback</c-></a> <dfn class="idl-code" data-dfn-for="XRSession/requestAnimationFrame(callback)" data-dfn-type="argument" data-export id="dom-xrsession-requestanimationframe-callback-callback"><code><c- g>callback</c-></code><a class="self-link" href="#dom-xrsession-requestanimationframe-callback-callback"></a></dfn>); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined②"><c- b>undefined</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrsession-cancelanimationframe" id="ref-for-dom-xrsession-cancelanimationframe"><c- g>cancelAnimationFrame</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long①"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="idl-code" data-dfn-for="XRSession/cancelAnimationFrame(handle)" data-dfn-type="argument" data-export id="dom-xrsession-cancelanimationframe-handle-handle"><code><c- g>handle</c-></code><a class="self-link" href="#dom-xrsession-cancelanimationframe-handle-handle"></a></dfn>); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise" id="ref-for-idl-promise④"><c- b>Promise</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined③"><c- b>undefined</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsession-end" id="ref-for-dom-xrsession-end"><c- g>end</c-></a>(); // Events <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onend" id="ref-for-dom-xrsession-onend"><c- g>onend</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler②"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-oninputsourceschange" id="ref-for-dom-xrsession-oninputsourceschange"><c- g>oninputsourceschange</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler③"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselect" id="ref-for-dom-xrsession-onselect"><c- g>onselect</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler④"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselectstart" id="ref-for-dom-xrsession-onselectstart"><c- g>onselectstart</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑤"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselectend" id="ref-for-dom-xrsession-onselectend"><c- g>onselectend</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑥"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueeze" id="ref-for-dom-xrsession-onsqueeze"><c- g>onsqueeze</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑦"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueezestart" id="ref-for-dom-xrsession-onsqueezestart"><c- g>onsqueezestart</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑧"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueezeend" id="ref-for-dom-xrsession-onsqueezeend"><c- g>onsqueezeend</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler⑨"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onvisibilitychange" id="ref-for-dom-xrsession-onvisibilitychange"><c- g>onvisibilitychange</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①⓪"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onframeratechange" id="ref-for-dom-xrsession-onframeratechange"><c- g>onframeratechange</c-></a>; }; </pre> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⓪">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-mode">mode</dfn>, which is one of the values of <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode⑦">XRSessionMode</a></code>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②①">XRSession</a></code> has an <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-animation-frame">animation frame</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe">XRFrame</a></code> initialized with <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active">active</a> set to <code>false</code>, <a data-link-type="dfn" href="#xrframe-animationframe" id="ref-for-xrframe-animationframe">animationFrame</a> set to <code>true</code>, and <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session">session</a></code> set to the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②②">XRSession</a></code>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②③">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-set-of-granted-features">set of granted features</dfn>, which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-set" id="ref-for-ordered-set③">set</a> of <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString③">DOMString</a></code>s corresponding to the <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑦">feature descriptors</a> that have been granted to the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②④">XRSession</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-enabledfeatures"><code>enabledFeatures</code></dfn> attribute returns the features in the <a data-link-type="dfn" href="#xrsession-set-of-granted-features" id="ref-for-xrsession-set-of-granted-features">set of granted features</a> as a new array of <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString④">DOMString</a></code>s.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-issystemkeyboardsupported"><code>isSystemKeyboardSupported</code></dfn> attribute indicates that the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①⓪">XRSystem</a></code> has the ability to display the system keyboard while the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑤">XRSession</a></code> is active. If <code class="idl"><a data-link-type="idl" href="#dom-xrsession-issystemkeyboardsupported" id="ref-for-dom-xrsession-issystemkeyboardsupported①">isSystemKeyboardSupported</a></code> is <code>true</code>, Web APIs that would trigger the overlay keyboard (such as <a data-link-type="dfn" href="https://html.spec.whatwg.org#dom-focus-dev" id="ref-for-dom-focus-dev">focus</a>) will show the system keyboard. The <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑥">XRSession</a></code> MUST set the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state">visibility state</a> of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑦">XRSession</a></code> to <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-visible-blurred" id="ref-for-dom-xrvisibilitystate-visible-blurred①">"visible-blurred"</a></code> while the keyboard is shown.</p> <div class="algorithm" data-algorithm="initialize-session"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="initialize-the-session">initialize the session</dfn>, given <var>session</var>, <var>mode</var>, <var>granted</var>, and <var>device</var>, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode">mode</a> to <var>mode</var>.</p> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑥">XR device</a> to <var>device</var>.</p> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#xrsession-set-of-granted-features" id="ref-for-xrsession-set-of-granted-features①">set of granted features</a> to <var>granted</var>.</p> <li data-md> <p><a data-link-type="dfn" href="#initialize-the-render-state" id="ref-for-initialize-the-render-state">Initialize the render state</a>.</p> <li data-md> <p>If no other features of the user agent have done so already, perform the necessary platform-specific steps to initialize the device’s tracking and rendering capabilities, including showing any necessary instructions to the user.</p> </ol> <p class="note" role="note"><span class="marker">Note:</span> Some devices require additional user instructions for activation. For example, going into immersive mode on a phone-based headset device requires inserting the phone into the headset, and doing so on a desktop browser connected to an external headset requires wearing the headset. It is the responsibility of the user agent — not the author — to ensure any such instructions are shown.</p> </div> <p>A number of different circumstances may <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="shut-down-the-session">shut down the session</dfn>, which is permanent and irreversible. Once a session has been shut down the only way to access the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑦">XR device</a>'s tracking or rendering capabilities again is to request a new session. Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑧">XRSession</a></code> has an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="ended">ended</dfn> boolean, initially set to <code>false</code>, that indicates if it has been shut down.</p> <div class="algorithm" data-algorithm="shut-down-session"> <p>When an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession②⑨">XRSession</a></code> <var>session</var> is shut down the following steps are run:</p> <ol> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended">ended</a> value to <code>true</code>.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session③">active immersive session</a> is equal to <var>session</var>, set the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session④">active immersive session</a> to <code>null</code>.</p> <li data-md> <p>Remove <var>session</var> from the <a data-link-type="dfn" href="#list-of-inline-sessions" id="ref-for-list-of-inline-sessions①">list of inline sessions</a>.</p> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject⑥">Reject</a> any outstanding promises returned by <var>session</var> with an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①">InvalidStateError</a></code>, except for any promises returned by <code class="idl"><a data-link-type="idl" href="#dom-xrsession-end" id="ref-for-dom-xrsession-end①">end()</a></code>.</p> <li data-md> <p>If no other features of the user agent are actively using them, perform the necessary platform-specific steps to shut down the device’s tracking and rendering capabilities. This MUST include:</p> <ul> <li data-md> <p>Releasing <a data-link-type="dfn" href="#exclusive-access" id="ref-for-exclusive-access③">exclusive access</a> to the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑧">XR device</a> if <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①③">immersive session</a>.</p> <li data-md> <p>Deallocating any graphics resources acquired by <var>session</var> for presentation to the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device⑨">XR device</a>.</p> <li data-md> <p>Putting the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⓪">XR device</a> in a state such that a different source may be able to initiate a session with the same device if <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①④">immersive session</a>.</p> </ul> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑧">Queue a task</a> that fires an <code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent">XRSessionEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-end" id="ref-for-eventdef-xrsession-end">end</a></code> on <var>session</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="end-session"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export id="dom-xrsession-end"><code>end()</code></dfn> method provides a way to manually shut down a session. When invoked, it MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-new-promise" id="ref-for-a-new-promise②">a new Promise</a> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm③">relevant realm</a> of this <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⓪">XRSession</a></code>.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#ended" id="ref-for-ended①">ended</a> value of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this">this</a> is <code>true</code>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject⑦">reject</a> <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror②">InvalidStateError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException⑥">DOMException</a></code> and return <var>promise</var>.</p> <li data-md> <p><a data-link-type="dfn" href="#shut-down-the-session" id="ref-for-shut-down-the-session②">Shut down</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①">this</a>.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task⑨">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p>Wait until any platform-specific steps related to shutting down the session have completed.</p> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve⑧">Resolve</a> <var>promise</var>.</p> </ol> <li data-md> <p>Return <var>promise</var>.</p> </ol> </div> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③①">XRSession</a></code> has an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="active-render-state">active render state</dfn> which is a new <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate①">XRRenderState</a></code>, and a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="pending-render-state">pending render state</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate②">XRRenderState</a></code> which is initially <code>null</code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-renderstate"><code>renderState</code></dfn> attribute returns the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③②">XRSession</a></code>'s <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state">active render state</a>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③③">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="minimum-inline-field-of-view">minimum inline field of view</dfn> and a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="maximum-inline-field-of-view">maximum inline field of view</dfn>, defined in radians. The values MUST be determined by the user agent and MUST fall in the range of <code>0</code> to <code>PI</code>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③④">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="minimum-near-clip-plane">minimum near clip plane</dfn> and a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="maximum-far-clip-plane">maximum far clip plane</dfn>, defined in meters. The values MUST be determined by the user agent and MUST be non-negative. The <a data-link-type="dfn" href="#minimum-near-clip-plane" id="ref-for-minimum-near-clip-plane">minimum near clip plane</a> SHOULD be less than <code>0.1</code>. The <a data-link-type="dfn" href="#maximum-far-clip-plane" id="ref-for-maximum-far-clip-plane">maximum far clip plane</a> SHOULD be greater than <code>1000.0</code> (and MAY be infinite).</p> <div class="algorithm" data-algorithm="update-layers-state"> <p>When the user agent will <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="update-the-pending-layers-state">update the pending layers state</dfn> with <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑤">XRSession</a></code> <var>session</var> and <code class="idl"><a data-link-type="idl" href="#dictdef-xrrenderstateinit" id="ref-for-dictdef-xrrenderstateinit①">XRRenderStateInit</a></code> <var>newState</var>, it must run the following steps:</p> <ol> <li data-md> <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-layers" id="ref-for-dom-xrrenderstateinit-layers">layers</a></code>'s value is not <code>null</code>, throw a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notsupportederror" id="ref-for-notsupportederror②">NotSupportedError</a></code>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <a href="https://www.w3.org/TR/webxrlayers-1/">WebXR layers module</a> will introduce new semantics for this algorithm.</p> </div> <div class="algorithm" data-algorithm="apply-nominal-frame-rate"> <p>When the user agent wants to <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="apply-the-nominal-frame-rate">apply the nominal frame rate</dfn> <var>rate</var> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑥">XRSession</a></code> <var>session</var>, it MUST run the following steps:</p> <ol> <li data-md> <p>If <var>rate</var> is the same as <var>session</var>’s <a data-link-type="dfn" href="#xrsession-internal-nominal-framerate" id="ref-for-xrsession-internal-nominal-framerate">internal nominal framerate</a>, abort these steps.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended②">ended</a> value is <code>true</code>, abort these steps.</p> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#xrsession-internal-nominal-framerate" id="ref-for-xrsession-internal-nominal-framerate①">internal nominal framerate</a> to <var>rate</var>.</p> <li data-md> <p>Fire an <code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent①">XRSessionEvent</a></code> event named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-frameratechange" id="ref-for-eventdef-xrsession-frameratechange">frameratechange</a></code> on <var>session</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="update-frame-rate"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export id="dom-xrsession-updatetargetframerate"><code>updateTargetFrameRate(<var>rate</var>)</code></dfn> method passes the <a data-link-type="dfn" href="#target-frame-rate" id="ref-for-target-frame-rate">target frame rate</a> <var>rate</var> to the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑦">XRSession</a></code>.</p> <p>When this method is invoked, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>session</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②">this</a>.</p> <li data-md> <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-new-promise" id="ref-for-a-new-promise③">a new Promise</a> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm④">relevant realm</a> of <var>session</var>.</p> <li data-md> <p>If the <var>session</var> has no <a data-link-type="dfn" href="#xrsession-internal-nominal-framerate" id="ref-for-xrsession-internal-nominal-framerate②">internal nominal framerate</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject⑧">reject</a> <var>promise</var> with an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror③">InvalidStateError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException⑦">DOMException</a></code> and return <var>promise</var>.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended③">ended</a> value is <code>true</code>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject⑨">reject</a> <var>promise</var> with an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror④">InvalidStateError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException⑧">DOMException</a></code> and return <var>promise</var>.</p> <li data-md> <p>If <var>rate</var> is not in <code class="idl"><a data-link-type="idl" href="#dom-xrsession-supportedframerates" id="ref-for-dom-xrsession-supportedframerates①">supportedFrameRates</a></code>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject①⓪">reject</a> <var>promise</var> with an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror">TypeError</a></code>" <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException⑨">DOMException</a></code> and return <var>promise</var>.</p> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#xrsession-internal-target-framerate" id="ref-for-xrsession-internal-target-framerate">internal target framerate</a> to <var>rate</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①⓪">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p>The <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor">XR Compositor</a> MAY use <var>rate</var> to calculate a new <a data-link-type="dfn" href="#display-frame-rate" id="ref-for-display-frame-rate">display frame rate</a> and/or <a data-link-type="dfn" href="#nominal-frame-rate" id="ref-for-nominal-frame-rate">nominal frame rate</a>.</p> <li data-md> <p>Let <var>newrate</var> be the new <a data-link-type="dfn" href="#nominal-frame-rate" id="ref-for-nominal-frame-rate①">nominal frame rate</a>.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①①">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p>Await until the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①①">XRSystem</a></code>'s actions to update the <a data-link-type="dfn" href="#nominal-frame-rate" id="ref-for-nominal-frame-rate②">nominal frame rate</a> to <var>newrate</var> have taken effect.</p> <li data-md> <p><a data-link-type="dfn" href="#apply-the-nominal-frame-rate" id="ref-for-apply-the-nominal-frame-rate">Apply the nominal frame rate</a> with <var>newrate</var> and <var>session</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve⑨">Resolve</a> <var>promise</var>.</p> </ol> </ol> <li data-md> <p>Return <var>promise</var>.</p> </ol> </div> <p>If the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①">XR Compositor</a> changes the <a data-link-type="dfn" href="#nominal-frame-rate" id="ref-for-nominal-frame-rate③">nominal frame rate</a> for any reason (for example during a <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-visible-blurred" id="ref-for-dom-xrvisibilitystate-visible-blurred②">"visible-blurred"</a></code> event), it SHOULD use the <a data-link-type="dfn" href="#xrsession-internal-target-framerate" id="ref-for-xrsession-internal-target-framerate①">internal target framerate</a> once the event that caused the frame rate change has ended.</p> <div class="algorithm" data-algorithm="update-render-state"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export data-lt="updateRenderState(state)|updateRenderState()|updateRenderState(newState)" id="dom-xrsession-updaterenderstate"><code>updateRenderState(<var>newState</var>)</code></dfn> method queues an update to the <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state①">active render state</a> to be applied on the next frame. Unset fields of the <code class="idl"><a data-link-type="idl" href="#dictdef-xrrenderstateinit" id="ref-for-dictdef-xrrenderstateinit②">XRRenderStateInit</a></code> <var>newState</var> passed to this method will not be changed.</p> <p>When this method is invoked, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>session</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③">this</a>.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended④">ended</a> value is <code>true</code>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror⑤">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-baselayer" id="ref-for-dom-xrrenderstateinit-baselayer">baseLayer</a></code> was created with an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑧">XRSession</a></code> other than <var>session</var>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror⑥">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-inlineverticalfieldofview" id="ref-for-dom-xrrenderstateinit-inlineverticalfieldofview">inlineVerticalFieldOfView</a></code> is set and <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑤">immersive session</a>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror⑦">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>If none of <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthnear" id="ref-for-dom-xrrenderstateinit-depthnear">depthNear</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthfar" id="ref-for-dom-xrrenderstateinit-depthfar">depthFar</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-inlineverticalfieldofview" id="ref-for-dom-xrrenderstateinit-inlineverticalfieldofview①">inlineVerticalFieldOfView</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-baselayer" id="ref-for-dom-xrrenderstateinit-baselayer①">baseLayer</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-layers" id="ref-for-dom-xrrenderstateinit-layers①">layers</a></code> are set, abort these steps.</p> <li data-md> <p>Run <a data-link-type="dfn" href="#update-the-pending-layers-state" id="ref-for-update-the-pending-layers-state">update the pending layers state</a> with <var>session</var> and <var>newState</var>.</p> <li data-md> <p>Let <var>activeState</var> be <var>session</var>’s <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state②">active render state</a>.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state">pending render state</a> is <code>null</code>, set it to a copy of <var>activeState</var>.</p> <li data-md> <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthnear" id="ref-for-dom-xrrenderstateinit-depthnear①">depthNear</a></code> value is set, set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state①">pending render state</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear">depthNear</a></code> to <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthnear" id="ref-for-dom-xrrenderstateinit-depthnear②">depthNear</a></code>.</p> <li data-md> <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthfar" id="ref-for-dom-xrrenderstateinit-depthfar①">depthFar</a></code> value is set, set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state②">pending render state</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar">depthFar</a></code> to <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-depthfar" id="ref-for-dom-xrrenderstateinit-depthfar②">depthFar</a></code>.</p> <li data-md> <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-inlineverticalfieldofview" id="ref-for-dom-xrrenderstateinit-inlineverticalfieldofview②">inlineVerticalFieldOfView</a></code> is set, set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state③">pending render state</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview">inlineVerticalFieldOfView</a></code> to <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-inlineverticalfieldofview" id="ref-for-dom-xrrenderstateinit-inlineverticalfieldofview③">inlineVerticalFieldOfView</a></code>.</p> <li data-md> <p>If <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-baselayer" id="ref-for-dom-xrrenderstateinit-baselayer②">baseLayer</a></code> is set, set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state④">pending render state</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer">baseLayer</a></code> to <var>newState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstateinit-baselayer" id="ref-for-dom-xrrenderstateinit-baselayer③">baseLayer</a></code>.</p> </ol> </div> <div class="algorithm" data-algorithm="apply-pending-render-state"> <p>When requested, the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession③⑨">XRSession</a></code> <var>session</var> MUST <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="apply-the-pending-render-state">apply the pending render state</dfn> by running the following steps:</p> <ol> <li data-md> <p>Let <var>activeState</var> be <var>session</var>’s <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state③">active render state</a>.</p> <li data-md> <p>Let <var>newState</var> be <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state⑤">pending render state</a>.</p> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state⑥">pending render state</a> to <code>null</code>.</p> <li data-md> <p>Let <var>oldBaseLayer</var> be <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer①">baseLayer</a></code>.</p> <li data-md> <p>Let <var>oldLayers</var> be <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/webxrlayers-1/#dom-xrrenderstate-layers" id="ref-for-dom-xrrenderstate-layers">layers</a></code>.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①②">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p>Set <var>activeState</var> to <var>newState</var>.</p> <li data-md> <p>If <var>oldBaseLayer</var> is not equal to <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer②">baseLayer</a></code>, <var>oldLayers</var> is not equal to <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/webxrlayers-1/#dom-xrrenderstate-layers" id="ref-for-dom-xrrenderstate-layers①">layers</a></code>, or the dimensions of any of the layers have changed, <a data-link-type="dfn" href="#update-the-viewports" id="ref-for-update-the-viewports">update the viewports</a> for <var>session</var>.</p> <li data-md> <p>If <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview①">inlineVerticalFieldOfView</a></code> is less than <var>session</var>’s <a data-link-type="dfn" href="#minimum-inline-field-of-view" id="ref-for-minimum-inline-field-of-view">minimum inline field of view</a> set <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview②">inlineVerticalFieldOfView</a></code> to <var>session</var>’s <a data-link-type="dfn" href="#minimum-inline-field-of-view" id="ref-for-minimum-inline-field-of-view①">minimum inline field of view</a>.</p> <li data-md> <p>If <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview③">inlineVerticalFieldOfView</a></code> is greater than <var>session</var>’s <a data-link-type="dfn" href="#maximum-inline-field-of-view" id="ref-for-maximum-inline-field-of-view">maximum inline field of view</a> set <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview④">inlineVerticalFieldOfView</a></code> to <var>session</var>’s <a data-link-type="dfn" href="#maximum-inline-field-of-view" id="ref-for-maximum-inline-field-of-view①">maximum inline field of view</a>.</p> <li data-md> <p>If <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear①">depthNear</a></code> is less than <var>session</var>’s <a data-link-type="dfn" href="#minimum-near-clip-plane" id="ref-for-minimum-near-clip-plane①">minimum near clip plane</a> set <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear②">depthNear</a></code> to <var>session</var>’s <a data-link-type="dfn" href="#minimum-near-clip-plane" id="ref-for-minimum-near-clip-plane②">minimum near clip plane</a>.</p> <li data-md> <p>If <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar①">depthFar</a></code> is greater than <var>session</var>’s <a data-link-type="dfn" href="#maximum-far-clip-plane" id="ref-for-maximum-far-clip-plane①">maximum far clip plane</a> set <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar②">depthFar</a></code> to <var>session</var>’s <a data-link-type="dfn" href="#maximum-far-clip-plane" id="ref-for-maximum-far-clip-plane②">maximum far clip plane</a>.</p> <li data-md> <p>Let <var>baseLayer</var> be <var>activeState</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer③">baseLayer</a></code>.</p> <li data-md> <p>Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-composition-enabled" id="ref-for-xrrenderstate-composition-enabled">composition enabled</a> and <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas">output canvas</a> as follows:</p> <dl class="switch"> <dt data-md>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode①">mode</a> is <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑦">"inline"</a></code> and <var>baseLayer</var> is an instance of an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer">XRWebGLLayer</a></code> with <a data-link-type="dfn" href="#xrwebgllayer-composition-enabled" id="ref-for-xrwebgllayer-composition-enabled">composition enabled</a> set to <code>false</code>: <dd data-md> <p>Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-composition-enabled" id="ref-for-xrrenderstate-composition-enabled①">composition enabled</a> boolean to <code>false</code>.</p> <dd data-md> <p>Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas①">output canvas</a> to <var>baseLayer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context">context</a>'s <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext">canvas</a></code>.</p> <dt data-md>Otherwise: <dd data-md> <p>Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-composition-enabled" id="ref-for-xrrenderstate-composition-enabled②">composition enabled</a> boolean to <code>true</code>.</p> <dd data-md> <p>Set <var>activeState</var>’s <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas②">output canvas</a> to <code>null</code>.</p> </dl> </ol> </ol> </div> <div class="algorithm" data-algorithm="request-reference-space"> The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export id="dom-xrsession-requestreferencespace"><code>requestReferenceSpace(<var>type</var>)</code></dfn> method constructs a new <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②">XRReferenceSpace</a></code> of a given <var>type</var>, if possible. <p>When this method is invoked, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-new-promise" id="ref-for-a-new-promise④">a new Promise</a> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm⑤">relevant realm</a> of this <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⓪">XRSession</a></code>.</p> <li data-md> <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑥">in parallel</a>:</p> <ol> <li data-md> <p>If the result of running <a data-link-type="dfn" href="#reference-space-is-supported" id="ref-for-reference-space-is-supported">reference space is supported</a> for <var>type</var> and <var>session</var> is <code>false</code>, <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①③">queue a task</a> to <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject①①">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notsupportederror" id="ref-for-notsupportederror③">NotSupportedError</a></code> and abort these steps.</p> <li data-md> <p>Set up any platform resources required to track reference spaces of type <var>type</var>.</p> <div class="note" role="note">User agents need not wait for tracking to be established for such reference spaces to resolve <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestreferencespace" id="ref-for-dom-xrsession-requestreferencespace①">requestReferenceSpace()</a></code>. It is okay for <code class="idl"><a data-link-type="idl" href="#dom-xrframe-getviewerpose" id="ref-for-dom-xrframe-getviewerpose①">getViewerPose()</a></code> to return <code>null</code> when the session is initially attempting to establish tracking, and content can use this time to show a splash screen or something else. Note that if <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor③">"bounded-floor"</a></code>, and the bounds have not yet been established, user agents MAY set the bounds to a small initial area and use a <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset">reset</a></code> event when bounds are established.</div> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①④">Queue a task</a> to run the following steps:</p> <li data-md> <p><a data-link-type="dfn" href="#create-a-reference-space" id="ref-for-create-a-reference-space">Create a reference space</a>, <var>referenceSpace</var>, with <var>type</var> and <var>session</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve①⓪">Resolve</a> <var>promise</var> with <var>referenceSpace</var>.</p> </ol> <li data-md> <p>Return <var>promise</var>.</p> </ol> </div> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④①">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-active-xr-input-sources">list of active XR input sources</dfn> (a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list④">list</a> of <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource">XRInputSource</a></code>) and a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-active-xr-tracked-sources">list of active XR tracked sources</dfn> (a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑤">list</a> of <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①">XRInputSource</a></code>) which MUST both be initially an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑥">list</a>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④②">XRSession</a></code> has an <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-xr-device">XR device</dfn>, which is an <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①①">XR device</a> set at initialization.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-inputsources"><code>inputSources</code></dfn> attribute returns the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④③">XRSession</a></code>'s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources①">list of active XR input sources</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-trackedsources"><code>trackedSources</code></dfn> attribute returns the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④④">XRSession</a></code>'s <a data-link-type="dfn" href="#list-of-active-xr-tracked-sources" id="ref-for-list-of-active-xr-tracked-sources">list of active XR tracked sources</a>.</p> <p>The user agent MUST monitor any <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①">XR input source</a>s associated with the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①①">XR device</a>, including detecting when <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②">XR input source</a>s are added, removed, or changed.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑤">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-promise-resolved">promise resolved</dfn> flag, initially <code>false</code>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The purpose of this flag is to ensure that the <a data-link-type="dfn" href="#xrsession-add-input-source" id="ref-for-xrsession-add-input-source">add input source</a>, <a data-link-type="dfn" href="#xrsession-remove-input-source" id="ref-for-xrsession-remove-input-source">remove input source</a>, and <a data-link-type="dfn" href="#xrsession-change-input-source" id="ref-for-xrsession-change-input-source">change input source</a> algorithms do not run until the user code actually has had a chance to attach event listeners. Implementations may not need this flag if they simply choose to start listening for input source changes after the session resolves.</p> <div class="algorithm" data-algorithm="on-input-source-added"> <p>When <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-lt="add input source" data-noexport id="xrsession-add-input-source">new <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source③">XR input source</a>s become available</dfn> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑥">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-promise-resolved" id="ref-for-xrsession-promise-resolved①">promise resolved</a> flag is not set, abort these steps.</p> <li data-md> <p>Let <var>added primary sources</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑦">list</a>.</p> <li data-md> <p>Let <var>added tracked sources</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑧">list</a>.</p> <li data-md> <p>For each new <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source④">XR input source</a>:</p> <ol> <li data-md> <p>Let <var>inputSource</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①">new</a> <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②">XRInputSource</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm⑥">relevant realm</a> of this <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑦">XRSession</a></code>, then perform the following step:</p> <dl class="switch"> <dt data-md>If <var>inputSource</var> is a <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source">primary input source</a>: <dd data-md> <p>Add <var>inputSource</var> to <var>added primary sources</var>.</p> <dt data-md>Otherwise: <dd data-md> <p>Add <var>inputSource</var> to <var>added tracked sources</var>.</p> </dl> </ol> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①⑤">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-extend" id="ref-for-list-extend">Extend</a> <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources②">list of active XR input sources</a> with <var>added primary sources</var>.</p> <li data-md> <p>If <var>added primary sources</var> is not empty, fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent①">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange②">inputsourceschange</a></code> on <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added①">added</a></code> set to <var>added primary sources</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-extend" id="ref-for-list-extend①">Extend</a> <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-tracked-sources" id="ref-for-list-of-active-xr-tracked-sources①">list of active XR tracked sources</a> with <var>added tracked sources</var>.</p> <li data-md> <p>If <var>added tracked sources</var> is not empty, fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent②">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-trackedsourceschange" id="ref-for-eventdef-xrsession-trackedsourceschange">trackedsourceschange</a></code> on <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added②">added</a></code> set to <var>added tracked sources</var>.</p> </ol> </ol> </div> <div class="algorithm" data-algorithm="on-input-source-removed"> <p>When any previously added <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-lt="remove input source" data-noexport id="xrsession-remove-input-source"><a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑤">XR input source</a>s are no longer available</dfn> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑧">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-promise-resolved" id="ref-for-xrsession-promise-resolved②">promise resolved</a> flag is not set, abort these steps.</p> <li data-md> <p>Let <var>removed primary sources</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑨">list</a>.</p> <li data-md> <p>Let <var>removed tracked sources</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⓪">list</a>.</p> <li data-md> <p>For each <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑥">XR input source</a> that is no longer available:</p> <ol> <li data-md> <p>Let <var>inputSource</var> be the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③">XRInputSource</a></code> in <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources③">list of active XR input sources</a> associated with the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑦">XR input source</a>, then perform the following step:</p> <dl class="switch"> <dt data-md>If <var>inputSource</var> is a <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source①">primary input source</a>: <dd data-md> <p>Add <var>inputSource</var> to <var>removed primary sources</var>.</p> <dt data-md>Otherwise: <dd data-md> <p>Add <var>inputSource</var> to <var>removed tracked sources</var>.</p> </dl> </ol> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①⑥">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-remove" id="ref-for-list-remove">Remove</a> each <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource④">XRInputSource</a></code> in <var>removed primary sources</var> from <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources④">list of active XR input sources</a>.</p> <li data-md> <p>If <var>removed primary sources</var> is not empty, fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent③">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange③">inputsourceschange</a></code> on <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-removed" id="ref-for-dom-xrinputsourceschangeevent-removed">removed</a></code> set to <var>removed primary sources</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-remove" id="ref-for-list-remove①">Remove</a> each <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑤">XRInputSource</a></code> in <var>removed tracked sources</var> from <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-tracked-sources" id="ref-for-list-of-active-xr-tracked-sources②">list of active XR tracked sources</a>.</p> <li data-md> <p>If <var>removed tracked sources</var> is not empty, fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent④">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-trackedsourceschange" id="ref-for-eventdef-xrsession-trackedsourceschange①">trackedsourceschange</a></code> on <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-removed" id="ref-for-dom-xrinputsourceschangeevent-removed①">removed</a></code> set to <var>removed tracked sources</var>.</p> </ol> </ol> <p class="note" role="note"><span class="marker">Note:</span> The user agent MAY fire this event when an input source temporarily loses both position and orientation tracking. It is recommended that this only be done for physical handheld controller input sources. It is not recommended that this event be fired when this happens for tracked hand input sources, because this will happen often, nor is it recommended when this happens for tracker object input sources, since this makes it harder for the application to maintain a notion of identity.</p> </div> <div class="algorithm" data-algorithm="on-input-source-change"> <p>When the <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-export data-lt="change input source" id="xrsession-change-input-source"><code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-handedness" id="ref-for-dom-xrinputsource-handedness">handedness</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode">targetRayMode</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles">profiles</a></code>, presence of a <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace">gripSpace</a></code> or the status as a <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source②">primary input source</a> or <a data-link-type="dfn" href="#tracked-input-source" id="ref-for-tracked-input-source">tracked input source</a> for any <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑧">XR input source</a>s change</dfn> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession④⑨">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-promise-resolved" id="ref-for-xrsession-promise-resolved③">promise resolved</a> flag is not set, abort these steps.</p> <li data-md> <p>Let <var>added primary sources</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①①">list</a>.</p> <li data-md> <p>Let <var>removed primary sources</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①②">list</a>.</p> <li data-md> <p>Let <var>added tracked sources</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①③">list</a>.</p> <li data-md> <p>Let <var>removed tracked sources</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①④">list</a>.</p> <li data-md> <p>For each changed <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source⑨">XR input source</a>:</p> <ol> <li data-md> <p>Let <var>oldInputSource</var> be the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑥">XRInputSource</a></code> in <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑤">list of active XR input sources</a> previously associated with the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⓪">XR input source</a>, then perform the following step:</p> <dl class="switch"> <dt data-md>If <var>oldInputSource</var> is a <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source③">primary input source</a> or its state changed from a <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source④">primary input source</a> to <a data-link-type="dfn" href="#tracked-input-source" id="ref-for-tracked-input-source①">tracked input source</a> a: <dd data-md> <p>Add <var>oldInputSource</var> to <var>removed primary sources</var>.</p> <dt data-md>Otherwise: <dd data-md> <p>Add <var>oldInputSource</var> to <var>removed tracked sources</var>.</p> </dl> <li data-md> <p>Let <var>newInputSource</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②">new</a> <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑦">XRInputSource</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm⑦">relevant realm</a> of <var>session</var>, then perform the following step:</p> <dl class="switch"> <dt data-md>If <var>newInputSource</var> is a <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source⑤">primary input source</a> or its state changed from a <a data-link-type="dfn" href="#tracked-input-source" id="ref-for-tracked-input-source②">tracked input source</a> to <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source⑥">primary input source</a> : <dd data-md> <p>Add <var>newInputSource</var> to <var>added primary sources</var>.</p> <dt data-md>Otherwise: <dd data-md> <p>Add <var>newInputSource</var> to <var>added tracked sources</var>.</p> </dl> </ol> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①⑦">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-remove" id="ref-for-list-remove②">Remove</a> each <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑧">XRInputSource</a></code> in <var>removed primary sources</var> from <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑥">list of active XR input sources</a>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-extend" id="ref-for-list-extend②">Extend</a> <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑦">list of active XR input sources</a> with <var>added primary sources</var>.</p> <li data-md> <p>If <var>added primary sources</var> or <var>removed primary sources</var> are not empty, fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent⑤">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange④">inputsourceschange</a></code> on <var>session</var> with<code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added③">added</a></code> set to <var>added primary sources</var> and <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-removed" id="ref-for-dom-xrinputsourceschangeevent-removed②">removed</a></code> set to <var>removed primary sources</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-remove" id="ref-for-list-remove③">Remove</a> each <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource⑨">XRInputSource</a></code> in <var>removed tracked sources</var> from <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-tracked-sources" id="ref-for-list-of-active-xr-tracked-sources③">list of active XR tracked sources</a>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-extend" id="ref-for-list-extend③">Extend</a> <var>session</var>’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑧">list of active XR input sources</a> with <var>added tracked sources</var>.</p> <li data-md> <p>If <var>added tracked sources</var> or <var>removed tracked sources</var> are not empty, fire an <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent⑥">XRInputSourcesChangeEvent</a></code> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-trackedsourceschange" id="ref-for-eventdef-xrsession-trackedsourceschange②">trackedsourceschange</a></code> on <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added④">added</a></code> set to <var>added tracked sources</var> and <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceschangeevent-removed" id="ref-for-dom-xrinputsourceschangeevent-removed③">removed</a></code> set to <var>removed tracked sources</var>.</p> </ol> </ol> </div> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⓪">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-visibility-state">visibility state</dfn> value, which is an enum. For <a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session②">inline sessions</a> the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state①">visibility state</a> MUST mirror the <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#document" id="ref-for-document">Document</a></code>'s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#dom-document-visibilitystate" id="ref-for-dom-document-visibilitystate">visibilityState</a>. For <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑥">immersive sessions</a> the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state②">visibility state</a> MUST be set to whichever of the following values best matches the state of session.</p> <ul> <li data-md> <p>A state of <dfn class="dfn-paneled idl-code" data-dfn-for="XRVisibilityState" data-dfn-type="enum-value" data-export data-lt=""visible"|visible" id="dom-xrvisibilitystate-visible"><code>visible</code></dfn> indicates that imagery rendered by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤①">XRSession</a></code> can be seen by the user and <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe①">requestAnimationFrame()</a></code> callbacks are processed at the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①②">XR device</a>'s native refresh rate. Input is processed by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤②">XRSession</a></code> normally.</p> <li data-md> <p>A state of <dfn class="dfn-paneled idl-code" data-dfn-for="XRVisibilityState" data-dfn-type="enum-value" data-export data-lt=""visible-blurred"|visible-blurred" id="dom-xrvisibilitystate-visible-blurred"><code>visible-blurred</code></dfn> indicates that imagery rendered by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤③">XRSession</a></code> may be seen by the user, but is not the primary focus. <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe②">requestAnimationFrame()</a></code> callbacks MAY be <a data-link-type="dfn" href="#throttling" id="ref-for-throttling">throttled</a>. Input is not processed by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤④">XRSession</a></code>.</p> <li data-md> <p>A state of <dfn class="dfn-paneled idl-code" data-dfn-for="XRVisibilityState" data-dfn-type="enum-value" data-export data-lt=""hidden"|hidden" id="dom-xrvisibilitystate-hidden"><code>hidden</code></dfn> indicates that imagery rendered by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑤">XRSession</a></code> cannot be seen by the user. <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe③">requestAnimationFrame()</a></code> callbacks will not be processed until the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state③">visibility state</a> changes. Input is not processed by the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑥">XRSession</a></code>.</p> </ul> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-visibilitystate"><code>visibilityState</code></dfn> attribute returns the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑦">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state④">visibility state</a>. The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onvisibilitychange"><code>onvisibilitychange</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes①">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-visibilitychange" id="ref-for-eventdef-xrsession-visibilitychange">visibilitychange</a></code> event type.</p> <p>The <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state⑤">visibility state</a> MAY be changed by the user agent at any time other than during the processing of an <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame">XR animation frame</a>, and the user agent SHOULD monitor the XR platform when possible to observe when session visibility has been affected external to the user agent and update the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state⑥">visibility state</a> accordingly.</p> <p class="note" role="note"><span class="marker">Note:</span> The <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑧">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state⑦">visibility state</a> does not necessarily imply the visibility of the HTML document. Depending on the system configuration the page may continue to be visible while an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑦">immersive session</a> is active. (For example, a headset connected to a PC may continue to display the page on the monitor while the headset is viewing content from an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑧">immersive session</a>.) Developers should continue to rely on the <a href="https://html.spec.whatwg.org/multipage/interaction.html#page-visibility">Page Visibility</a> to determine page visibility.</p> <p class="note" role="note"><span class="marker">Note:</span> The <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑤⑨">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state⑧">visibility state</a> does not affect or restrict mouse behavior on tethered sessions where 2D content is still visible while an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session①⑨">immersive session</a> is active. Content should consider using the <a data-link-type="biblio" href="#biblio-pointerlock" title="Pointer Lock">[pointerlock]</a> API if it wishes to have stronger control over mouse behavior.</p> <p>In an <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①②">XRSystem</a></code>, there are several definitions which can describe a frame rate:</p> <ul> <li data-md> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="nominal-frame-rate">nominal frame rate</dfn>: the rate at which the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①③">XRSystem</a></code> is asking the experience to render frames to maintain nominal performance. Experiences that miss frames may not end up actually getting calls to <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe④">requestAnimationFrame()</a></code> this many times per second, but that is what the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①④">XRSystem</a></code> is aiming to achieve.</p> <li data-md> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="effective-frame-rate">effective frame rate</dfn>: a performance measurement of how many calls to <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑤">requestAnimationFrame()</a></code> the experience is actually managing to process each second. This will fluctuate based on the experience hitting or missing the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①⑤">XRSystem</a></code>'s frame timing.</p> <li data-md> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="target-frame-rate">target frame rate</dfn>: the experience’s hint to the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①⑥">XRSystem</a></code> on what <a data-link-type="dfn" href="#nominal-frame-rate" id="ref-for-nominal-frame-rate④">nominal frame rate</a> it prefers to target.</p> <li data-md> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="display-frame-rate">display frame rate</dfn>: the actual rate at which frames are drawn to the physical display, which MAY be derived from the experience’s <a data-link-type="dfn" href="#nominal-frame-rate" id="ref-for-nominal-frame-rate⑤">nominal frame rate</a>. This is a hardware implementation detail that is not exposed to the experience.</p> </ul> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⓪">XRSession</a></code> MAY have an <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-internal-target-framerate">internal target frameRate</dfn> which is the <a data-link-type="dfn" href="#target-frame-rate" id="ref-for-target-frame-rate①">target frame rate</a>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥①">XRSession</a></code> MAY have an <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-internal-nominal-framerate">internal nominal frameRate</dfn> which is the <a data-link-type="dfn" href="#nominal-frame-rate" id="ref-for-nominal-frame-rate⑥">nominal frame rate</a>. If the <a data-link-type="dfn" href="#effective-frame-rate" id="ref-for-effective-frame-rate">effective frame rate</a> is lower than the <a data-link-type="dfn" href="#nominal-frame-rate" id="ref-for-nominal-frame-rate⑦">nominal frame rate</a>, the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor②">XR Compositor</a> MAY use reprojection or other techniques to improve the experience. It is optional and MUST NOT be present for <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑧">inline</a></code> sessions.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-framerate"><code>frameRate</code></dfn> attribute reflects the <a data-link-type="dfn" href="#xrsession-internal-nominal-framerate" id="ref-for-xrsession-internal-nominal-framerate③">internal nominal framerate</a>. If the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥②">XRSession</a></code> has no <a data-link-type="dfn" href="#xrsession-internal-nominal-framerate" id="ref-for-xrsession-internal-nominal-framerate④">internal nominal framerate</a>, return <code>null</code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onframeratechange"><code>onframeratechange</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes②">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-frameratechange" id="ref-for-eventdef-xrsession-frameratechange①">frameratechange</a></code> event type. If <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥③">XRSession</a></code>'s <a data-link-type="dfn" href="#nominal-frame-rate" id="ref-for-nominal-frame-rate⑧">nominal frame rate</a> is changed for any reason, it MUST <a data-link-type="dfn" href="#apply-the-nominal-frame-rate" id="ref-for-apply-the-nominal-frame-rate①">apply the nominal frame rate</a> with the new nominal frame rate and the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥④">XRSession</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-supportedframerates"><code>supportedFrameRates</code></dfn> attribute returns a list of supported <a data-link-type="dfn" href="#target-frame-rate" id="ref-for-target-frame-rate②">target frame rate</a> values. This attribute is optional and MUST NOT be present for <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline⑨">inline</a></code> sessions or for an <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①⑦">XRSystem</a></code> that doesn’t let the author control the frame rate. If the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⑤">XRSession</a></code> supports the <code class="idl"><a data-link-type="idl" href="#dom-xrsession-supportedframerates" id="ref-for-dom-xrsession-supportedframerates②">supportedFrameRates</a></code> attribute, it also MUST support <code class="idl"><a data-link-type="idl" href="#dom-xrsession-framerate" id="ref-for-dom-xrsession-framerate①">frameRate</a></code>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⑥">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-viewer-reference-space">viewer reference space</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③">XRReferenceSpace</a></code> of type <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer①">"viewer"</a></code> with an <a data-link-type="dfn" href="#identity-transform" id="ref-for-identity-transform">identity transform</a> <a data-link-type="dfn" href="#xrspace-origin-offset" id="ref-for-xrspace-origin-offset">origin offset</a>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⑦">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-list-of-views">list of views</dfn>, which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑤">list</a> of <a data-link-type="dfn" href="#view" id="ref-for-view②">view</a>s corresponding to the views provided by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①③">XR device</a>. If the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⑧">XRSession</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate①">renderState</a></code>'s <a data-link-type="dfn" href="#xrrenderstate-composition-enabled" id="ref-for-xrrenderstate-composition-enabled③">composition enabled</a> boolean is set to <code>false</code> the <a data-link-type="dfn" href="#xrsession-list-of-views" id="ref-for-xrsession-list-of-views">list of views</a> MUST contain a single <a data-link-type="dfn" href="#view" id="ref-for-view③">view</a>. The <a data-link-type="dfn" href="#xrsession-list-of-views" id="ref-for-xrsession-list-of-views①">list of views</a> is immutable during the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑥⑨">XRSession</a></code> and MUST contain any <a data-link-type="dfn" href="#view" id="ref-for-view④">views</a> that may be surfaced during the session, including <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view">secondary views</a> that may not initially be <a data-link-type="dfn" href="#view-active" id="ref-for-view-active">active</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onend"><code>onend</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes③">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-end" id="ref-for-eventdef-xrsession-end①">end</a></code> event type.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-oninputsourceschange"><code>oninputsourceschange</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes④">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-inputsourceschange" id="ref-for-eventdef-xrsession-inputsourceschange⑤">inputsourceschange</a></code> event type.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onselectstart"><code>onselectstart</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑤">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-selectstart" id="ref-for-eventdef-xrsession-selectstart">selectstart</a></code> event type.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onselectend"><code>onselectend</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑥">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend">selectend</a></code> event type.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onselect"><code>onselect</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑦">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select">select</a></code> event type.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onsqueezestart"><code>onsqueezestart</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑧">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeezestart" id="ref-for-eventdef-xrsession-squeezestart">squeezestart</a></code> event type.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onsqueezeend"><code>onsqueezeend</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes⑨">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeezeend" id="ref-for-eventdef-xrsession-squeezeend">squeezeend</a></code> event type.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="attribute" data-export id="dom-xrsession-onsqueeze"><code>onsqueeze</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes①⓪">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeeze" id="ref-for-eventdef-xrsession-squeeze">squeeze</a></code> event type.</p> <h3 class="heading settled" data-level="4.2" id="xrrenderstate-interface"><span class="secno">4.2. </span><span class="content">XRRenderState</span><a class="self-link" href="#xrrenderstate-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate③">XRRenderState</a></code> represents a set of configurable values which affect how an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⓪">XRSession</a></code>'s output is composited. The <a data-link-type="dfn" href="#active-render-state" id="ref-for-active-render-state④">active render state</a> for a given <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦①">XRSession</a></code> can only change between frame boundaries, and updates can be queued up via <code class="idl"><a data-link-type="idl" href="#dom-xrsession-updaterenderstate" id="ref-for-dom-xrsession-updaterenderstate①">updateRenderState()</a></code>.</p> <pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrrenderstateinit"><code><c- g>XRRenderStateInit</c-></code></dfn> { <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderStateInit" data-dfn-type="dict-member" data-export data-type="double " id="dom-xrrenderstateinit-depthnear"><code><c- g>depthNear</c-></code></dfn>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double①"><c- b>double</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderStateInit" data-dfn-type="dict-member" data-export data-type="double " id="dom-xrrenderstateinit-depthfar"><code><c- g>depthFar</c-></code></dfn>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double②"><c- b>double</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderStateInit" data-dfn-type="dict-member" data-export data-type="double " id="dom-xrrenderstateinit-inlineverticalfieldofview"><code><c- g>inlineVerticalFieldOfView</c-></code></dfn>; <a data-link-type="idl-name" href="#xrwebgllayer" id="ref-for-xrwebgllayer①"><c- n>XRWebGLLayer</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderStateInit" data-dfn-type="dict-member" data-export data-type="XRWebGLLayer? " id="dom-xrrenderstateinit-baselayer"><code><c- g>baseLayer</c-></code></dfn>; <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence②"><c- b>sequence</c-></a><<a data-link-type="idl-name" href="#xrlayer" id="ref-for-xrlayer"><c- n>XRLayer</c-></a>>? <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderStateInit" data-dfn-type="dict-member" data-export data-type="sequence<XRLayer>? " id="dom-xrrenderstateinit-layers"><code><c- g>layers</c-></code></dfn>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext③"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed②"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrrenderstate"><code><c- g>XRRenderState</c-></code></dfn> { <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double③"><c- b>double</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="double" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear③"><c- g>depthNear</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double④"><c- b>double</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="double" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar③"><c- g>depthFar</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double⑤"><c- b>double</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="double?" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview⑤"><c- g>inlineVerticalFieldOfView</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrwebgllayer" id="ref-for-xrwebgllayer②"><c- n>XRWebGLLayer</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRWebGLLayer?" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer④"><c- g>baseLayer</c-></a>; }; </pre> <p>Each <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate④">XRRenderState</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRRenderState" data-dfn-type="dfn" data-noexport id="xrrenderstate-output-canvas">output canvas</dfn>, which is an <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/canvas.html#htmlcanvaselement" id="ref-for-htmlcanvaselement">HTMLCanvasElement</a></code> initially set to <code>null</code>. The <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas③">output canvas</a> is the DOM element that will display any content rendered for an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⓪">"inline"</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦②">XRSession</a></code>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑤">XRRenderState</a></code> also has a <dfn class="dfn-paneled" data-dfn-for="XRRenderState" data-dfn-type="dfn" data-noexport id="xrrenderstate-composition-enabled">composition enabled</dfn> boolean, which is initially <code>true</code>. The <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑥">XRRenderState</a></code> is considered to have <a data-link-type="dfn" href="#xrrenderstate-composition-enabled" id="ref-for-xrrenderstate-composition-enabled④">composition enabled</a> if rendering commands are performed against a surface provided by the API and displayed by the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor③">XR Compositor</a>. If rendering is performed for an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①①">"inline"</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦③">XRSession</a></code> in such a way that it is directly displayed into an <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas④">output canvas</a>, the <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑦">XRRenderState</a></code>'s <a data-link-type="dfn" href="#xrrenderstate-composition-enabled" id="ref-for-xrrenderstate-composition-enabled⑤">composition enabled</a> flag MUST be <code>false</code>.</p> <p class="note" role="note"><span class="marker">Note:</span> At this point the <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑧">XRRenderState</a></code> will only have an <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑤">output canvas</a> if it has <a data-link-type="dfn" href="#xrrenderstate-composition-enabled" id="ref-for-xrrenderstate-composition-enabled⑥">composition enabled</a> set to <code>false</code>, but future versions of the specification are likely to introduce methods for setting <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑥">output canvases</a> that support more advanced uses like mirroring and layer compositing that will require composition.</p> <div class="algorithm" data-algorithm="initialize-renderstate"> <p>When an <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate⑨">XRRenderState</a></code> object is created for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦④">XRSession</a></code> <var>session</var>, the user agent MUST <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="initialize-the-render-state">initialize the render state</dfn> by running the following steps:</p> <ol> <li data-md> <p>Let <var>state</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new③">new</a> <code class="idl"><a data-link-type="idl" href="#xrrenderstate" id="ref-for-xrrenderstate①⓪">XRRenderState</a></code> object in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm⑧">relevant realm</a> of <var>session</var>.</p> <li data-md> <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear④">depthNear</a></code> to <code>0.1</code>.</p> <li data-md> <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar④">depthFar</a></code> to <code>1000.0</code>.</p> <li data-md> <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview⑥">inlineVerticalFieldOfView</a></code> as follows:</p> <dl class="switch"> <dt data-md>If <var>session</var> is an <a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session③">inline session</a>: <dd data-md> <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview⑦">inlineVerticalFieldOfView</a></code> to <code>PI * 0.5</code>.</p> <dt data-md>Otherwise: <dd data-md> <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-inlineverticalfieldofview" id="ref-for-dom-xrrenderstate-inlineverticalfieldofview⑧">inlineVerticalFieldOfView</a></code> to <code>null</code>.</p> </dl> <li data-md> <p>Initialize <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer⑤">baseLayer</a></code> to <code>null</code>.</p> </ol> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderState" data-dfn-type="attribute" data-export id="dom-xrrenderstate-depthnear"><code>depthNear</code></dfn> attribute defines the distance, in meters, of the near clip plane from the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer②">viewer</a>. The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderState" data-dfn-type="attribute" data-export id="dom-xrrenderstate-depthfar"><code>depthFar</code></dfn> attribute defines the distance, in meters, of the far clip plane from the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer③">viewer</a>.</p> <p><code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear⑤">depthNear</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar⑤">depthFar</a></code> are used in the computation of the <code class="idl"><a data-link-type="idl" href="#dom-xrview-projectionmatrix" id="ref-for-dom-xrview-projectionmatrix">projectionMatrix</a></code> of <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview">XRView</a></code>s. When the <code class="idl"><a data-link-type="idl" href="#dom-xrview-projectionmatrix" id="ref-for-dom-xrview-projectionmatrix①">projectionMatrix</a></code> is used during rendering, only geometry with a distance to the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer④">viewer</a> that falls between <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear⑥">depthNear</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar⑥">depthFar</a></code> will be drawn. They also determine how the values of an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer③">XRWebGLLayer</a></code> depth buffer are interpreted. <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear⑦">depthNear</a></code> MAY be greater than <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar⑦">depthFar</a></code>.</p> <p class="note" role="note"><span class="marker">Note:</span> Typically when constructing a perspective projection matrix for rendering the developer specifies the viewing frustum and the near and far clip planes. When displaying to an <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②⓪">immersive XR device</a> the correct viewing frustum is determined by some combination of the optics, displays, and cameras being used. The near and far clip planes, however, may be modified by the application since the appropriate values depend on the type of content being rendered.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderState" data-dfn-type="attribute" data-export id="dom-xrrenderstate-inlineverticalfieldofview"><code>inlineVerticalFieldOfView</code></dfn> attribute defines the default vertical field of view in radians used when computing projection matrices for <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①②">"inline"</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑤">XRSession</a></code>s. The projection matrix calculation also takes into account the aspect ratio of the <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑦">output canvas</a>. This value MUST be <code>null</code> for <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②⓪">immersive sessions</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRenderState" data-dfn-type="attribute" data-export id="dom-xrrenderstate-baselayer"><code>baseLayer</code></dfn> attribute defines an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer④">XRWebGLLayer</a></code> which the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor④">XR compositor</a> will obtain images from.</p> <h3 class="heading settled" data-level="4.3" id="animation-frames"><span class="secno">4.3. </span><span class="content">Animation Frames</span><a class="self-link" href="#animation-frames"></a></h3> <p>The primary way an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑥">XRSession</a></code> provides information about the tracking state of the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①④">XR device</a> is via callbacks scheduled by calling <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑥">requestAnimationFrame()</a></code> on the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑦">XRSession</a></code> instance.</p> <pre class="idl highlight def"><c- b>callback</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="callback" data-export id="callbackdef-xrframerequestcallback"><code><c- g>XRFrameRequestCallback</c-></code></dfn> = <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined④"><c- b>undefined</c-></a> (<a data-link-type="idl-name" href="https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp" id="ref-for-dom-domhighrestimestamp"><c- n>DOMHighResTimeStamp</c-></a> <dfn class="idl-code" data-dfn-for="XRFrameRequestCallback" data-dfn-type="argument" data-export id="dom-xrframerequestcallback-time"><code><c- g>time</c-></code><a class="self-link" href="#dom-xrframerequestcallback-time"></a></dfn>, <a data-link-type="idl-name" href="#xrframe" id="ref-for-xrframe①"><c- n>XRFrame</c-></a> <dfn class="idl-code" data-dfn-for="XRFrameRequestCallback" data-dfn-type="argument" data-export id="dom-xrframerequestcallback-frame"><code><c- g>frame</c-></code><a class="self-link" href="#dom-xrframerequestcallback-frame"></a></dfn>); </pre> <p>Each <code class="idl"><a data-link-type="idl" href="#callbackdef-xrframerequestcallback" id="ref-for-callbackdef-xrframerequestcallback①">XRFrameRequestCallback</a></code> object has a <dfn class="dfn-paneled" data-dfn-for="XRFrameRequestCallback" data-dfn-type="dfn" data-noexport id="xrframerequestcallback-cancelled">cancelled</dfn> boolean initially set to <code>false</code>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑧">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-animation-frame-callbacks">list of animation frame callbacks</dfn>, which is initially empty, a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-currently-running-animation-frame-callbacks">list of currently running animation frame callbacks</dfn>, which is also initially empty, and an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="animation-frame-callback-identifier">animation frame callback identifier</dfn>, which is a number which is initially zero.</p> <div class="algorithm" data-algorithm="request-animation-frame"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export id="dom-xrsession-requestanimationframe"><code>requestAnimationFrame(<var>callback</var>)</code></dfn> method queues up <var>callback</var> for being run the next time the user agent wishes to run an animation frame for the device.</p> <p>When this method is invoked, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>session</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④">this</a>.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended⑤">ended</a> value is <code>true</code>, return <code>0</code> and abort these steps.</p> <li data-md> <p>Increment <var>session</var>’s <a data-link-type="dfn" href="#animation-frame-callback-identifier" id="ref-for-animation-frame-callback-identifier">animation frame callback identifier</a> by one.</p> <li data-md> <p>Append <var>callback</var> to <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks">list of animation frame callbacks</a>, associated with <var>session</var>’s <a data-link-type="dfn" href="#animation-frame-callback-identifier" id="ref-for-animation-frame-callback-identifier①">animation frame callback identifier</a>’s current value.</p> <li data-md> <p>Return <var>session</var>’s <a data-link-type="dfn" href="#animation-frame-callback-identifier" id="ref-for-animation-frame-callback-identifier②">animation frame callback identifier</a>’s current value.</p> </ol> </div> <div class="algorithm" data-algorithm="cancel-animation-frame"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="method" data-export id="dom-xrsession-cancelanimationframe"><code>cancelAnimationFrame(<var>handle</var>)</code></dfn> method cancels an existing animation frame callback given its <a data-link-type="dfn" href="#animation-frame-callback-identifier" id="ref-for-animation-frame-callback-identifier③">animation frame callback identifier</a> <var>handle</var>.</p> <p>When this method is invoked, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>session</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤">this</a>.</p> <li data-md> <p>Find the entry in <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks①">list of animation frame callbacks</a> or <var>session</var>’s <a data-link-type="dfn" href="#list-of-currently-running-animation-frame-callbacks" id="ref-for-list-of-currently-running-animation-frame-callbacks">list of currently running animation frame callbacks</a> that is associated with the value <var>handle</var>.</p> <li data-md> <p>If there is such an entry, set its <a data-link-type="dfn" href="#xrframerequestcallback-cancelled" id="ref-for-xrframerequestcallback-cancelled">cancelled</a> boolean to <code>true</code> and remove it from <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks②">list of animation frame callbacks</a>.</p> </ol> </div> <div class="algorithm" data-algorithm="check-layers-state"> To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="check-the-layers-state">check the layers state</dfn> with <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate②">renderState</a></code> <var>state</var>, the user agent MUST run the following steps: <ol> <li data-md> <p>If <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer⑥">baseLayer</a></code> is <code>null</code>, return <code>false</code>.</p> <li data-md> <p>return <code>true</code>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <a href="https://www.w3.org/TR/webxrlayers-1/">WebXR layers module</a> will introduce new semantics for this algorithm.</p> </div> <div class="algorithm" data-algorithm="should-be-rendered"> To determine if a frame <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="should-be-rendered">should be rendered</dfn> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑦⑨">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps: <ol> <li data-md> <p>If <a data-link-type="dfn" href="#check-the-layers-state" id="ref-for-check-the-layers-state">check the layers state</a> with <var>session</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate③">renderState</a></code> is <code>false</code>, return <code>false</code>.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode②">mode</a> is <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①③">"inline"</a></code> and <var>session</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate④">renderState</a></code>'s <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑧">output canvas</a> is <code>null</code>, return <code>false</code>.</p> <li data-md> <p>return <code>true</code>.</p> </ol> </div> <div class="algorithm" data-algorithm="run-animation-frames"> <p>When an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⓪">XRSession</a></code> <var>session</var> receives updated <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑤">viewer</a> state for timestamp <var>frameTime</var> from the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑤">XR device</a>, it runs an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="xr-animation-frame">XR animation frame</dfn>, which MUST run the following steps regardless of if the <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks③">list of animation frame callbacks</a> is empty or not:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①⑧">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p>Let <var>now</var> be the <a data-link-type="dfn" href="https://www.w3.org/TR/hr-time-3/#dfn-current-high-resolution-time" id="ref-for-dfn-current-high-resolution-time">current high resolution time</a>.</p> <li data-md> <p>Let <var>frame</var> be <var>session</var>’s <a data-link-type="dfn" href="#xrsession-animation-frame" id="ref-for-xrsession-animation-frame">animation frame</a>.</p> <li data-md> <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time">time</a> to <var>frameTime</var>.</p> <li data-md> <p>Set <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-predicteddisplaytime" id="ref-for-dom-xrframe-predicteddisplaytime">predictedDisplayTime</a></code> to <var>frameTime</var>.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode③">mode</a> is not <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①④">"inline"</a></code>, set <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-predicteddisplaytime" id="ref-for-dom-xrframe-predicteddisplaytime①">predictedDisplayTime</a></code> to the average timestamp the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor⑤">XR Compositor</a> is expected to display this <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame①">XR animation frame</a>.</p> <li data-md> <p>For each <var>view</var> in <a data-link-type="dfn" href="#xrsession-list-of-views" id="ref-for-xrsession-list-of-views②">list of views</a>, set <var>view</var>’s <a data-link-type="dfn" href="#view-viewport-modifiable" id="ref-for-view-viewport-modifiable">viewport modifiable</a> flag to true.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#view-active" id="ref-for-view-active①">active</a> flag of any <a data-link-type="dfn" href="#view" id="ref-for-view⑤">view</a> in the <a data-link-type="dfn" href="#xrsession-list-of-views" id="ref-for-xrsession-list-of-views③">list of views</a> has changed since the last <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame②">XR animation frame</a>, <a data-link-type="dfn" href="#update-the-viewports" id="ref-for-update-the-viewports①">update the viewports</a>.</p> <li data-md> <p>If the frame <a data-link-type="dfn" href="#should-be-rendered" id="ref-for-should-be-rendered">should be rendered</a> for <var>session</var>:</p> <ol> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#list-of-currently-running-animation-frame-callbacks" id="ref-for-list-of-currently-running-animation-frame-callbacks①">list of currently running animation frame callbacks</a> to be <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks④">list of animation frame callbacks</a>.</p> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#list-of-animation-frame-callbacks" id="ref-for-list-of-animation-frame-callbacks⑤">list of animation frame callbacks</a> to the empty list.</p> <li data-md> <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active①">active</a> boolean to <code>true</code>.</p> <li data-md> <p><a data-link-type="dfn" href="#xrframe-apply-frame-updates" id="ref-for-xrframe-apply-frame-updates">Apply frame updates</a> for <var>frame</var>.</p> <li data-md> <p>For each <var>entry</var> in <var>session</var>’s <a data-link-type="dfn" href="#list-of-currently-running-animation-frame-callbacks" id="ref-for-list-of-currently-running-animation-frame-callbacks②">list of currently running animation frame callbacks</a>, in order:</p> <li data-md> <p>If the <var>entry</var>’s <a data-link-type="dfn" href="#xrframerequestcallback-cancelled" id="ref-for-xrframerequestcallback-cancelled①">cancelled</a> boolean is <code>true</code>, continue to the next entry.</p> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#invoke-a-callback-function" id="ref-for-invoke-a-callback-function">Invoke</a> <var>entry</var> with « <var>now</var>, <var>frame</var> » and "<code>report</code>".</p> <li data-md> <p>Set <var>session</var>’s <a data-link-type="dfn" href="#list-of-currently-running-animation-frame-callbacks" id="ref-for-list-of-currently-running-animation-frame-callbacks③">list of currently running animation frame callbacks</a> to the empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑥">list</a>.</p> <li data-md> <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active②">active</a> boolean to <code>false</code>.</p> </ol> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#pending-render-state" id="ref-for-pending-render-state⑦">pending render state</a> is not <code>null</code>, <a data-link-type="dfn" href="#apply-the-pending-render-state" id="ref-for-apply-the-pending-render-state">apply the pending render state</a>.</p> </ol> </ol> </div> <p>The behavior of the <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#window" id="ref-for-window">Window</a></code> interface’s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe">requestAnimationFrame()</a></code> method is not changed by the presence of any active <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧①">XRSession</a></code>, nor does calling <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑦">requestAnimationFrame()</a></code> on any <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧②">XRSession</a></code> interact with <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#window" id="ref-for-window①">Window</a></code>'s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe①">requestAnimationFrame()</a></code> in any way. An <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session⑤">active immersive session</a> MAY affect the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#rendering-opportunity" id="ref-for-rendering-opportunity">rendering opportunity</a> of a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context">browsing context</a> if it causes the page to be obscured. If the 2D browser view is visible during an <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session⑥">active immersive session</a> (i.e., when the sesson is running on a tethered headset), the timing of callbacks run with <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#window" id="ref-for-window②">Window</a></code>'s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe②">requestAnimationFrame()</a></code> and <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/requestidlecallback/#the-requestidlecallback-method" id="ref-for-the-requestidlecallback-method">requestIdleCallback()</a></code> MAY NOT coincide with that of the session’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑧">requestAnimationFrame()</a></code> and should not be relied upon by the user for rendering XR content.</p> <p class="note" role="note"><span class="marker">Note:</span> User agents may wish to display a warning to the developer console if <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧③">XRSession</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe⑨">requestAnimationFrame()</a></code> is called during callbacks scheduled via <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#window" id="ref-for-window③">Window</a></code>'s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe③">requestAnimationFrame()</a></code>, as these callbacks are not guaranteed to occur if the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session⑦">active immersive session</a> affects the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#rendering-opportunity" id="ref-for-rendering-opportunity①">rendering opportunity</a> of the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context①">browsing context</a>, and may not have the correct timing even if they run.</p> <div class="example" id="example-ca659ad1"> <a class="self-link" href="#example-ca659ad1"></a> If an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②①">immersive session</a> prevents <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#rendering-opportunity" id="ref-for-rendering-opportunity②">rendering opportunities</a> then callbacks supplied to <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#window" id="ref-for-window④">Window</a></code> <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe④">requestAnimationFrame()</a></code> may not be processed while the session is active. This depends on the type of device being used and is most likely to happen depend on mobile or standalone devices where the immersive content completely obscures the HTML document. As such, developers must not rely on <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#window" id="ref-for-window⑤">Window</a></code> <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe" id="ref-for-dom-animationframeprovider-requestanimationframe⑤">requestAnimationFrame()</a></code> callbacks to schedule <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧④">XRSession</a></code> <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe①⓪">requestAnimationFrame()</a></code> callbacks and visa-versa, even if they share the same rendering logic. Applications that do not follow this guidance may not execute properly on all platforms. A more effective pattern for applications that wish to transition between these two types of animation loops is demonstrated below: <pre class="highlight"><c- a>let</c-> xrSession <c- o>=</c-> <c- kc>null</c-><c- p>;</c-> <c- a>function</c-> onWindowAnimationFrame<c- p>(</c->time<c- p>)</c-> <c- p>{</c-> window<c- p>.</c->requestAnimationFrame<c- p>(</c->onWindowAnimationFrame<c- p>);</c-> <c- c1>// This may be called while an immersive session is running on some devices,</c-> <c- c1>// such as a desktop with a tethered headset. To prevent two loops from</c-> <c- c1>// rendering in parallel, skip drawing in this one until the session ends.</c-> <c- k>if</c-> <c- p>(</c-><c- o>!</c->xrSession<c- p>)</c-> <c- p>{</c-> renderFrame<c- p>(</c->time<c- p>,</c-> <c- kc>null</c-><c- p>);</c-> <c- p>}</c-> <c- p>}</c-> <c- c1>// The window animation loop can be started immediately upon the page loading.</c-> window<c- p>.</c->requestAnimationFrame<c- p>(</c->onWindowAnimationFrame<c- p>);</c-> <c- a>function</c-> onXRAnimationFrame<c- p>(</c->time<c- p>,</c-> xrFrame<c- p>)</c-> <c- p>{</c-> xrSession<c- p>.</c->requestAnimationFrame<c- p>(</c->onXRAnimationFrame<c- p>);</c-> renderFrame<c- p>(</c->xrFrame<c- p>.</c->predictedDisplayTime<c- p>,</c-> xrFrame<c- p>);</c-> <c- p>}</c-> <c- a>function</c-> renderFrame<c- p>(</c->time<c- p>,</c-> xrFrame<c- p>)</c-> <c- p>{</c-> <c- c1>// Shared rendering logic.</c-> <c- p>}</c-> <c- c1>// Assumed to be called by a user gesture event elsewhere in code.</c-> <c- k>async</c-> <c- a>function</c-> startXRSession<c- p>()</c-> <c- p>{</c-> xrSession <c- o>=</c-> <c- k>await</c-> navigator<c- p>.</c->xr<c- p>.</c->requestSession<c- p>(</c-><c- t>'immersive-vr'</c-><c- p>);</c-> xrSession<c- p>.</c->addEventListener<c- p>(</c-><c- t>'end'</c-><c- p>,</c-> onXRSessionEnded<c- p>);</c-> <c- c1>// Do necessary session setup here.</c-> <c- c1>// Begin the session’s animation loop.</c-> xrSession<c- p>.</c->requestAnimationFrame<c- p>(</c->onXRAnimationFrame<c- p>);</c-> <c- p>}</c-> <c- a>function</c-> onXRSessionEnded<c- p>()</c-> <c- p>{</c-> xrSession <c- o>=</c-> <c- kc>null</c-><c- p>;</c-> <c- p>}</c-> </pre> <p>Applications which use <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⑤">"inline"</a></code> sessions for rendering to the HTML document do not need to take any special steps to coordinate the animation loops, since the user agent will automatically suspend the animation loops of any <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⑥">"inline"</a></code> sessions while an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②②">immersive session</a> is active.</p> </div> <h3 class="heading settled" data-level="4.4" id="compositor"><span class="secno">4.4. </span><span class="content">The XR Compositor</span><a class="self-link" href="#compositor"></a></h3> <p>The user agent MUST maintain an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="xr-compositor">XR Compositor</dfn> which handles presentation to the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑥">XR device</a> and frame timing. The compositor MUST use an independent rendering context whose state is isolated from that of any graphics contexts created by the document. The compositor MUST prevent the page from corrupting the compositor state or reading back content from other pages or applications. The compositor MUST also run in separate thread or processes to decouple performance of the page from the ability to present new imagery to the user at the appropriate framerate. The compositor MAY composite additional device or user agent UI over rendered content, like device menus.</p> <p class="note" role="note"><span class="marker">Note:</span> Future extensions to this spec may utilize the compositor to composite multiple layers coming from the same page as well.</p> <h2 class="heading settled" data-level="5" id="frame"><span class="secno">5. </span><span class="content">Frame Loop</span><a class="self-link" href="#frame"></a></h2> <h3 class="heading settled" data-level="5.1" id="xrframe-interface"><span class="secno">5.1. </span><span class="content">XRFrame</span><a class="self-link" href="#xrframe-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②">XRFrame</a></code> represents a snapshot of the state of all of the tracked objects for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⑤">XRSession</a></code>. Applications can acquire an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe③">XRFrame</a></code> by calling <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe①①">requestAnimationFrame()</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⑥">XRSession</a></code> with an <code class="idl"><a data-link-type="idl" href="#callbackdef-xrframerequestcallback" id="ref-for-callbackdef-xrframerequestcallback②">XRFrameRequestCallback</a></code>. When the callback is called it will be passed an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe④">XRFrame</a></code>. Events which need to communicate tracking state, such as the <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select①">select</a></code> event, will also provide an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑤">XRFrame</a></code>.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext④"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed③"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrframe"><code><c- g>XRFrame</c-></code></dfn> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject④"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession⑧⑦"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①"><c- g>session</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp" id="ref-for-dom-domhighrestimestamp①"><c- n>DOMHighResTimeStamp</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMHighResTimeStamp" href="#dom-xrframe-predicteddisplaytime" id="ref-for-dom-xrframe-predicteddisplaytime②"><c- g>predictedDisplayTime</c-></a>; <a data-link-type="idl-name" href="#xrviewerpose" id="ref-for-xrviewerpose"><c- n>XRViewerPose</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrframe-getviewerpose" id="ref-for-dom-xrframe-getviewerpose②"><c- g>getViewerPose</c-></a>(<a data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace④"><c- n>XRReferenceSpace</c-></a> <dfn class="idl-code" data-dfn-for="XRFrame/getViewerPose(referenceSpace)" data-dfn-type="argument" data-export id="dom-xrframe-getviewerpose-referencespace-referencespace"><code><c- g>referenceSpace</c-></code><a class="self-link" href="#dom-xrframe-getviewerpose-referencespace-referencespace"></a></dfn>); <a data-link-type="idl-name" href="#xrpose" id="ref-for-xrpose"><c- n>XRPose</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrframe-getpose" id="ref-for-dom-xrframe-getpose"><c- g>getPose</c-></a>(<a data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace"><c- n>XRSpace</c-></a> <dfn class="idl-code" data-dfn-for="XRFrame/getPose(space, baseSpace)" data-dfn-type="argument" data-export id="dom-xrframe-getpose-space-basespace-space"><code><c- g>space</c-></code><a class="self-link" href="#dom-xrframe-getpose-space-basespace-space"></a></dfn>, <a data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①"><c- n>XRSpace</c-></a> <dfn class="idl-code" data-dfn-for="XRFrame/getPose(space, baseSpace)" data-dfn-type="argument" data-export id="dom-xrframe-getpose-space-basespace-basespace"><code><c- g>baseSpace</c-></code><a class="self-link" href="#dom-xrframe-getpose-space-basespace-basespace"></a></dfn>); }; </pre> <p>Each <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑥">XRFrame</a></code> has an <dfn class="dfn-paneled" data-dfn-for="XRFrame" data-dfn-type="dfn" data-noexport id="xrframe-active">active</dfn> boolean which is initially set to <code>false</code>, and an <dfn class="dfn-paneled" data-dfn-for="XRFrame" data-dfn-type="dfn" data-noexport id="xrframe-animationframe">animationFrame</dfn> boolean which is initially set to <code>false</code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRFrame" data-dfn-type="attribute" data-export id="dom-xrframe-session"><code>session</code></dfn> attribute returns the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⑧">XRSession</a></code> that produced the <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑦">XRFrame</a></code>.</p> <p>For an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②③">immersive session</a> the <dfn class="dfn-paneled idl-code" data-dfn-for="XRFrame" data-dfn-type="attribute" data-export id="dom-xrframe-predicteddisplaytime"><code>predictedDisplayTime</code></dfn> attribute MUST return the <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp" id="ref-for-dom-domhighrestimestamp②">DOMHighResTimeStamp</a></code> corresponding to the average point in time this <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑧">XRFrame</a></code> is expected to be displayed on the devices' display. For an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⑦">"inline"</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑧⑨">XRSession</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrframe-predicteddisplaytime" id="ref-for-dom-xrframe-predicteddisplaytime③">predictedDisplayTime</a></code> MUST return the same value as the timestamp passed to the <code class="idl"><a data-link-type="idl" href="#callbackdef-xrframerequestcallback" id="ref-for-callbackdef-xrframerequestcallback③">XRFrameRequestCallback</a></code>.</p> <div class="note" role="note"> The <code class="idl"><a data-link-type="idl" href="#dom-xrframe-predicteddisplaytime" id="ref-for-dom-xrframe-predicteddisplaytime④">predictedDisplayTime</a></code> is intended to allow rendering an animated XR scene in the state that it should be in when the frame is displayed rather than when the <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe①②">requestAnimationFrame()</a></code> callback was scheduled or when it was executed. <p>The <code class="idl"><a data-link-type="idl" href="#dom-xrframe-predicteddisplaytime" id="ref-for-dom-xrframe-predicteddisplaytime⑤">predictedDisplayTime</a></code> is not intended be used to infer how much time the application has for rendering, as the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor⑥">XR Compositor</a> typically has to do extra processing after the frame is submitted. If the experience assumes that it can process up to <code class="idl"><a data-link-type="idl" href="#dom-xrframe-predicteddisplaytime" id="ref-for-dom-xrframe-predicteddisplaytime⑥">predictedDisplayTime</a></code>, the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor⑦">XR Compositor</a> will not be able to make use of the submitted frames, and the application would not make target framerate.</p> </div> <p>Each <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe⑨">XRFrame</a></code> represents the state of all tracked objects for a given <dfn class="dfn-paneled" data-dfn-for="XRFrame" data-dfn-type="dfn" data-noexport id="xrframe-time">time</dfn>, and either stores or is able to query concrete information about this state at the <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time①">time</a>.</p> <div class="algorithm" data-algorithm="get-viewer-pose"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRFrame" data-dfn-type="method" data-export id="dom-xrframe-getviewerpose"><code>getViewerPose(<var>referenceSpace</var>)</code></dfn> method provides the pose of the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑥">viewer</a> relative to <var>referenceSpace</var> as an <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose①">XRViewerPose</a></code>, at the <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⓪">XRFrame</a></code>'s <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time②">time</a>.</p> <p>When this method is invoked, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥">this</a>.</p> <li data-md> <p>Let <var>session</var> be <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session②">session</a></code> object.</p> <li data-md> <p>If <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-animationframe" id="ref-for-xrframe-animationframe①">animationFrame</a> boolean is <code>false</code>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror⑧">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>Let <var>pose</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new④">new</a> <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose②">XRViewerPose</a></code> object in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm⑨">relevant realm</a> of <var>session</var>.</p> <li data-md> <p><a data-link-type="dfn" href="#populate-the-pose" id="ref-for-populate-the-pose">Populate the pose</a> of <var>session</var>’s <a data-link-type="dfn" href="#xrsession-viewer-reference-space" id="ref-for-xrsession-viewer-reference-space">viewer reference space</a> in <var>referenceSpace</var> at the time represented by <var>frame</var> into <var>pose</var>, with <code>force emulation</code> set to <code>true</code>.</p> <li data-md> <p>If <var>pose</var> is <code>null</code> return <code>null</code>.</p> <li data-md> <p>Let <var>xrviews</var> be an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑦">list</a>.</p> <li data-md> <p>For each <a data-link-type="dfn" href="#view-active" id="ref-for-view-active②">active</a> <a data-link-type="dfn" href="#view" id="ref-for-view⑥">view</a> <var>view</var> in the <a data-link-type="dfn" href="#xrsession-list-of-views" id="ref-for-xrsession-list-of-views④">list of views</a> on <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session③">session</a></code>, perform the following steps:</p> <ol> <li data-md> <p>Let <var>xrview</var> be a new <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①">XRView</a></code> object in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①⓪">relevant realm</a> of <var>session</var>.</p> <li data-md> <p>Initialize <var>xrview</var>’s <a data-link-type="dfn" href="#xrview-underlying-view" id="ref-for-xrview-underlying-view">underlying view</a> to <var>view</var>.</p> <li data-md> <p>Initialize <var>xrview</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrview-eye" id="ref-for-dom-xrview-eye">eye</a></code> to <var>view</var>’s <a data-link-type="dfn" href="#view-eye" id="ref-for-view-eye">eye</a>.</p> <li data-md> <p>Initialize <var>xrview</var>’s <a data-link-type="dfn" href="#xrview-frame" id="ref-for-xrview-frame">frame</a> to <var>frame</var>.</p> <li data-md> <p>Initialize <var>xrview</var>’s <a data-link-type="dfn" href="#xrview-session" id="ref-for-xrview-session">session</a> to <var>session</var>.</p> <li data-md> <p>Let <var>offset</var> be an <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new⑤">new</a> <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform">XRRigidTransform</a></code> object equal to the <a data-link-type="dfn" href="#view-offset" id="ref-for-view-offset">view offset</a> of <var>view</var> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①①">relevant realm</a> of <var>session</var>.</p> <li data-md> <p>Set <var>xrview</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrview-transform" id="ref-for-dom-xrview-transform">transform</a></code> property to the result of <a data-link-type="dfn" href="#multiply-transforms" id="ref-for-multiply-transforms">multiplying</a> the <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose③">XRViewerPose</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform">transform</a></code> by the <var>offset</var> transform in the relevant realm of <var>session</var></p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append">Append</a> <var>xrview</var> to <var>xrviews</var></p> </ol> <li data-md> <p>Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views">views</a></code> to <var>xrviews</var></p> <li data-md> <p>Return <var>pose</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="get-pose"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRFrame" data-dfn-type="method" data-export id="dom-xrframe-getpose"><code>getPose(<var>space</var>, <var>baseSpace</var>)</code></dfn> method provides the pose of <var>space</var> relative to <var>baseSpace</var> as an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose①">XRPose</a></code>, at the time represented by the <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①①">XRFrame</a></code>.</p> <p>When this method is invoked, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦">this</a>.</p> <li data-md> <p>Let <var>pose</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new⑥">new</a> <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose②">XRPose</a></code> object in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①②">relevant realm</a> of <var>frame</var>.</p> <li data-md> <p><a data-link-type="dfn" href="#populate-the-pose" id="ref-for-populate-the-pose①">Populate the pose</a> of <var>space</var> in <var>baseSpace</var> at the time represented by <var>frame</var> into <var>pose</var>.</p> <li data-md> <p>Return <var>pose</var>.</p> </ol> </div> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="frame-update">frame update</dfn> is an algorithm that can be run given an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①②">XRFrame</a></code>, which is intended to be run each <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①③">XRFrame</a></code>.</p> <p>Every <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⓪">XRSession</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-list-of-frame-updates">list of frame updates</dfn>, which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑧">list</a> of <a data-link-type="dfn" href="#frame-update" id="ref-for-frame-update">frame updates</a>, initially the empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①⑨">list</a>.</p> <div class="algorithm" data-algorithm="apply-frame-updates"> <p>To <dfn class="dfn-paneled" data-dfn-for="XRFrame" data-dfn-type="dfn" data-noexport id="xrframe-apply-frame-updates">apply frame updates</dfn> for an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①④">XRFrame</a></code> <var>frame</var>, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>For each <var>frame update</var> in <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session④">session</a></code>'s <a data-link-type="dfn" href="#xrsession-list-of-frame-updates" id="ref-for-xrsession-list-of-frame-updates">list of frame updates</a>, perform the following steps:</p> <ol> <li data-md> <p>Run <var>frame update</var> with <var>frame</var>.</p> </ol> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> This spec does not define any <a data-link-type="dfn" href="#frame-update" id="ref-for-frame-update①">frame updates</a>, but other specifications may add some.</p> <h2 class="heading settled" data-level="6" id="spaces"><span class="secno">6. </span><span class="content">Spaces</span><a class="self-link" href="#spaces"></a></h2> <p>A core feature of the WebXR Device API is the ability to provide spatial tracking. Spaces are the interface that enable applications to reason about how tracked entities are spatially related to the user’s physical environment and each other.</p> <h3 class="heading settled" data-level="6.1" id="xrspace-interface"><span class="secno">6.1. </span><span class="content">XRSpace</span><a class="self-link" href="#xrspace-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace②">XRSpace</a></code> represents a virtual coordinate system with an origin that corresponds to a physical location. Spatial data that is requested from the API or given to the API is always expressed in relation to a specific <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace③">XRSpace</a></code> at the time of a specific <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑤">XRFrame</a></code>. Numeric values such as pose positions are coordinates in that space relative to its origin. The interface is intentionally opaque.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext⑤"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed④"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrspace"><code><c- g>XRSpace</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget②"><c- n>EventTarget</c-></a> { }; </pre> <p>Each <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace④">XRSpace</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-session">session</dfn> which is set to the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨①">XRSession</a></code> that created the <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑤">XRSpace</a></code>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑥">XRSpace</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-native-origin">native origin</dfn> which is a position and orientation in space. The <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑦">XRSpace</a></code>'s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin">native origin</a> may be updated by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑦">XR device</a>'s underlying tracking system, and different <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑧">XRSpace</a></code>s may define different semantics as to how their <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①">native origins</a> are tracked and updated.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace⑨">XRSpace</a></code> has an <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-effective-origin">effective origin</dfn>, which is the basis of the <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①⓪">XRSpace</a></code>'s <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-coordinate-system">coordinate system</dfn>.</p> <p>The transform from the effective space to the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin②">native origin</a>'s space is defined by an <dfn class="dfn-paneled" data-dfn-for="XRSpace" data-dfn-type="dfn" data-noexport id="xrspace-origin-offset">origin offset</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①">XRRigidTransform</a></code> initially set to an <a data-link-type="dfn" href="#identity-transform" id="ref-for-identity-transform①">identity transform</a>. In other words, the <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin">effective origin</a> can be obtained by <a data-link-type="dfn" href="#multiply-transforms" id="ref-for-multiply-transforms①">multiplying</a> <a data-link-type="dfn" href="#xrspace-origin-offset" id="ref-for-xrspace-origin-offset①">origin offset</a> and the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin③">native origin</a>.</p> <p>The <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin①">effective origin</a> of an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①①">XRSpace</a></code> can only be observed in the coordinate system of another <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①②">XRSpace</a></code> as an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose③">XRPose</a></code>, returned by an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑥">XRFrame</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-getpose" id="ref-for-dom-xrframe-getpose①">getPose()</a></code> method. The spatial relationship between <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①③">XRSpace</a></code>s MAY change between <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑦">XRFrame</a></code>s.</p> <div class="algorithm" data-algorithm="populate-the-pose"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="populate-the-pose">populate the pose</dfn> of an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①④">XRSpace</a></code> <var>space</var> in an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①⑤">XRSpace</a></code> <var>baseSpace</var> at the time represented by an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑧">XRFrame</a></code> <var>frame</var> into an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose④">XRPose</a></code> <var>pose</var>, with an optional <var>force emulation</var> flag, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active③">active</a> boolean is <code>false</code>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror⑨">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>Let <var>session</var> be <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑤">session</a></code> object.</p> <li data-md> <p>If <var>space</var>’s <a data-link-type="dfn" href="#xrspace-session" id="ref-for-xrspace-session">session</a> does not equal <var>session</var>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①⓪">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>If <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-session" id="ref-for-xrspace-session①">session</a> does not equal <var>session</var>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①①">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>Check if <a data-link-type="dfn" href="#poses-may-be-reported" id="ref-for-poses-may-be-reported">poses may be reported</a> and, if not, throw a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#securityerror" id="ref-for-securityerror③">SecurityError</a></code> and abort these steps.</p> <li data-md> <p>If <var>session</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-visibilitystate" id="ref-for-dom-xrsession-visibilitystate①">visibilityState</a></code> is <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-visible-blurred" id="ref-for-dom-xrvisibilitystate-visible-blurred③">"visible-blurred"</a></code> and <var>space</var> or <var>baseSpace</var> is associated with an <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①⓪">XRInputSource</a></code>, set <var>pose</var> to <code>null</code> and abort these steps.</p> <li data-md> <p>Let <var>limit</var> be the result of whether <a data-link-type="dfn" href="#poses-must-be-limited" id="ref-for-poses-must-be-limited">poses must be limited</a> between <var>space</var> and <var>baseSpace</var>.</p> <li data-md> <p>Let <var>transform</var> be <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform①">transform</a></code>.</p> <li data-md> <p>Query the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①②">XR device</a>'s tracking system for <var>space</var>’s pose relative to <var>baseSpace</var> at the <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time③">time</a>, then perform the following steps:</p> <dl class="switch"> <dt data-md>If <var>limit</var> is <code>false</code> and the tracking system provides a <a data-link-type="dfn" href="#6dof" id="ref-for-6dof②">6DoF</a> pose whose position is actively tracked or statically known for <var>space</var>’s pose relative to <var>baseSpace</var>: <dd data-md> <p>Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation">orientation</a></code> to the orientation of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin②">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system">coordinate system</a>.</p> <dd data-md> <p>Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position">position</a></code> to the position of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin③">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system①">coordinate system</a>.</p> <dd data-md> <p>If supported, set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-linearvelocity" id="ref-for-dom-xrpose-linearvelocity">linearVelocity</a></code> to the linear velocity of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin④">effective origin</a> compared to <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system②">coordinate system</a>.</p> <dd data-md> <p>If supported, set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-angularvelocity" id="ref-for-dom-xrpose-angularvelocity">angularVelocity</a></code> to the angular velocity of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑤">effective origin</a> compared to <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system③">coordinate system</a>.</p> <dd data-md> <p>Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition">emulatedPosition</a></code> to <code>false</code>.</p> <dt data-md>Else if <var>limit</var> is <code>false</code> and the tracking system provides a <a data-link-type="dfn" href="#3dof" id="ref-for-3dof②">3DoF</a> pose or a <a data-link-type="dfn" href="#6dof" id="ref-for-6dof③">6DoF</a> pose whose position is neither actively tracked nor statically known for <var>space</var>’s pose relative to <var>baseSpace</var>: <dd data-md> <p>Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①">orientation</a></code> to the orientation of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑥">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system④">coordinate system</a>.</p> <dd data-md> <p>Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①">position</a></code> to the tracking system’s best estimate of the position of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑦">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system⑤">coordinate system</a>. This MAY include a computed offset such as a neck or arm model. If a position estimate is not available, the last known position MUST be used.</p> <dd data-md> <p>Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-linearvelocity" id="ref-for-dom-xrpose-linearvelocity①">linearVelocity</a></code> to <code>null</code>.</p> <dd data-md> <p>Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-angularvelocity" id="ref-for-dom-xrpose-angularvelocity①">angularVelocity</a></code> to <code>null</code>.</p> <dd data-md> <p>Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition①">emulatedPosition</a></code> to <code>true</code>.</p> <dt data-md>Else if <var>space</var>’s pose relative to <var>baseSpace</var> has been determined in the past and <var>force emulation</var> is <code>true</code>: <dd data-md> <p>Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position②">position</a></code> to the last known position of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑧">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system⑥">coordinate system</a>.</p> <dd data-md> <p>Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation②">orientation</a></code> to the last known orientation of <var>space</var>’s <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin⑨">effective origin</a> in <var>baseSpace</var>’s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system⑦">coordinate system</a>.</p> <dd data-md> <p>Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-linearvelocity" id="ref-for-dom-xrpose-linearvelocity②">linearVelocity</a></code> to <code>null</code>.</p> <dd data-md> <p>Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-angularvelocity" id="ref-for-dom-xrpose-angularvelocity②">angularVelocity</a></code> to <code>null</code>.</p> <dd data-md> <p>Set <var>pose</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition②">emulatedPosition</a></code> boolean to <code>true</code>.</p> <dt data-md>Otherwise: <dd data-md> <p>Set <var>pose</var> to <code>null</code>.</p> </dl> </ol> <p class="note" role="note"><span class="marker">Note:</span> The <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑤">XRPose</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition③">emulatedPosition</a></code> boolean does not indicate whether <var>baseSpace</var>’s position is emulated or not, only whether evaluating <var>space</var>’s position relative to <var>baseSpace</var> relies on emulation. For example, a controller with <a data-link-type="dfn" href="#3dof" id="ref-for-3dof③">3DoF</a> tracking would report poses with an <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition④">emulatedPosition</a></code> of <code>true</code> when its <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetrayspace" id="ref-for-dom-xrinputsource-targetrayspace">targetRaySpace</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace①">gripSpace</a></code> are queried against an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace⑤">XRReferenceSpace</a></code>, but would report an <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition⑤">emulatedPosition</a></code> of <code>false</code> if the pose of the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetrayspace" id="ref-for-dom-xrinputsource-targetrayspace①">targetRaySpace</a></code> was queried in <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace②">gripSpace</a></code>, because the relationship between those two spaces should be known exactly.</p> </div> <h3 class="heading settled" data-level="6.2" id="xrreferencespace-interface"><span class="secno">6.2. </span><span class="content">XRReferenceSpace</span><a class="self-link" href="#xrreferencespace-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace⑥">XRReferenceSpace</a></code> is one of several common <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①⑥">XRSpace</a></code>s that applications can use to establish a spatial relationship with the user’s physical environment.</p> <p><code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace⑦">XRReferenceSpace</a></code>s are generally expected to remain static for the duration of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨②">XRSession</a></code>, with the most common exception being mid-session reconfiguration by the user. The <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin④">native origin</a> for every <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace⑧">XRReferenceSpace</a></code> describes a coordinate system where <code>+X</code> is considered "Right", <code>+Y</code> is considered "Up", and <code>-Z</code> is considered "Forward".</p> <pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrreferencespacetype"><code><c- g>XRReferenceSpaceType</c-></code></dfn> { <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer②"><c- s>"viewer"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local③"><c- s>"local"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor①"><c- s>"local-floor"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor④"><c- s>"bounded-floor"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded①"><c- s>"unbounded"</c-></a> }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext⑥"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed⑤"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrreferencespace"><code><c- g>XRReferenceSpace</c-></code></dfn> : <a data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace①⑦"><c- n>XRSpace</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject" id="ref-for-NewObject②"><c- g>NewObject</c-></a>] <a data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace⑨"><c- n>XRReferenceSpace</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace"><c- g>getOffsetReferenceSpace</c-></a>(<a data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②"><c- n>XRRigidTransform</c-></a> <dfn class="idl-code" data-dfn-for="XRReferenceSpace/getOffsetReferenceSpace(originOffset)" data-dfn-type="argument" data-export id="dom-xrreferencespace-getoffsetreferencespace-originoffset-originoffset"><code><c- g>originOffset</c-></code><a class="self-link" href="#dom-xrreferencespace-getoffsetreferencespace-originoffset-originoffset"></a></dfn>); <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①①"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrreferencespace-onreset" id="ref-for-dom-xrreferencespace-onreset"><c- g>onreset</c-></a>; }; </pre> <p>Each <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⓪">XRReferenceSpace</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRReferenceSpace" data-dfn-type="dfn" data-noexport id="xrreferencespace-type">type</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype②">XRReferenceSpaceType</a></code>.</p> <p>An <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①①">XRReferenceSpace</a></code> is most frequently obtained by calling <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestreferencespace" id="ref-for-dom-xrsession-requestreferencespace②">requestReferenceSpace()</a></code>, which creates an instance of an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①②">XRReferenceSpace</a></code> (or an interface extending it) if the <code class="idl"><a data-link-type="idl" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype③">XRReferenceSpaceType</a></code> enum value passed into the call <a data-link-type="dfn" href="#reference-space-is-supported" id="ref-for-reference-space-is-supported①">is supported</a>. The type indicates the tracking behavior that the reference space will exhibit:</p> <ul> <li data-md> <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt=""viewer"|viewer" id="dom-xrreferencespacetype-viewer"><code>viewer</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①③">XRReferenceSpace</a></code> instance. It represents a tracking space with a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑤">native origin</a> which tracks the position and orientation of the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑦">viewer</a>. Every <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨③">XRSession</a></code> MUST support <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer③">"viewer"</a></code> <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①④">XRReferenceSpace</a></code>s.</p> <li data-md> <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt=""local"|local" id="dom-xrreferencespacetype-local"><code>local</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑤">XRReferenceSpace</a></code> instance. It represents a tracking space with a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑥">native origin</a> near the viewer at the time of creation. The exact position and orientation will be initialized based on the conventions of the underlying platform. When using this reference space the user is not expected to move beyond their initial position much, if at all, and tracking is optimized for that purpose. For devices with <a data-link-type="dfn" href="#6dof" id="ref-for-6dof④">6DoF</a> tracking, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local④">local</a></code> reference spaces should emphasize keeping the origin stable relative to the user’s environment.</p> <li data-md> <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt=""local-floor"|local-floor" id="dom-xrreferencespacetype-local-floor"><code>local-floor</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑥">XRReferenceSpace</a></code> instance. It represents a tracking space with a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑦">native origin</a> at the floor in a safe position for the user to stand. The <code>Y</code> axis equals <code>0</code> at floor level, with the <code>X</code> and <code>Z</code> position and orientation initialized based on the conventions of the underlying platform. If the floor level isn’t known it MUST be estimated, with some <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="estimated-floor-level">estimated floor level</dfn>. If the <a data-link-type="dfn" href="#estimated-floor-level" id="ref-for-estimated-floor-level">estimated floor level</a> is determined with a non-default value, it MUST be <a data-link-type="dfn" href="#rounding" id="ref-for-rounding">rounded</a> sufficiently to prevent fingerprinting. When using this reference space the user is not expected to move beyond their initial position much, if at all, and tracking is optimized for that purpose. For devices with <a data-link-type="dfn" href="#6dof" id="ref-for-6dof⑤">6DoF</a> tracking, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor②">local-floor</a></code> reference spaces should emphasize keeping the origin stable relative to the user’s environment.</p> <p class="note" role="note"><span class="marker">Note:</span> If the floor level of a <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor③">"local-floor"</a></code> reference space is adjusted to prevent fingerprinting, <a data-link-type="dfn" href="#rounding" id="ref-for-rounding①">rounded</a> to the nearest 1cm is suggested.</p> <li data-md> <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt=""bounded-floor"|bounded-floor" id="dom-xrreferencespacetype-bounded-floor"><code>bounded-floor</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace">XRBoundedReferenceSpace</a></code> instance. It represents a tracking space with its <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑧">native origin</a> at the floor, where the user is expected to move within a pre-established boundary, given as the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry">boundsGeometry</a></code>. Tracking in a <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑤">bounded-floor</a></code> reference space is optimized for keeping the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin⑨">native origin</a> and <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry①">boundsGeometry</a></code> stable relative to the user’s environment.</p> <li data-md> <p>Passing a type of <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceType" data-dfn-type="enum-value" data-export data-lt=""unbounded"|unbounded" id="dom-xrreferencespacetype-unbounded"><code>unbounded</code></dfn> creates an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑦">XRReferenceSpace</a></code> instance. It represents a tracking space where the user is expected to move freely around their environment, potentially even long distances from their starting point. Tracking in an <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded②">unbounded</a></code> reference space is optimized for stability around the user’s current position, and as such the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⓪">native origin</a> may drift over time.</p> </ul> <p class="note" role="note"><span class="marker">Note:</span> It is assumed that the conventions of the underlying platform regarding Y axes of the reference spaces stay consistent across different types of <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑧">XRReferenceSpace</a></code>s. In other words, if an XR system supports multiple reference spaces, their Y axes will be parallel to each other and point in the same direction for the duration of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨④">XRSession</a></code> in which they were created. This does not apply to <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer④">"viewer"</a></code>, which does not rely on the conventions of the underlying platform for its orientation. <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded③">"unbounded"</a></code> reference spaces should align their Y axes with other reference spaces when their origins are nearby, but may deviate if the user moves over large distances.</p> <p>Devices that support <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑤">"local"</a></code> reference spaces MUST support <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor④">"local-floor"</a></code> reference spaces, through emulation if necessary, and vice versa.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpace" data-dfn-type="attribute" data-export id="dom-xrreferencespace-onreset"><code>onreset</code></dfn> attribute is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes" id="ref-for-event-handler-idl-attributes①①">Event handler IDL attribute</a> for the <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset①">reset</a></code> event type.</p> <div class="algorithm" data-algorithm="create-reference-space"> <p>When an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace①⑨">XRReferenceSpace</a></code> is requested with <code class="idl"><a data-link-type="idl" href="#enumdef-xrreferencespacetype" id="ref-for-enumdef-xrreferencespacetype④">XRReferenceSpaceType</a></code> <var>type</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑤">XRSession</a></code> <var>session</var>, the user agent MUST <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-a-reference-space">create a reference space</dfn> by running the following steps:</p> <ol> <li data-md> <p>Initialize <var>referenceSpace</var> as follows:</p> <dl class="switch"> <dt data-md>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑥">bounded-floor</a></code>: <dd data-md> <p>Let <var>referenceSpace</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new⑦">new</a> <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①">XRBoundedReferenceSpace</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①③">relevant realm</a> of <var>session</var>.</p> <dt data-md>Otherwise: <dd data-md> <p>Let <var>referenceSpace</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new⑧">new</a> <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⓪">XRReferenceSpace</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①④">relevant realm</a> of <var>session</var>.</p> </dl> <li data-md> <p>Initialize <var>referenceSpace</var>’s <a data-link-type="dfn" href="#xrreferencespace-type" id="ref-for-xrreferencespace-type">type</a> to <var>type</var>.</p> <li data-md> <p>Initialize <var>referenceSpace</var>’s <a data-link-type="dfn" href="#xrspace-session" id="ref-for-xrspace-session②">session</a> to <var>session</var>.</p> <li data-md> <p>Return <var>referenceSpace</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="reference-space-supported"> To check if a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="reference-space-is-supported">reference space is supported</dfn> for a given reference space type <var>type</var> and <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑥">XRSession</a></code> <var>session</var>, run the following steps: <ol> <li data-md> <p>If <var>type</var> is not <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain⑥">contained</a> in <var>session</var>’s <a data-link-type="dfn" href="#xrsession-set-of-granted-features" id="ref-for-xrsession-set-of-granted-features②">set of granted features</a>, return <code>false</code>.</p> <li data-md> <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer⑤">viewer</a></code>, return <code>true</code>.</p> <li data-md> <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑥">local</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑤">local-floor</a></code>, and <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②④">immersive session</a>, return <code>true</code>.</p> <li data-md> <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑦">local</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑥">local-floor</a></code>, and the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑧">XR device</a> supports reporting orientation data, return <code>true</code>.</p> <li data-md> <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑦">bounded-floor</a></code> and <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②⑤">immersive session</a>, return the result of whether <a data-link-type="dfn" href="#bounded-reference-spaces-are-supported" id="ref-for-bounded-reference-spaces-are-supported">bounded reference spaces are supported</a> by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device①⑨">XR device</a>.</p> <li data-md> <p>If <var>type</var> is <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded④">unbounded</a></code>, <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②⑥">immersive session</a>, and the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⓪">XR device</a> supports stable tracking near the user over an unlimited distance, return <code>true</code>.</p> <li data-md> <p>Return <code>false</code>.</p> </ol> </div> <div class="algorithm" data-algorithm="get-offset-space"> The <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpace" data-dfn-type="method" data-export id="dom-xrreferencespace-getoffsetreferencespace"><code>getOffsetReferenceSpace(<var>originOffset</var>)</code></dfn> method MUST perform the following steps when invoked: <ol> <li data-md> <p>Let <var>base</var> be the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②①">XRReferenceSpace</a></code> the method was called on.</p> <li data-md> <p>Initialize <var>offsetSpace</var> as follows:</p> <dl class="switch"> <dt data-md>If <var>base</var> is an instance of <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace②">XRBoundedReferenceSpace</a></code>: <dd data-md> <p>Let <var>offsetSpace</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new⑨">new</a> <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace③">XRBoundedReferenceSpace</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①⑤">relevant realm</a> of <var>base</var>, and set <var>offsetSpace</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry②">boundsGeometry</a></code> to <var>base</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry③">boundsGeometry</a></code>, with each point multiplied by the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse">inverse</a></code> of <var>originOffset</var>.</p> <dt data-md>Otherwise: <dd data-md> <p>Let <var>offsetSpace</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①⓪">new</a> <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②②">XRReferenceSpace</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①⑥">relevant realm</a> of <var>base</var>.</p> </dl> <li data-md> <p>Set <var>offsetSpace</var>’s <a data-link-type="dfn" href="#xrreferencespace-type" id="ref-for-xrreferencespace-type①">type</a> to <var>base</var>’s <a data-link-type="dfn" href="#xrreferencespace-type" id="ref-for-xrreferencespace-type②">type</a>.</p> <li data-md> <p>Set <var>offsetSpace</var>’s <a data-link-type="dfn" href="#xrspace-origin-offset" id="ref-for-xrspace-origin-offset②">origin offset</a> to the result of <a data-link-type="dfn" href="#multiply-transforms" id="ref-for-multiply-transforms②">multiplying</a> <var>base</var>’s <a data-link-type="dfn" href="#xrspace-origin-offset" id="ref-for-xrspace-origin-offset③">origin offset</a> by <var>originOffset</var> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①⑦">relevant realm</a> of <var>base</var>.</p> <li data-md> <p>Return <var>offsetSpace</var>.</p> </ol> </div> <p class="note" role="note"><span class="marker">Note:</span> It’s expected that some applications will use <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace①">getOffsetReferenceSpace()</a></code> to implement scene navigation controls based on mouse, keyboard, touch, or gamepad input. This will result in <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace②">getOffsetReferenceSpace()</a></code> being called frequently, at least once per-frame during periods of active input. As a result UAs are strongly encouraged to make the creation of new <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②③">XRReferenceSpace</a></code>s with <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace③">getOffsetReferenceSpace()</a></code> a lightweight operation.</p> <h3 class="heading settled" data-level="6.3" id="xrboundedreferencespace-interface"><span class="secno">6.3. </span><span class="content">XRBoundedReferenceSpace</span><a class="self-link" href="#xrboundedreferencespace-interface"></a></h3> <p><code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace④">XRBoundedReferenceSpace</a></code> extends <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②④">XRReferenceSpace</a></code> to include <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry④">boundsGeometry</a></code>, indicating the pre-configured boundaries of the user’s space.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext⑦"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed⑥"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrboundedreferencespace"><code><c- g>XRBoundedReferenceSpace</c-></code></dfn> : <a data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace②⑤"><c- n>XRReferenceSpace</c-></a> { <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array①"><c- b>FrozenArray</c-></a><<a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly"><c- n>DOMPointReadOnly</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMPointReadOnly>" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑤"><c- g>boundsGeometry</c-></a>; }; </pre> <p>The origin of an <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑤">XRBoundedReferenceSpace</a></code> MUST be positioned at the floor, such that the <code>Y</code> axis equals <code>0</code> at floor level. The <code>X</code> and <code>Z</code> position and orientation are initialized based on the conventions of the underlying platform, typically expected to be near the center of the room facing in a logical forward direction.</p> <p class="note" role="note"><span class="marker">Note:</span> Other XR platforms sometimes refer to the type of tracking offered by a <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑧">bounded-floor</a></code> reference space as "room scale" tracking. An <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑥">XRBoundedReferenceSpace</a></code> is not intended to describe multi-room spaces, areas with uneven floor levels, or very large open areas. Content that needs to handle those scenarios should use an <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded⑤">unbounded</a></code> reference space.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑦">XRBoundedReferenceSpace</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRBoundedReferenceSpace" data-dfn-type="dfn" data-noexport id="xrboundedreferencespace-native-bounds-geometry">native bounds geometry</dfn> describing the border around the <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑧">XRBoundedReferenceSpace</a></code>, which the user can expect to safely move within. The polygonal boundary is given as an array of <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly①">DOMPointReadOnly</a></code>s, which represents a loop of points at the edges of the safe space. The points describe offsets from the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①①">native origin</a> in meters. Points MUST be given in a clockwise order as viewed from above, looking towards the negative end of the Y axis. The <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-y" id="ref-for-dom-dompointreadonly-y">y</a></code> value of each point MUST be <code>0</code> and the <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w">w</a></code> value of each point MUST be <code>1</code>. The bounds can be considered to originate at the floor and extend infinitely high. The shape it describes MAY be convex or concave.</p> <p>Each point in the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry">native bounds geometry</a> MUST be <a data-link-type="dfn" href="#limiting" id="ref-for-limiting">limited</a> to a reasonable distance from the reference space’s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①②">native origin</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> It is suggested that points of the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry①">native bounds geometry</a> be <a data-link-type="dfn" href="#limiting" id="ref-for-limiting①">limited</a> to 15 meters from the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①③">native origin</a> in all directions.</p> <p>Each point in the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry②">native bounds geometry</a> MUST also be <a data-link-type="dfn" href="#quantization" id="ref-for-quantization">quantized</a> sufficiently to prevent fingerprinting. For user’s safety, quantized points values MUST NOT fall outside the bounds reported by the platform.</p> <p class="note" role="note"><span class="marker">Note:</span> It is suggested that points of the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry③">native bounds geometry</a> be <a data-link-type="dfn" href="#quantization" id="ref-for-quantization①">quantized</a> to the nearest 5cm.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRBoundedReferenceSpace" data-dfn-type="attribute" data-export id="dom-xrboundedreferencespace-boundsgeometry"><code>boundsGeometry</code></dfn> attribute is an array of <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly②">DOMPointReadOnly</a></code>s such that each entry is equal to the entry in the <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace⑨">XRBoundedReferenceSpace</a></code>'s <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry④">native bounds geometry</a> premultiplied by the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse①">inverse</a></code> of the <a data-link-type="dfn" href="#xrspace-origin-offset" id="ref-for-xrspace-origin-offset④">origin offset</a>. In other words, it provides the same border in <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①⓪">XRBoundedReferenceSpace</a></code> coordinates relative to the <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin①⓪">effective origin</a>.</p> <p>If the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry⑤">native bounds geometry</a> is temporarily unavailable, which may occur for several reasons such as during XR device initialization, extended periods of tracking loss, or movement between pre-configured spaces, the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑥">boundsGeometry</a></code> MUST report an empty array.</p> <div class="algorithm" data-algorithm="bounded-space-supported"> To check if <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="bounded-reference-spaces-are-supported">bounded reference spaces are supported</dfn> run the following steps: <ol> <li data-md> <p>If the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②①">XR device</a> cannot report boundaries, return false.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②②">XR device</a> cannot identify the height of the user’s physical floor, return false.</p> <li data-md> <p>Return true.</p> </ol> </div> <p class="note" role="note"><span class="marker">Note:</span> Bounded reference spaces may be returned if the boundaries or floor height have not been resolved at the time of the reference space request, but the XR device is known to support them.</p> <p class="note" role="note"><span class="marker">Note:</span> Content should not require the user to move beyond the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑦">boundsGeometry</a></code>. It is possible for the user to move beyond the bounds if their physical surroundings allow for it, resulting in position values outside of the polygon they describe. This is not an error condition and should be handled gracefully by page content.</p> <p class="note" role="note"><span class="marker">Note:</span> Content generally should not provide a visualization of the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑧">boundsGeometry</a></code>, as it’s the user agent’s responsibility to ensure that safety critical information is provided to the user.</p> <h2 class="heading settled" data-level="7" id="views"><span class="secno">7. </span><span class="content">Views</span><a class="self-link" href="#views"></a></h2> <h3 class="heading settled" data-level="7.1" id="xrview-interface"><span class="secno">7.1. </span><span class="content">XRView</span><a class="self-link" href="#xrview-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview②">XRView</a></code> describes a single <a data-link-type="dfn" href="#view" id="ref-for-view⑦">view</a> into an XR scene for a given frame.</p> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="view">view</dfn> corresponds to a display or portion of a display used by an XR device to present imagery to the user. They are used to retrieve all the information necessary to render content that is well aligned to the <a data-link-type="dfn" href="#view" id="ref-for-view⑧">view</a>'s physical output properties, including the field of view, eye offset, and other optical properties. <a data-link-type="dfn" href="#view" id="ref-for-view⑨">Views</a> may cover overlapping regions of the user’s vision. No guarantee is made about the number of <a data-link-type="dfn" href="#view" id="ref-for-view①⓪">views</a> any XR device uses or their order, nor is the number of <a data-link-type="dfn" href="#view" id="ref-for-view①①">views</a> required to be constant for the duration of an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑦">XRSession</a></code>.</p> <p>A <a data-link-type="dfn" href="#view" id="ref-for-view①②">view</a> has an associated internal <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="view-offset">view offset</dfn>, which is an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform③">XRRigidTransform</a></code> describing the position and orientation of the <a data-link-type="dfn" href="#view" id="ref-for-view①③">view</a> in the <a data-link-type="dfn" href="#xrsession-viewer-reference-space" id="ref-for-xrsession-viewer-reference-space①">viewer reference space</a>'s <a data-link-type="dfn" href="#xrspace-coordinate-system" id="ref-for-xrspace-coordinate-system⑧">coordinate system</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> There are no constraints on what the view offset might be, and views are allowed to have differing orientations. This can crop up in head-mounted devices with eye displays centered at an angle, and it can also surface itself in more extreme cases like CAVE rendering. Techniques like z-sorting and culling may need to be done per-eye because of this.</p> <p>A <a data-link-type="dfn" href="#view" id="ref-for-view①④">view</a> has an associated <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-projection-matrix">projection matrix</dfn> which is a <a data-link-type="dfn" href="#matrix" id="ref-for-matrix">matrix</a> describing the projection to be used when rendering the <a data-link-type="dfn" href="#view" id="ref-for-view①⑤">view</a>, provided by the underlying XR device. The <a data-link-type="dfn" href="#view-projection-matrix" id="ref-for-view-projection-matrix">projection matrix</a> MAY include transformations such as shearing that prevent the projection from being accurately described by a simple frustum.</p> <p>A <a data-link-type="dfn" href="#view" id="ref-for-view①⑥">view</a> has an associated <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-eye">eye</dfn> which is an <code class="idl"><a data-link-type="idl" href="#enumdef-xreye" id="ref-for-enumdef-xreye">XREye</a></code> describing which eye this view is expected to be shown to. If the view does not have an intrinsically associated eye (the display is monoscopic, for example) this value MUST be set to <code class="idl"><a data-link-type="idl" href="#dom-xreye-none" id="ref-for-dom-xreye-none">"none"</a></code>.</p> <p>A <a data-link-type="dfn" href="#view" id="ref-for-view①⑦">view</a> has an <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-active">active</dfn> flag that may change through the lifecycle of an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑧">XRSession</a></code>. <a data-link-type="dfn" href="#primary-view" id="ref-for-primary-view">Primary views</a> MUST always have the <a data-link-type="dfn" href="#view-active" id="ref-for-view-active③">active</a> flag set to <code>true</code>.</p> <p class="note" role="note"><span class="marker">Note:</span> Many HMDs will request that content render two <a data-link-type="dfn" href="#view" id="ref-for-view①⑧">views</a>, one for the left eye and one for the right, while most magic window devices will only request one <a data-link-type="dfn" href="#view" id="ref-for-view①⑨">view</a>, but applications should never assume a specific view configuration. For example: A magic window device may request two views if it is capable of stereo output, but may revert to requesting a single view for performance reasons if the stereo output mode is turned off. Similarly, HMDs may request more than two views to facilitate a wide field of view or displays of different pixel density.</p> <p>A <a data-link-type="dfn" href="#view" id="ref-for-view②⓪">view</a> has an internal <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-viewport-modifiable">viewport modifiable</dfn> flag that indicates if the viewport scale can be changed by a <code class="idl"><a data-link-type="idl" href="#dom-xrview-requestviewportscale" id="ref-for-dom-xrview-requestviewportscale">requestViewportScale()</a></code> call at this point in the session. It is set to <code>true</code> at the start of an animation frame, and set to <code>false</code> when <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-getviewport" id="ref-for-dom-xrwebgllayer-getviewport">getViewport()</a></code> is called.</p> <p>A <a data-link-type="dfn" href="#view" id="ref-for-view②①">view</a> has an internal <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-requested-viewport-scale">requested viewport scale</dfn> value that represents the requested viewport scale for this view. It is initially set to 1.0, and can be modified by the <code class="idl"><a data-link-type="idl" href="#dom-xrview-requestviewportscale" id="ref-for-dom-xrview-requestviewportscale①">requestViewportScale()</a></code> method if the system supports dynamic viewport scaling.</p> <p>A <a data-link-type="dfn" href="#view" id="ref-for-view②②">view</a> has an internal <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-current-viewport-scale">current viewport scale</dfn> value that represents the current viewport scale for this view as used internally by the system. It is initially set to 1.0. It is updated to match the <a data-link-type="dfn" href="#view-requested-viewport-scale" id="ref-for-view-requested-viewport-scale">requested viewport scale</a> when the viewport change is successfully applied by a <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-getviewport" id="ref-for-dom-xrwebgllayer-getviewport①">getViewport()</a></code> call.</p> <p class="note" role="note"><span class="marker">Note:</span> Dynamic viewport scaling allows applications to render to a subset of the full-sized viewport using a scale factor that can be changed every animation frame. This is intended to be efficiently modifiable on a per-frame basis without reallocation. For correct rendering, it’s essential that the XR system and application agree on the active viewport. An application can call <code class="idl"><a data-link-type="idl" href="#dom-xrview-requestviewportscale" id="ref-for-dom-xrview-requestviewportscale②">requestViewportScale()</a></code> for an <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview③">XRView</a></code> multiple times within a single animation frame, but the requested scale does not take effect until the application calls <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-getviewport" id="ref-for-dom-xrwebgllayer-getviewport②">getViewport()</a></code> for that view. The first <code>getViewport</code> call in an animation frame applies the change (taking effect immediately for the current animation frame), locks in the view’s current scaled viewport for the remainder of this animation frame, and sets the scale as the new default for future animation frames. Optionally, the system can provide a suggested value through the <code class="idl"><a data-link-type="idl" href="#dom-xrview-recommendedviewportscale" id="ref-for-dom-xrview-recommendedviewportscale">recommendedViewportScale</a></code> attribute based on internal performance heuristics and target framerates.</p> <pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xreye"><code><c- g>XREye</c-></code></dfn> { <dfn class="dfn-paneled idl-code" data-dfn-for="XREye" data-dfn-type="enum-value" data-export id="dom-xreye-none"><code><c- s>"none"</c-></code></dfn>, <dfn class="idl-code" data-dfn-for="XREye" data-dfn-type="enum-value" data-export id="dom-xreye-left"><code><c- s>"left"</c-></code><a class="self-link" href="#dom-xreye-left"></a></dfn>, <dfn class="idl-code" data-dfn-for="XREye" data-dfn-type="enum-value" data-export id="dom-xreye-right"><code><c- s>"right"</c-></code><a class="self-link" href="#dom-xreye-right"></a></dfn> }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext⑧"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed⑦"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrview"><code><c- g>XRView</c-></code></dfn> { <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-xreye" id="ref-for-enumdef-xreye①"><c- n>XREye</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XREye" href="#dom-xrview-eye" id="ref-for-dom-xrview-eye①"><c- g>eye</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-Float32Array" id="ref-for-idl-Float32Array①"><c- b>Float32Array</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array" href="#dom-xrview-projectionmatrix" id="ref-for-dom-xrview-projectionmatrix②"><c- g>projectionMatrix</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject⑤"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform④"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrview-transform" id="ref-for-dom-xrview-transform①"><c- g>transform</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double⑥"><c- b>double</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="double?" href="#dom-xrview-recommendedviewportscale" id="ref-for-dom-xrview-recommendedviewportscale①"><c- g>recommendedViewportScale</c-></a>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined⑤"><c- b>undefined</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrview-requestviewportscale" id="ref-for-dom-xrview-requestviewportscale③"><c- g>requestViewportScale</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double⑦"><c- b>double</c-></a>? <dfn class="idl-code" data-dfn-for="XRView/requestViewportScale(scale)" data-dfn-type="argument" data-export id="dom-xrview-requestviewportscale-scale-scale"><code><c- g>scale</c-></code><a class="self-link" href="#dom-xrview-requestviewportscale-scale-scale"></a></dfn>); }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRView" data-dfn-type="attribute" data-export id="dom-xrview-eye"><code>eye</code></dfn> attribute describes the <a data-link-type="dfn" href="#view-eye" id="ref-for-view-eye①">eye</a> of the underlying <a data-link-type="dfn" href="#view" id="ref-for-view②③">view</a>. This attribute’s primary purpose is to ensure that pre-rendered stereo content can present the correct portion of the content to the correct eye.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRView" data-dfn-type="attribute" data-export id="dom-xrview-projectionmatrix"><code>projectionMatrix</code></dfn> attribute is the <a data-link-type="dfn" href="#view-projection-matrix" id="ref-for-view-projection-matrix①">projection matrix</a> of the underlying <a data-link-type="dfn" href="#view" id="ref-for-view②④">view</a>. It is <b>strongly recommended</b> that applications use this matrix without modification or decomposition. Failure to use the provided projection matrices when rendering may cause the presented frame to be distorted or badly aligned, resulting in varying degrees of user discomfort. This attribute MUST be computed by <a data-link-type="dfn" href="#xrview-obtain-the-projection-matrix" id="ref-for-xrview-obtain-the-projection-matrix">obtaining the projection matrix</a> for the <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview④">XRView</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRView" data-dfn-type="attribute" data-export id="dom-xrview-transform"><code>transform</code></dfn> attribute is the <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑤">XRRigidTransform</a></code> of the viewpoint. It represents the position and orientation of the viewpoint in the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⑥">XRReferenceSpace</a></code> provided in <code class="idl"><a data-link-type="idl" href="#dom-xrframe-getviewerpose" id="ref-for-dom-xrframe-getviewerpose③">getViewerPose()</a></code>.</p> <p>The optional <dfn class="dfn-paneled idl-code" data-dfn-for="XRView" data-dfn-type="attribute" data-export id="dom-xrview-recommendedviewportscale"><code>recommendedViewportScale</code></dfn> attribute contains a UA-recommended viewport scale value that the application can use for a <code class="idl"><a data-link-type="idl" href="#dom-xrview-requestviewportscale" id="ref-for-dom-xrview-requestviewportscale④">requestViewportScale()</a></code> call to configure dynamic viewport scaling. It is <code>null</code> if the system does not implement a heuristic or method for determining a recommended scale. If not null, the value MUST be a numeric value greater than 0.0 and less than or equal to 1.0, and MUST be <a data-link-type="dfn" href="#quantization" id="ref-for-quantization②">quantized</a> to avoid providing detailed performance or GPU utilization data.</p> <p class="note" role="note"><span class="marker">Note:</span> It is suggested to quantize the recommended viewport scale by rounding it to the nearest value from a short list of possible scale values, and using hysteresis to avoid instant changes when close to a boundary value. (This also helps avoid rapidly oscillating scale values which can be visually distracting or uncomfortable.)</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview⑤">XRView</a></code> has an associated <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-session">session</dfn> which is the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession⑨⑨">XRSession</a></code> that produced it.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview⑥">XRView</a></code> has an associated <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-frame">frame</dfn> which is the <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe①⑨">XRFrame</a></code> that produced it.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview⑦">XRView</a></code> has an associated <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-underlying-view">underlying view</dfn> which is the underlying <a data-link-type="dfn" href="#view" id="ref-for-view②⑤">view</a> that it represents.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview⑧">XRView</a></code> has an associated <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-internal-projection-matrix">internal projection matrix</dfn> which stores the <a data-link-type="dfn" href="#view-projection-matrix" id="ref-for-view-projection-matrix②">projection matrix</a> of its <a data-link-type="dfn" href="#xrview-underlying-view" id="ref-for-xrview-underlying-view①">underlying view</a>. It is initially <code>null</code>.</p> <p class="note" role="note"><span class="marker">Note:</span> The <code class="idl"><a data-link-type="idl" href="#dom-xrview-transform" id="ref-for-dom-xrview-transform②">transform</a></code> can be used to position camera objects in many rendering libraries. If a more traditional view matrix is needed by the application one can be retrieved by calling <code>view.transform.inverse.matrix</code>.</p> <div class="algorithm" data-algorithm="request-viewport-scale"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRView" data-dfn-type="method" data-export id="dom-xrview-requestviewportscale"><code>requestViewportScale(<var>scale</var>)</code></dfn> method requests that the user agent should set the <a data-link-type="dfn" href="#view-requested-viewport-scale" id="ref-for-view-requested-viewport-scale①">requested viewport scale</a> for this viewport to the requested value.</p> <p>When this method is invoked on an <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview⑨">XRView</a></code> <var>xrview</var>, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If <var>scale</var> is null or undefined, abort these steps.</p> <li data-md> <p>If <var>scale</var> is less than or equal to 0.0, abort these steps.</p> <li data-md> <p>If <var>scale</var> is greater than 1.0, set <var>scale</var> to 1.0.</p> <li data-md> <p>Let <var>view</var> be <var>xrview</var>’s <a data-link-type="dfn" href="#xrview-underlying-view" id="ref-for-xrview-underlying-view②">underlying view</a>.</p> <li data-md> <p>Set the <var>view</var>’s <a data-link-type="dfn" href="#view-requested-viewport-scale" id="ref-for-view-requested-viewport-scale②">requested viewport scale</a> value to <var>scale</var>.</p> </ol> <p class="note" role="note"><span class="marker">Note:</span> The method ignores null or undefined scale values so that applications can safely use <code>view.requestViewportScale(view.recommendedViewportScale)</code> even on systems that don’t provide a recommended scale.</p> </div> <div class="algorithm" data-algorithm="obtain-xrview-projection"> <p>To <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-obtain-the-projection-matrix">obtain the projection matrix</dfn> for a given <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⓪">XRView</a></code> <var>view</var>:</p> <ol> <li data-md> <p>If <var>view</var>’s <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix">internal projection matrix</a> is not <code>null</code>, perform the following steps:</p> <ol> <li data-md> <p>If the operation <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/#sec-isdetachedbuffer" id="ref-for-sec-isdetachedbuffer">IsDetachedBuffer</a></code> on <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix①">internal projection matrix</a> is <code>false</code>, return <var>view</var>’s <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix②">internal projection matrix</a>.</p> </ol> <li data-md> <p>Set <var>view</var>’s <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix③">internal projection matrix</a> to a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①①">new</a> <a data-link-type="dfn" href="#matrix" id="ref-for-matrix①">matrix</a> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①⑧">relevant realm</a> of <var>view</var> which is equal to <var>view</var>’s <a data-link-type="dfn" href="#xrview-underlying-view" id="ref-for-xrview-underlying-view③">underlying view</a>'s <a data-link-type="dfn" href="#view-projection-matrix" id="ref-for-view-projection-matrix③">projection matrix</a>.</p> <li data-md> <p>Return <var>view</var>’s <a data-link-type="dfn" href="#xrview-internal-projection-matrix" id="ref-for-xrview-internal-projection-matrix④">internal projection matrix</a>.</p> </ol> </div> <div class="algorithm" data-algorithm="update-the-viewports"> <p>When the <a data-link-type="dfn" href="#view-active" id="ref-for-view-active④">active</a> flag of any <a data-link-type="dfn" href="#view" id="ref-for-view②⑥">view</a> in the <a data-link-type="dfn" href="#xrsession-list-of-views" id="ref-for-xrsession-list-of-views⑤">list of views</a> changes, one can <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="update-the-viewports">update the viewports</dfn> for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⓪">XRSession</a></code> <var>session</var> by performing the following steps:</p> <ol> <li data-md> <p>Let <var>layer</var> be the <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate⑤">renderState</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer⑦">baseLayer</a></code>.</p> <li data-md> <p>If <var>layer</var> is <code>null</code> abort these steps.</p> <li data-md> <p>Set <var>layer</var>’s <a data-link-type="dfn" href="#list-of-viewport-objects" id="ref-for-list-of-viewport-objects">list of viewport objects</a> to the empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②⓪">list</a>.</p> <li data-md> <p>For each <a data-link-type="dfn" href="#view-active" id="ref-for-view-active⑤">active</a> <a data-link-type="dfn" href="#view" id="ref-for-view②⑦">view</a> <var>view</var> in <a data-link-type="dfn" href="#xrsession-list-of-views" id="ref-for-xrsession-list-of-views⑥">list of views</a>:</p> <ol> <li data-md> <p>Let <var>viewport</var> be the <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport">XRViewport</a></code> result of <a data-link-type="dfn" href="#xrview-obtain-a-scaled-viewport" id="ref-for-xrview-obtain-a-scaled-viewport">obtaining a scaled viewport</a> from the <a data-link-type="dfn" href="#list-of-full-sized-viewports" id="ref-for-list-of-full-sized-viewports">list of full-sized viewports</a> associated with <var>view</var> for <var>session</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append①">Append</a> <var>viewport</var> to <var>layer</var>’s <a data-link-type="dfn" href="#list-of-viewport-objects" id="ref-for-list-of-viewport-objects①">list of viewport objects</a>.</p> </ol> </ol> </div> <div class="algorithm" data-algorithm="obtain-scaled-viewport"> <p>To <dfn class="dfn-paneled" data-dfn-for="XRView" data-dfn-type="dfn" data-noexport id="xrview-obtain-a-scaled-viewport">obtain a scaled viewport</dfn> for a given <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①①">XRView</a></code> <var>view</var> for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪①">XRSession</a></code> <var>session</var>:</p> <ol> <li data-md> <p>Let <var>glFullSizedViewport</var> be the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4">WebGL viewport</a> from the <a data-link-type="dfn" href="#list-of-full-sized-viewports" id="ref-for-list-of-full-sized-viewports①">list of full-sized viewports</a> associated with <var>view</var>.</p> <li data-md> <p>Let <var>scale</var> be the <var>view</var>’s <a data-link-type="dfn" href="#view-current-viewport-scale" id="ref-for-view-current-viewport-scale">current viewport scale</a>.</p> <li data-md> <p>The user agent MAY choose to clamp <var>scale</var> to apply a minimum viewport scale factor.</p> <li data-md> <p>Let <var>glViewport</var> be a new <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4①">WebGL viewport</a>.</p> <li data-md> <p>Set <var>glViewport</var>’s <code>width</code> to an integer value less than or equal to <var>glFullSizedViewport</var>’s <code>width</code> multiplied by <var>scale</var>.</p> <li data-md> <p>If <var>glViewport</var>’s <code>width</code> is less than 1, set it to 1.</p> <li data-md> <p>Set <var>glViewport</var>’s <code>height</code> to an integer value less than or equal to <var>glFullSizedViewport</var>’s <code>height</code> multiplied by <var>scale</var>.</p> <li data-md> <p>If <var>glViewport</var>’s <code>height</code> is less than 1, set it to 1.</p> <li data-md> <p>Set <var>glViewport</var>’s <code>x</code> component to an integer value between <var>glFullSizedViewport</var>’s <code>x</code> component (inclusive) and <var>glFullSizedViewport</var>’s <code>x</code> component plus <var>glFullSizedViewport</var>’s <code>width</code> minus <var>glViewport</var>’s <code>width</code> (inclusive).</p> <li data-md> <p>Set <var>glViewport</var>’s <code>y</code> component to a integer value between <var>glFullSizedViewport</var>’s <code>y</code> component (inclusive) and <var>glFullSizedViewport</var>’s <code>y</code> component plus <var>glFullSizedViewport</var>’s <code>height</code> minus <var>glViewport</var>’s <code>height</code> (inclusive).</p> <li data-md> <p>Let <var>viewport</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①②">new</a> <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport①">XRViewport</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm①⑨">relevant realm</a> of <var>session</var>.</p> <li data-md> <p>Initialize <var>viewport</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-x" id="ref-for-dom-xrviewport-x">x</a></code> to <var>glViewport</var>’s <code>x</code> component.</p> <li data-md> <p>Initialize <var>viewport</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-y" id="ref-for-dom-xrviewport-y">y</a></code> to <var>glViewport</var>’s <code>y</code> component.</p> <li data-md> <p>Initialize <var>viewport</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-width" id="ref-for-dom-xrviewport-width">width</a></code> to <var>glViewport</var>’s <code>width</code>.</p> <li data-md> <p>Initialize <var>viewport</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-height" id="ref-for-dom-xrviewport-height">height</a></code> to <var>glViewport</var>’s <code>height</code>.</p> <li data-md> <p>Return <var>viewport</var>.</p> </ol> <p class="note" role="note"><span class="marker">Note:</span> The specific integer value calculation is intentionally left to the UA’s discretion. The straightforward method of rounding down the width/height and using the <code>x</code> and <code>y</code> offsets as-is is valid, but the UA MAY also choose a slightly adjusted value within the specified constraints, for example to align the viewport to a power-of-two pixel grid for efficiency. The scaled viewport MUST be completely contained within the full-sized viewport, but MAY be placed at any location within the full-sized viewport at the UA’s discretion. The size and position calculation MUST be deterministic and return a consistent result for identical input values within a session.</p> </div> <h3 class="heading settled" data-level="7.2" id="primary-and-secondary-views"><span class="secno">7.2. </span><span class="content">Primary and Secondary Views</span><a class="self-link" href="#primary-and-secondary-views"></a></h3> <p>A <a data-link-type="dfn" href="#view" id="ref-for-view②⑧">view</a> is a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="primary-view">primary view</dfn> when rendering to it is necessary for an immersive experience. <a data-link-type="dfn" href="#primary-view" id="ref-for-primary-view①">Primary views</a> MUST be <a data-link-type="dfn" href="#view-active" id="ref-for-view-active⑥">active</a> for the entire duration of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪②">XRSession</a></code>.</p> <p>A <a data-link-type="dfn" href="#view" id="ref-for-view②⑨">view</a> is a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="secondary-view">secondary view</dfn> when it is possible for content to choose to not render to it and still produce a working immersive experience. When content chooses to not render to these views, the user agent MAY be able to reconstruct them via reprojection. Secondary views MUST NOT be <a data-link-type="dfn" href="#view-active" id="ref-for-view-active⑦">active</a> unless the "<a data-link-type="dfn" href="#secondary-view-secondary-views" id="ref-for-secondary-view-secondary-views">secondary-views</a>" feature is enabled.</p> <div class="example" id="example-47222166"> <a class="self-link" href="#example-47222166"></a> Examples of <a data-link-type="dfn" href="#primary-view" id="ref-for-primary-view②">primary views</a> include the main mono view for a handheld AR session, the main two stereo views for headworn AR/VR sessions, or all of the wall views for a CAVE session. <p>Examples of <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view①">secondary views</a> include the <a data-link-type="dfn" href="https://www.w3.org/TR/webxr-ar-module-1/#first-person-observer-view" id="ref-for-first-person-observer-view">first-person observer view</a> used for video capture, or "quad views" where there are two views per eye with differing resolution and fields of view.</p> </div> <div class="note" role="note"> While content should be written to assume that there may be any number of views, we expect a significant amount of content to make incorrect assumptions about the <code class="idl"><a data-link-type="idl" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views①">views</a></code> array and thus break when presented with more than two views. <p>Because user agents may have the ability to use mechanisms like reprojection to render to these <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view②">secondary views</a> in lieu of the content, it is desirable to be able to distinguish between content that plans on handling these <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view③">secondary views</a> itself and content that is either oblivious to the existence of such <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view④">secondary views</a> or does not wish to deal with them.</p> </div> <p>To provide for this, user agents that expose <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view⑤">secondary views</a> MUST support an "<dfn class="dfn-paneled" data-dfn-for="secondary view" data-dfn-type="dfn" data-noexport id="secondary-view-secondary-views">secondary-views</dfn>" <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑧">feature descriptor</a> as a hint. Content enabling this feature is expected to:</p> <ul> <li data-md> <p>Handle any nonzero number of <a data-link-type="dfn" href="#view" id="ref-for-view③⓪">views</a> in the <code class="idl"><a data-link-type="idl" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views②">views</a></code> array.</p> <li data-md> <p>Handle the existence of multiple <a data-link-type="dfn" href="#view" id="ref-for-view③①">views</a> that have the same <a data-link-type="dfn" href="#view-eye" id="ref-for-view-eye②">eye</a>.</p> <li data-md> <p>Handle the size of the <code class="idl"><a data-link-type="idl" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views③">views</a></code> array changing from frame to frame. <span class="note">This can happen when video capture is enabled, for example</span></p> </ul> <p>When "<a data-link-type="dfn" href="#secondary-view-secondary-views" id="ref-for-secondary-view-secondary-views①">secondary-views</a>" is enabled, the user agent MAY surface any <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view⑥">secondary views</a> the device supports to the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪③">XRSession</a></code>, when necessary. The user agent MUST NOT use reprojection to reconstruct <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view⑦">secondary views</a> in such a case, and instead rely on whatever the content decides to render.</p> <p class="note" role="note"><span class="marker">Note:</span> We recommend content use <code class="idl"><a data-link-type="idl" href="#dom-xrsessioninit-optionalfeatures" id="ref-for-dom-xrsessioninit-optionalfeatures⑤">optionalFeatures</a></code> to enable "<a data-link-type="dfn" href="#secondary-view-secondary-views" id="ref-for-secondary-view-secondary-views②">secondary-views</a>" to ensure maximum compatibility.</p> <p>If <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view⑧">secondary views</a> have lower underlying frame rates, the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪④">XRSession</a></code> MAY choose to do one or more of the following:</p> <ul> <li data-md> <p>Lower the overall frame rate of the application while the <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view⑨">secondary views</a> are active.</p> <li data-md> <p>Surface <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view①⓪">secondary views</a> in the <code class="idl"><a data-link-type="idl" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views④">views</a></code> array only for some of the frames. Implementations doing this SHOULD NOT have frames where the <a data-link-type="dfn" href="#primary-view" id="ref-for-primary-view③">primary views</a> are not present.</p> <li data-md> <p>Silently discard rendered content for <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view①①">secondary views</a> during some of the frames.</p> </ul> <h3 class="heading settled" data-level="7.3" id="xrviewport-interface"><span class="secno">7.3. </span><span class="content">XRViewport</span><a class="self-link" href="#xrviewport-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport②">XRViewport</a></code> object describes a viewport, or rectangular region, of a graphics surface.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext⑨"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed⑧"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrviewport"><code><c- g>XRViewport</c-></code></dfn> { <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-long" id="ref-for-idl-long"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-x" id="ref-for-dom-xrviewport-x①"><c- g>x</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-long" id="ref-for-idl-long①"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-y" id="ref-for-dom-xrviewport-y①"><c- g>y</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-long" id="ref-for-idl-long②"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-width" id="ref-for-dom-xrviewport-width①"><c- g>width</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-long" id="ref-for-idl-long③"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-height" id="ref-for-dom-xrviewport-height①"><c- g>height</c-></a>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewport" data-dfn-type="attribute" data-export id="dom-xrviewport-x"><code>x</code></dfn> and <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewport" data-dfn-type="attribute" data-export id="dom-xrviewport-y"><code>y</code></dfn> attributes define an offset from the surface origin and the <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewport" data-dfn-type="attribute" data-export id="dom-xrviewport-width"><code>width</code></dfn> and <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewport" data-dfn-type="attribute" data-export id="dom-xrviewport-height"><code>height</code></dfn> attributes define the rectangular dimensions of the viewport.</p> <p>The exact interpretation of the viewport values depends on the conventions of the graphics API the viewport is associated with:</p> <ul> <li data-md> <p>When used with an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑤">XRWebGLLayer</a></code> the <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-x" id="ref-for-dom-xrviewport-x②">x</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-y" id="ref-for-dom-xrviewport-y②">y</a></code> attributes specify the lower left corner of the viewport rectangle, in pixels, with the viewport rectangle extending <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-width" id="ref-for-dom-xrviewport-width②">width</a></code> pixels to the right of <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-x" id="ref-for-dom-xrviewport-x③">x</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-height" id="ref-for-dom-xrviewport-height②">height</a></code> pixels above <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-y" id="ref-for-dom-xrviewport-y③">y</a></code>. The values can be passed to the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4②">WebGL viewport</a> function directly.</p> </ul> <div class="example" id="example-e7d71510"> <a class="self-link" href="#example-e7d71510"></a> The following code loops through all of the <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①②">XRView</a></code>s of an <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose④">XRViewerPose</a></code>, queries an <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport③">XRViewport</a></code> from an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑥">XRWebGLLayer</a></code> for each, and uses them to set the appropriate <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4③">WebGL viewport</a>s for rendering. <pre class="highlight">xrSession<c- p>.</c->requestAnimationFrame<c- p>((</c->time<c- p>,</c-> xrFrame<c- p>)</c-> <c- p>=></c-> <c- p>{</c-> <c- a>const</c-> viewer <c- o>=</c-> xrFrame<c- p>.</c->getViewerPose<c- p>(</c->xrReferenceSpace<c- p>);</c-> gl<c- p>.</c->bindFramebuffer<c- p>(</c->xrWebGLLayer<c- p>.</c->framebuffer<c- p>);</c-> <c- k>for</c-> <c- p>(</c->xrView <c- k>of</c-> viewer<c- p>.</c->views<c- p>)</c-> <c- p>{</c-> <c- a>let</c-> xrViewport <c- o>=</c-> xrWebGLLayer<c- p>.</c->getViewport<c- p>(</c->xrView<c- p>);</c-> gl<c- p>.</c->viewport<c- p>(</c->xrViewport<c- p>.</c->x<c- p>,</c-> xrViewport<c- p>.</c->y<c- p>,</c-> xrViewport<c- p>.</c->width<c- p>,</c-> xrViewport<c- p>.</c->height<c- p>);</c-> <c- c1>// WebGL draw calls will now be rendered into the appropriate viewport.</c-> <c- p>}</c-> <c- p>});</c-> </pre> </div> <h2 class="heading settled" data-level="8" id="geometricprimitives"><span class="secno">8. </span><span class="content">Geometric Primitives</span><a class="self-link" href="#geometricprimitives"></a></h2> <h3 class="heading settled" data-level="8.1" id="matrices"><span class="secno">8.1. </span><span class="content">Matrices</span><a class="self-link" href="#matrices"></a></h3> <p>WebXR provides various transforms in the form of <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="matrix" data-noexport id="matrix">matrices</dfn>. WebXR uses the WebGL conventions when communicating matrices, in which 4x4 matrices are given as 16 element <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-Float32Array" id="ref-for-idl-Float32Array②">Float32Array</a></code>s with column major storage, and are applied to column vectors by premultiplying the matrix from the left. They may be passed directly to WebGL’s <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10" id="ref-for-5.14.10">uniformMatrix4fv</a></code> function, used to create an equivalent <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dommatrix" id="ref-for-dommatrix">DOMMatrix</a></code>, or used with a variety of third party math libraries.</p> <div class="example" id="example-2a96dddb"> <a class="self-link" href="#example-2a96dddb"></a> Matrices returned from the WebXR Device API will be a 16 element <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-Float32Array" id="ref-for-idl-Float32Array③">Float32Array</a></code> laid out like so: <pre>[a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15] </pre> <p>Applying this matrix as a transform to a column vector specified as a <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly③">DOMPointReadOnly</a></code> like so:</p> <pre>{x:X, y:Y, z:Z, w:1}</pre> <p>Produces the following result:</p> <pre>a0 a4 a8 a12 * X = a0 * X + a4 * Y + a8 * Z + a12 a1 a5 a9 a13 Y a1 * X + a5 * Y + a9 * Z + a13 a2 a6 a10 a14 Z a2 * X + a6 * Y + a10 * Z + a14 a3 a7 a11 a15 1 a3 * X + a7 * Y + a11 * Z + a15 </pre> </div> <h3 class="heading settled" data-level="8.2" id="normalization"><span class="secno">8.2. </span><span class="content">Normalization</span><a class="self-link" href="#normalization"></a></h3> <p>There are several algorithms which call for a vector or quaternion to be normalized, which means to scale the components to have a collective magnitude of <code>1.0</code>.</p> <div class="algorithm" data-algorithm="normalize"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="normalize">normalize</dfn> a list of components the UA MUST perform the following steps:</p> <ol> <li data-md> <p>Let <var>length</var> be the square root of the sum of the squares of each component.</p> <li data-md> <p>If <var>length</var> is <code>0</code>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①②">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>Divide each component by <var>length</var> and set the component.</p> </ol> </div> <h3 class="heading settled" data-level="8.3" id="xrrigidtransform-interface"><span class="secno">8.3. </span><span class="content">XRRigidTransform</span><a class="self-link" href="#xrrigidtransform-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑥">XRRigidTransform</a></code> is a transform described by a <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position③">position</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation③">orientation</a></code>. When interpreting an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑦">XRRigidTransform</a></code> the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation④">orientation</a></code> is always applied prior to the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position④">position</a></code>.</p> <p>An <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑧">XRRigidTransform</a></code> contains an <dfn class="dfn-paneled" data-dfn-for="XRRigidTransform" data-dfn-type="dfn" data-noexport id="xrrigidtransform-internal-matrix">internal matrix</dfn> which is a <a data-link-type="dfn" href="#matrix" id="ref-for-matrix②">matrix</a>.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①⓪"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed⑨"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrrigidtransform"><code><c- g>XRRigidTransform</c-></code></dfn> { <a class="idl-code" data-link-type="constructor" href="#dom-xrrigidtransform-xrrigidtransform" id="ref-for-dom-xrrigidtransform-xrrigidtransform"><c- g>constructor</c-></a>(<c- b>optional</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit"><c- n>DOMPointInit</c-></a> <dfn class="idl-code" data-dfn-for="XRRigidTransform/XRRigidTransform(position, orientation), XRRigidTransform/constructor(position, orientation), XRRigidTransform/XRRigidTransform(position), XRRigidTransform/constructor(position), XRRigidTransform/XRRigidTransform(), XRRigidTransform/constructor()" data-dfn-type="argument" data-export id="dom-xrrigidtransform-xrrigidtransform-position-orientation-position"><code><c- g>position</c-></code><a class="self-link" href="#dom-xrrigidtransform-xrrigidtransform-position-orientation-position"></a></dfn> = {}, <c- b>optional</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit①"><c- n>DOMPointInit</c-></a> <dfn class="idl-code" data-dfn-for="XRRigidTransform/XRRigidTransform(position, orientation), XRRigidTransform/constructor(position, orientation), XRRigidTransform/XRRigidTransform(position), XRRigidTransform/constructor(position), XRRigidTransform/XRRigidTransform(), XRRigidTransform/constructor()" data-dfn-type="argument" data-export id="dom-xrrigidtransform-xrrigidtransform-position-orientation-orientation"><code><c- g>orientation</c-></code><a class="self-link" href="#dom-xrrigidtransform-xrrigidtransform-position-orientation-orientation"></a></dfn> = {}); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject⑥"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly④"><c- n>DOMPointReadOnly</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑤"><c- g>position</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject⑦"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly⑤"><c- n>DOMPointReadOnly</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑤"><c- g>orientation</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-Float32Array" id="ref-for-idl-Float32Array④"><c- b>Float32Array</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix"><c- g>matrix</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject⑧"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform⑨"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse②"><c- g>inverse</c-></a>; }; </pre> <div class="algorithm" data-algorithm="construct-rigid-transform"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="constructor" data-export data-lt="XRRigidTransform(position, orientation)|constructor(position, orientation)|XRRigidTransform(position)|constructor(position)|XRRigidTransform()|constructor()" id="dom-xrrigidtransform-xrrigidtransform"><code>XRRigidTransform(<var>position</var>, <var>orientation</var>)</code></dfn> constructor MUST perform the following steps when invoked:</p> <ol> <li data-md> <p>Let <var>transform</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①③">new</a> <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⓪">XRRigidTransform</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#current" id="ref-for-current">current realm</a>.</p> <li data-md> <p>Let <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑥">position</a></code> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①④">new</a> <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly⑥">DOMPointReadOnly</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#current" id="ref-for-current①">current realm</a>.</p> <li data-md> <p>If <var>position</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w①">w</a></code> value is not <code>1.0</code>, throw a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror①">TypeError</a></code> and abort these steps.</p> <li data-md> <p>If one or more of <var>position</var>’s or <var>orientation</var>’s values is <code>NaN</code> or another non-finite number such as <code>infinity</code>, throw a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror②">TypeError</a></code> and abort these steps.</p> <li data-md> <p>Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑦">position</a></code>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-x" id="ref-for-dom-dompointreadonly-x">x</a></code> value to <var>position</var>’s x dictionary member, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-y" id="ref-for-dom-dompointreadonly-y①">y</a></code> value to <var>position</var>’s y dictionary member, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-z" id="ref-for-dom-dompointreadonly-z">z</a></code> value to <var>position</var>’s z dictionary member and <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w②">w</a></code> value to <var>position</var>’s w dictionary member.</p> <li data-md> <p>Let <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑥">orientation</a></code> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①⑤">new</a> <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly⑦">DOMPointReadOnly</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#current" id="ref-for-current②">current realm</a>.</p> <li data-md> <p>Set <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑦">orientation</a></code>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-x" id="ref-for-dom-dompointreadonly-x①">x</a></code> value to <var>orientation</var>’s x dictionary member, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-y" id="ref-for-dom-dompointreadonly-y②">y</a></code> value to <var>orientation</var>’s y dictionary member, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-z" id="ref-for-dom-dompointreadonly-z①">z</a></code> value to <var>orientation</var>’s z dictionary member and <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w③">w</a></code> value to <var>orientation</var>’s w dictionary member.</p> <li data-md> <p>Let <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix">internal matrix</a> be <code>null</code>.</p> <li data-md> <p><a data-link-type="dfn" href="#normalize" id="ref-for-normalize">Normalize</a> <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-x" id="ref-for-dom-dompointreadonly-x②">x</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-y" id="ref-for-dom-dompointreadonly-y③">y</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-z" id="ref-for-dom-dompointreadonly-z②">z</a></code>, and <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w④">w</a></code> components of <var>transform</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑧">orientation</a></code>.</p> <li data-md> <p>Return <var>transform</var>.</p> </ol> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="attribute" data-export id="dom-xrrigidtransform-position"><code>position</code></dfn> attribute is a 3-dimensional point, given in meters, describing the translation component of the transform. The <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑧">position</a></code>'s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-w" id="ref-for-dom-dompointreadonly-w⑤">w</a></code> attribute MUST be <code>1.0</code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="attribute" data-export id="dom-xrrigidtransform-orientation"><code>orientation</code></dfn> attribute is a quaternion describing the rotational component of the transform. The <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation⑨">orientation</a></code> MUST be normalized to have a length of <code>1.0</code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="attribute" data-export id="dom-xrrigidtransform-matrix"><code>matrix</code></dfn> attribute returns the transform described by the <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position⑨">position</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⓪">orientation</a></code> attributes as a <a data-link-type="dfn" href="#matrix" id="ref-for-matrix③">matrix</a>. This attribute MUST be computed by <a data-link-type="dfn" href="#xrrigidtransform-obtain-the-matrix" id="ref-for-xrrigidtransform-obtain-the-matrix">obtaining the matrix</a> for the <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①①">XRRigidTransform</a></code>.</p> <p class="note" role="note"><span class="marker">Note:</span> This matrix when premultiplied onto a column vector will rotate the vector by the 3D rotation described by <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①①">orientation</a></code>, and then translate it by <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⓪">position</a></code>. Mathematically in column-vector notation, this is <code>M = T * R</code>, where <code>T</code> is a translation matrix corresponding to <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①①">position</a></code> and <code>R</code> is a rotation matrix corresponding to <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①②">orientation</a></code>.</p> <div class="algorithm" data-algorithm="obtain-xrrigidtransform-matrix"> <p>To <dfn class="dfn-paneled" data-dfn-for="XRRigidTransform" data-dfn-type="dfn" data-noexport id="xrrigidtransform-obtain-the-matrix">obtain the matrix</dfn> for a given <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①②">XRRigidTransform</a></code> <var>transform</var>:</p> <ol> <li data-md> <p>If <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix①">internal matrix</a> is not <code>null</code>, perform the following steps:</p> <ol> <li data-md> <p>If the operation <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/#sec-isdetachedbuffer" id="ref-for-sec-isdetachedbuffer①">IsDetachedBuffer</a></code> on <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix②">internal matrix</a> is <code>false</code>, return <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix③">internal matrix</a>.</p> </ol> <li data-md> <p>Let <var>translation</var> be a new <a data-link-type="dfn" href="#matrix" id="ref-for-matrix④">matrix</a> which is a column-vector translation matrix corresponding to <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①②">position</a></code>. Mathematically, if <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①③">position</a></code> is <code>(x, y, z)</code>, this matrix is</p> <p><img alt="Mathematical expression for column-vector translation matrix" height="5386" src="images/translation_matrix.svg" style="height: 6em; width: auto;" width="6733"></p> <li data-md> <p>Let <var>rotation</var> be a new <a data-link-type="dfn" href="#matrix" id="ref-for-matrix⑤">matrix</a> which is a column-vector rotation matrix corresponding to <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①③">orientation</a></code>. Mathematically, if <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①④">orientation</a></code> is the unit quaternion (<code>q<sub>x</sub>, q<sub>y</sub>, q<sub>z</sub>, q<sub>w</sub></code>), this matrix is</p> <p><img alt="Mathematical expression for column-vector rotation matrix" height="5817" src="images/rotation_matrix.svg" style="height: 6em; width: auto" width="24008"></p> <li data-md> <p>Set <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix④">internal matrix</a> to a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①⑥">new</a> <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-Float32Array" id="ref-for-idl-Float32Array⑤">Float32Array</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②⓪">relevant realm</a> of <var>transform</var> set to the result of multiplying <var>translation</var> and <var>rotation</var> with <var>translation</var> on the left (<code>translation * rotation</code>) in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②①">relevant realm</a> of <var>transform</var>. Mathematically, this matrix is</p> <p><img alt="Mathematical expression for matrix of multiplying translation and rotation with translation on the left" height="5817" src="images/rigid_matrix.svg" style="height: 6em; width: auto" width="24080"></p> <li data-md> <p>Return <var>transform</var>’s <a data-link-type="dfn" href="#xrrigidtransform-internal-matrix" id="ref-for-xrrigidtransform-internal-matrix⑤">internal matrix</a>.</p> </ol> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRRigidTransform" data-dfn-type="attribute" data-export id="dom-xrrigidtransform-inverse"><code>inverse</code></dfn> attribute of a <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①③">XRRigidTransform</a></code> <var>transform</var> returns an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①④">XRRigidTransform</a></code> in the relevant realm of <var>transform</var> which, if applied to an object that had previously been transformed by <var>transform</var>, would undo the transform and return the object to its initial pose. This attribute SHOULD be lazily evaluated. The <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑤">XRRigidTransform</a></code> returned by <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse③">inverse</a></code> MUST return <var>transform</var> as its <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-inverse" id="ref-for-dom-xrrigidtransform-inverse④">inverse</a></code>.</p> <p>An <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑥">XRRigidTransform</a></code> with a <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①④">position</a></code> of <code>{ x: 0, y: 0, z: 0 w: 1 }</code> and an <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⑤">orientation</a></code> of <code>{ x: 0, y: 0, z: 0, w: 1 }</code> is known as an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="identity-transform">identity transform</dfn>.</p> <div class="algorithm" data-algorithm="multiply transforms"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="multiply transforms" data-noexport id="multiply-transforms">multiply two <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑦">XRRigidTransform</a></code>s</dfn>, <var>B</var> and <var>A</var> in a <a data-link-type="dfn" href="https://tc39.es/ecma262/#realm" id="ref-for-realm">Realm</a> <var>realm</var>, the UA MUST perform the following steps:</p> <ol> <li data-md> <p>Let <var>result</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①⑦">new</a> <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑧">XRRigidTransform</a></code> object in <var>realm</var>.</p> <li data-md> <p>Set <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix①">matrix</a></code> to a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①⑧">new</a> <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-Float32Array" id="ref-for-idl-Float32Array⑥">Float32Array</a></code> in <var>realm</var>, the result of premultiplying <var>B</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix②">matrix</a></code> from the left onto <var>A</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix③">matrix</a></code>.</p> <li data-md> <p>Set <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⑥">orientation</a></code> to a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new①⑨">new</a> <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly⑧">DOMPointReadOnly</a></code> in <var>realm</var>, the quaternion that describes the rotation indicated by the top left 3x3 sub-matrix of <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix④">matrix</a></code>.</p> <li data-md> <p>Set <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑤">position</a></code> to a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②⓪">new</a> <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly⑨">DOMPointReadOnly</a></code> in <var>realm</var>, the vector given by the fourth column of <var>result</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-matrix" id="ref-for-dom-xrrigidtransform-matrix⑤">matrix</a></code>.</p> <li data-md> <p>Return <var>result</var>.</p> </ol> <p><var>result</var> is a transform from <var>A</var>’s source space to <var>B</var>’s destination space.</p> <p class="note" role="note"><span class="marker">Note:</span> This is equivalent to constructing an <code class="idl"><a data-link-type="idl" href="#xrrigidtransform" id="ref-for-xrrigidtransform①⑨">XRRigidTransform</a></code> whose <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⑦">orientation</a></code> is the composition of the orientation of <var>A</var> and <var>B</var>, and whose <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑥">position</a></code> is equal to <var>A</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑦">position</a></code> rotated by <var>B</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-orientation" id="ref-for-dom-xrrigidtransform-orientation①⑧">orientation</a></code>, added to <var>B</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑧">position</a></code>.</p> </div> <h2 class="heading settled" data-level="9" id="pose"><span class="secno">9. </span><span class="content">Pose</span><a class="self-link" href="#pose"></a></h2> <h3 class="heading settled" data-level="9.1" id="xrpose-interface"><span class="secno">9.1. </span><span class="content">XRPose</span><a class="self-link" href="#xrpose-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑥">XRPose</a></code> describes a position and orientation in space relative to an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①⑧">XRSpace</a></code>.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①①"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①⓪"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrpose"><code><c- g>XRPose</c-></code></dfn> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject⑨"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②⓪"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform②"><c- g>transform</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①⓪"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly①⓪"><c- n>DOMPointReadOnly</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly?" href="#dom-xrpose-linearvelocity" id="ref-for-dom-xrpose-linearvelocity③"><c- g>linearVelocity</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly①①"><c- n>DOMPointReadOnly</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly?" href="#dom-xrpose-angularvelocity" id="ref-for-dom-xrpose-angularvelocity③"><c- g>angularVelocity</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean②"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition⑥"><c- g>emulatedPosition</c-></a>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRPose" data-dfn-type="attribute" data-export id="dom-xrpose-transform"><code>transform</code></dfn> attribute describes the position and orientation relative to the base <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace①⑨">XRSpace</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRPose" data-dfn-type="attribute" data-export id="dom-xrpose-linearvelocity"><code>linearVelocity</code></dfn> attribute describes the linear velocity in meters per second relative to the base <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace②⓪">XRSpace</a></code>. If the user agent can’t populate this, it’s allowed to return <code>null</code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRPose" data-dfn-type="attribute" data-export id="dom-xrpose-angularvelocity"><code>angularVelocity</code></dfn> attribute describes the angular velocity in radians per second relative to the base <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace②①">XRSpace</a></code>. If the user agent can’t populate this, it’s allowed to return <code>null</code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRPose" data-dfn-type="attribute" data-export id="dom-xrpose-emulatedposition"><code>emulatedPosition</code></dfn> attribute is <code>false</code> when the <code class="idl"><a data-link-type="idl" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform③">transform</a></code> represents an actively tracked <a data-link-type="dfn" href="#6dof" id="ref-for-6dof⑥">6DoF</a> pose based on sensor readings, or <code>true</code> if its <code class="idl"><a data-link-type="idl" href="#dom-xrrigidtransform-position" id="ref-for-dom-xrrigidtransform-position①⑨">position</a></code> value includes a <dfn class="dfn-paneled" data-dfn-for="XRPose" data-dfn-type="dfn" data-noexport id="xrpose-computed-offset">computed offset</dfn>, such as that provided by a neck or arm model. <a data-link-type="dfn" href="#estimated-floor-level" id="ref-for-estimated-floor-level①">Estimated floor level</a>s MUST NOT be considered when determining if an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑦">XRPose</a></code> includes a <a data-link-type="dfn" href="#xrpose-computed-offset" id="ref-for-xrpose-computed-offset">computed offset</a>.</p> <h3 class="heading settled" data-level="9.2" id="xrviewerpose-interface"><span class="secno">9.2. </span><span class="content">XRViewerPose</span><a class="self-link" href="#xrviewerpose-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑤">XRViewerPose</a></code> is an <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑧">XRPose</a></code> describing the state of a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="viewer">viewer</dfn> of the XR scene as tracked by the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②③">XR device</a>. A <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑧">viewer</a> may represent a tracked piece of hardware, the observed position of a user’s head relative to the hardware, or some other means of computing a series of viewpoints into the XR scene. <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑥">XRViewerPose</a></code>s can only be queried relative to an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⑦">XRReferenceSpace</a></code>. It provides, in addition to the <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose⑨">XRPose</a></code> values, an array of <a data-link-type="dfn" href="#view" id="ref-for-view③②">view</a>s which include rigid transforms to indicate the viewpoint and projection matrices. These values should be used by the application when rendering a frame of an XR scene.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①②"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrviewerpose"><code><c- g>XRViewerPose</c-></code></dfn> : <a data-link-type="idl-name" href="#xrpose" id="ref-for-xrpose①⓪"><c- n>XRPose</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①②"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array②"><c- b>FrozenArray</c-></a><<a data-link-type="idl-name" href="#xrview" id="ref-for-xrview①③"><c- n>XRView</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRView>" href="#dom-xrviewerpose-views" id="ref-for-dom-xrviewerpose-views⑤"><c- g>views</c-></a>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRViewerPose" data-dfn-type="attribute" data-export id="dom-xrviewerpose-views"><code>views</code></dfn> array is a sequence of <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①④">XRView</a></code>s describing the viewpoints of the XR scene, relative to the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⑧">XRReferenceSpace</a></code> the <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑦">XRViewerPose</a></code> was queried with. Every <a data-link-type="dfn" href="#view" id="ref-for-view③③">view</a> of the XR scene in the array must be rendered in order to display correctly on the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②④">XR device</a>. Each <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⑤">XRView</a></code> includes rigid transforms to indicate the viewpoint and projection matrices, and can be used to query <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport④">XRViewport</a></code>s from layers when needed.</p> <p class="note" role="note"><span class="marker">Note:</span> The <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑧">XRViewerPose</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrpose-transform" id="ref-for-dom-xrpose-transform④">transform</a></code> can be used to position graphical representations of the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer⑨">viewer</a> for spectator views of the scene or multi-user interaction.</p> <h2 class="heading settled" data-level="10" id="input"><span class="secno">10. </span><span class="content">Input</span><a class="self-link" href="#input"></a></h2> <h3 class="heading settled" data-level="10.1" id="xrinputsource-interface"><span class="secno">10.1. </span><span class="content">XRInputSource</span><a class="self-link" href="#xrinputsource-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①①">XRInputSource</a></code> represents an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="xr-input-source">XR input source</dfn>, which is any input mechanism which allows the user to perform targeted actions in the same virtual space as the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⓪">viewer</a>. Example <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①①">XR input source</a>s include, but are not limited to, handheld controllers, optically tracked hands, and gaze-based input methods that operate on the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①①">viewer</a>'s pose. Input mechanisms which are not explicitly associated with the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①③">XR device</a>, such as traditional gamepads, mice, or keyboards SHOULD NOT be considered <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①②">XR input source</a>s.</p> <pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrhandedness"><code><c- g>XRHandedness</c-></code></dfn> { <dfn class="dfn-paneled idl-code" data-dfn-for="XRHandedness" data-dfn-type="enum-value" data-export id="dom-xrhandedness-none"><code><c- s>"none"</c-></code></dfn>, <dfn class="idl-code" data-dfn-for="XRHandedness" data-dfn-type="enum-value" data-export id="dom-xrhandedness-left"><code><c- s>"left"</c-></code><a class="self-link" href="#dom-xrhandedness-left"></a></dfn>, <dfn class="idl-code" data-dfn-for="XRHandedness" data-dfn-type="enum-value" data-export id="dom-xrhandedness-right"><code><c- s>"right"</c-></code><a class="self-link" href="#dom-xrhandedness-right"></a></dfn> }; <c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-xrtargetraymode"><code><c- g>XRTargetRayMode</c-></code></dfn> { <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-gaze" id="ref-for-dom-xrtargetraymode-gaze"><c- s>"gaze"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-tracked-pointer" id="ref-for-dom-xrtargetraymode-tracked-pointer"><c- s>"tracked-pointer"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-screen" id="ref-for-dom-xrtargetraymode-screen"><c- s>"screen"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-transient-pointer" id="ref-for-dom-xrtargetraymode-transient-pointer"><c- s>"transient-pointer"</c-></a> }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①③"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①②"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrinputsource"><code><c- g>XRInputSource</c-></code></dfn> { <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-xrhandedness" id="ref-for-enumdef-xrhandedness"><c- n>XRHandedness</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRHandedness" href="#dom-xrinputsource-handedness" id="ref-for-dom-xrinputsource-handedness①"><c- g>handedness</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-xrtargetraymode" id="ref-for-enumdef-xrtargetraymode"><c- n>XRTargetRayMode</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRTargetRayMode" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode①"><c- g>targetRayMode</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①③"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace②②"><c- n>XRSpace</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSpace" href="#dom-xrinputsource-targetrayspace" id="ref-for-dom-xrinputsource-targetrayspace②"><c- g>targetRaySpace</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①④"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrspace" id="ref-for-xrspace②③"><c- n>XRSpace</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSpace?" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace③"><c- g>gripSpace</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①⑤"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array③"><c- b>FrozenArray</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString⑤"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMString>" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles①"><c- g>profiles</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean③"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrinputsource-skiprendering" id="ref-for-dom-xrinputsource-skiprendering"><c- g>skipRendering</c-></a>; }; </pre> <p class="note" role="note"><span class="marker">Note:</span> The <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①②">XRInputSource</a></code> interface is also extended by the <a href="https://www.w3.org/TR/webxr-gamepads-module-1/">WebXR Gamepads Module</a></p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-handedness"><code>handedness</code></dfn> attribute describes which hand the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①③">XR input source</a> is associated with, if any. Input sources with no natural handedness (such as headset-mounted controls) or for which the handedness is not currently known MUST set this attribute <code class="idl"><a data-link-type="idl" href="#dom-xrhandedness-none" id="ref-for-dom-xrhandedness-none">"none"</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-targetraymode"><code>targetRayMode</code></dfn> attribute describes the method used to produce the target ray, and indicates how the application should present the target ray to the user if desired.</p> <ul> <li data-md> <p><dfn class="dfn-paneled idl-code" data-dfn-for="XRTargetRayMode" data-dfn-type="enum-value" data-export data-lt=""gaze"|gaze" id="dom-xrtargetraymode-gaze"><code>gaze</code></dfn> indicates the target ray will originate at the viewer and follow the direction it is facing. (This is commonly referred to as a "gaze input" device in the context of head-mounted displays.)</p> <li data-md> <p><dfn class="dfn-paneled idl-code" data-dfn-for="XRTargetRayMode" data-dfn-type="enum-value" data-export data-lt=""tracked-pointer"|tracked-pointer" id="dom-xrtargetraymode-tracked-pointer"><code>tracked-pointer</code></dfn> indicates that the target ray originates from either a handheld device or other hand-tracking mechanism and represents that the user is using their hands or the held device for pointing. The orientation of the target ray relative to the tracked object MUST follow platform-specific ergonomics guidelines when available. In the absence of platform-specific guidance, the target ray SHOULD point in the same direction as the user’s index finger if it was outstretched. If the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①⑧">XRSystem</a></code> determines that part of the handheld device is or becomes intended to contact real-world surfaces (such as a pen tip), the target ray MUST originate at that point.</p> <li data-md> <p><dfn class="dfn-paneled idl-code" data-dfn-for="XRTargetRayMode" data-dfn-type="enum-value" data-export data-lt=""screen"|screen" id="dom-xrtargetraymode-screen"><code>screen</code></dfn> indicates that the input source was an interaction with the canvas element associated with an inline session’s output context, such as a mouse click or touch event.</p> <li data-md> <p><dfn class="dfn-paneled idl-code" data-dfn-for="XRTargetRayMode" data-dfn-type="enum-value" data-export data-lt=""transient-pointer"|transient-pointer" id="dom-xrtargetraymode-transient-pointer"><code>transient-pointer</code></dfn> indicates that the input source was generated as part of an operating system interaction intent rather than a specific piece of hardware. Some examples are user intents based on information too sensitive to expose directly such as gaze, synthesised inputs from web driver or inputs generated by assistive technologies. This should only be used for assistive technologies if it is also used as a primary input so as to not inadvertently indicate that assistive technology is being used as per the W3C design principals.</p> </ul> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-targetrayspace"><code>targetRaySpace</code></dfn> attribute is an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace②④">XRSpace</a></code> that has a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①④">native origin</a> tracking the position and orientation of the preferred pointing ray of the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①③">XRInputSource</a></code> (along its <code>-Z</code> axis), as defined by the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode②">targetRayMode</a></code>.</p> <p>For input sources with a <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode③">targetRayMode</a></code> of <code class="idl"><a data-link-type="idl" href="#dom-xrtargetraymode-transient-pointer" id="ref-for-dom-xrtargetraymode-transient-pointer①">"transient-pointer"</a></code> the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetrayspace" id="ref-for-dom-xrinputsource-targetrayspace③">targetRaySpace</a></code> represents the ray to the interaction target at the start of the interaction. The pose for this should be static within the gripSpace for this XRInput.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-gripspace"><code>gripSpace</code></dfn> attribute is an <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace②⑤">XRSpace</a></code> that has a <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑤">native origin</a> tracking to the pose that should be used to render virtual objects such that they appear to be held in the user’s hand. If the user were to hold a straight rod, this <code class="idl"><a data-link-type="idl" href="#xrspace" id="ref-for-xrspace②⑥">XRSpace</a></code> places the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑥">native origin</a> at the centroid of their curled fingers and where the <code>-Z</code> axis points along the length of the rod towards their thumb. The <code>X</code> axis is perpendicular to the back of the hand being described, with the back of the user’s right hand pointing towards <code>+X</code> and the back of the user’s left hand pointing towards <code>-X</code>. The <code>Y</code> axis is implied by the relationship between the <code>X</code> and <code>Z</code> axis, with <code>+Y</code> roughly pointing in the direction of the user’s arm.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-skiprendering"><code>skipRendering</code></dfn> attribute indicates that this input is visible and MAY NOT need to be rendered by the current session. If <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-skiprendering" id="ref-for-dom-xrinputsource-skiprendering①">skipRendering</a></code> is true and the targetRayMode is "tracked-pointer", the user agent MUST ensure that a representation of the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①④">XR input source</a> is always shown to the user.</p> <p class="note" role="note"> Examples of the controller being shown to the user include the controller is in between the display and the user, the display is transparent or the controller is rendered by the operating system. </p> <p><code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-skiprendering" id="ref-for-dom-xrinputsource-skiprendering②">skipRendering</a></code> is a hint to developers about not rendering input sources such as controllers. Pick rays and cursor should still be rendered.</p> <p></p> <p>For input sources with a <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode④">targetRayMode</a></code> of <code class="idl"><a data-link-type="idl" href="#dom-xrtargetraymode-transient-pointer" id="ref-for-dom-xrtargetraymode-transient-pointer②">"transient-pointer"</a></code> the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace④">gripSpace</a></code> should be the associated user gesture if there is one, otherwise it should be another space the user controls such as the ViewerSpace or the gripSpace or the targetRaySpace of another XRInput. This is to allow user the user to still manipulate the targetRaySpace.</p> <p>The <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-gripspace" id="ref-for-dom-xrinputsource-gripspace⑤">gripSpace</a></code> MUST be <code>null</code> if the input source isn’t inherently trackable such as for input sources with a <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode⑤">targetRayMode</a></code> of <code class="idl"><a data-link-type="idl" href="#dom-xrtargetraymode-gaze" id="ref-for-dom-xrtargetraymode-gaze①">"gaze"</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrtargetraymode-screen" id="ref-for-dom-xrtargetraymode-screen①">"screen"</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSource" data-dfn-type="attribute" data-export id="dom-xrinputsource-profiles"><code>profiles</code></dfn> attribute is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②①">list</a> of <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name">input profile name</a>s indicating both the prefered visual representation and behavior of the input source.</p> <p>An <dfn class="dfn-paneled" data-dfn-for="XRInputSource" data-dfn-type="dfn" data-noexport id="xrinputsource-input-profile-name">input profile name</dfn> is an ASCII lowercase <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString⑥">DOMString</a></code> containing no spaces, with separate words concatenated with a hyphen (<code>-</code>) character. A descriptive name should be chosen, using the prefered verbiage of the device vendor when possible. If the platform provides an appropriate identifier, such as a USB vendor and product ID, it MAY be used. Values that uniquely identify a single device, such as serial numbers, MUST NOT be used. The <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name①">input profile name</a> MUST NOT contain an indication of device handedness. If multiple user agents expose the same device, they SHOULD make an effort to report the same <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name②">input profile name</a>. The <a href="https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/registry">WebXR Input Profiles Registry</a> is the recommended location for managing <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name③">input profile name</a>s.</p> <p>Profiles are given in descending order of specificity. Any <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name④">input profile name</a>s given after the first entry in the list should provide fallback values that represent alternative representations of the device. This may include a more generic or prior version of the device, a more widely recognized device that is sufficiently similar, or a broad description of the device type (such as "generic-trigger-touchpad"). If multiple profiles are given, the layouts they describe must all represent a superset or subset of every other profile in the list.</p> <p>If the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⑤">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode④">mode</a> is <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⑧">"inline"</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles②">profiles</a></code> MUST be an empty list.</p> <p>The user agent MAY choose to only report an appropriate generic <a data-link-type="dfn" href="#xrinputsource-input-profile-name" id="ref-for-xrinputsource-input-profile-name⑤">input profile name</a> or an empty list at its discretion. Some scenarios where this would be appropriate are if the input device cannot be reliably identified, no known input profiles match the input device, or the user agent wishes to mask the input device being used.</p> <p class="note" role="note"> For example, the Samsung HMD Odyssey’s controller is a design variant of the standard Windows Mixed Reality controller. Both controllers share the same input layout. As a result, the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles③">profiles</a></code> for a Samsung HMD Odyssey controller could be: <code>["samsung-odyssey", "microsoft-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]</code>. The appearance of the controller is most precisely communicated by the first profile in the list, with the second profile describing an acceptable substitute, and the last profile a generic fallback that describes the device in the roughest sense. (It’s a controller with a trigger, squeeze button, touchpad and thumbstick.) <br><br> Similarly, the Valve Index controller is backwards compatible with the HTC Vive controller, but the Index controller has additional buttons and axes. As a result, the <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-profiles" id="ref-for-dom-xrinputsource-profiles④">profiles</a></code> for the Valve Index controller could be: <code>["valve-index", "htc-vive", "generic-trigger-squeeze-touchpad-thumbstick"]</code>. In this case the input layout described by the <code>"valve-index"</code> profile is a superset of the layout described by the <code>"htc-vive"</code> profile. Also, the <code>"valve-index"</code> profile indicates the precise appearance of the controller, while the <code>"htc-vive"</code> controller has a significantly different appearance. In this case the UA would have deemed that difference acceptable. And as in the first example, the last profile is a generic fallback. <br><br> (Exact strings are examples only. Actual profile names are managed in the <a href="https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/registry">WebXR Input Profiles Registry</a>.) </p> <p class="note" role="note"><span class="marker">Note:</span> <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①④">XRInputSource</a></code>s in an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⑥">XRSession</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-inputsources" id="ref-for-dom-xrsession-inputsources①">inputSources</a></code> array are "live". As such, values within them are updated in-place. This means that it doesn’t work to save a reference to an <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①⑤">XRInputSource</a></code>'s attribute on one frame and compare it to the same attribute in a subsequent frame to test for state changes, because they will be the same object. Therefore developers that wish to compare input state from frame to frame should copy the content of the state in question.</p> <p>An <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑤">XR input source</a> is a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="primary-input-source">primary input source</dfn> if it supports a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="primary-action">primary action</dfn>. The <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action">primary action</a> is a platform-specific action that, when engaged, produces <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-selectstart" id="ref-for-eventdef-xrsession-selectstart①">selectstart</a></code>, <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend①">selectend</a></code>, and <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select②">select</a></code> events. Examples of possible <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①">primary action</a>s are pressing a trigger, touchpad, or button, speaking a command, or making a hand gesture. If the platform guidelines define a recommended primary input then it should be used as the <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action②">primary action</a>, otherwise the user agent is free to select one. The device MUST support at least one <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source⑦">primary input source</a>.</p> <p>An <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑥">XR input source</a> is an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tracked-input-source">tracked input source</dfn> if it does not support a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action③">primary action</a>. These inputs are primarily intended to provide pose data. Note: An example of a <a data-link-type="dfn" href="#tracked-input-source" id="ref-for-tracked-input-source③">tracked input source</a> would be tracking attachments for a users legs or a prop. Tracked hands may also be considered a <a data-link-type="dfn" href="#tracked-input-source" id="ref-for-tracked-input-source④">tracked input source</a> if there is no gesture recognition being performed to detect <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action④">primary action</a>s.</p> <div class="algorithm" data-algorithm="on-input-start"> <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑦">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⑦">XRSession</a></code> <var>session</var> begins its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑤">primary action</a> the UA MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②①">new</a> <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⓪">XRFrame</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②②">relevant realm</a> of <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑥">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time④">time</a> being the time the action occurred.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task①⑨">Queue a task</a> to <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectstart" id="ref-for-eventdef-xrsession-selectstart②">selectstart</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="on-input-end"> <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑧">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⑧">XRSession</a></code> <var>session</var> ends its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑥">primary action</a> the UA MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②②">new</a> <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②①">XRFrame</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②③">relevant realm</a> of <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑦">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑤">time</a> being the time the action occurred.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②⓪">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event①">Fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select③">select</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> <li data-md> <p><a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event②">Fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend②">selectend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> </ol> </ol> </div> <p>Each <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source①⑨">XR input source</a> MAY define a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="primary-squeeze-action">primary squeeze action</dfn>. The <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action">primary squeeze action</a> is a platform-specific action that, when engaged, produces <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeezestart" id="ref-for-eventdef-xrsession-squeezestart①">squeezestart</a></code>, <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeezeend" id="ref-for-eventdef-xrsession-squeezeend①">squeezeend</a></code>, and <code class="idl"><a data-link-type="idl" href="#eventdef-xrsession-squeeze" id="ref-for-eventdef-xrsession-squeeze①">squeeze</a></code> events. The <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action①">primary squeeze action</a> should be used for actions roughly mapping to squeezing or grabbing. Examples of possible <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action②">primary squeeze action</a>s are pressing a grip trigger or making a grabbing hand gesture. If the platform guidelines define a recommended primary squeeze action then it should be used as the <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action③">primary squeeze action</a>, otherwise the user agent MAY select one.</p> <div class="algorithm" data-algorithm="on-squeeze-start"> <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⓪">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⓪⑨">XRSession</a></code> <var>session</var> begins its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action④">primary squeeze action</a> the UA MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②③">new</a> <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②②">XRFrame</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②④">relevant realm</a> of <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑧">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑥">time</a> being the time the action occurred.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②①">Queue a task</a> to <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event③">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-squeezestart" id="ref-for-eventdef-xrsession-squeezestart②">squeezestart</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="on-squeeze-end"> <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②①">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⓪">XRSession</a></code> <var>session</var> ends its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑤">primary squeeze action</a> the UA MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②④">new</a> <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②③">XRFrame</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②⑤">relevant realm</a> of <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session⑨">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑦">time</a> being the time the action occurred.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②②">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event④">Fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-squeeze" id="ref-for-eventdef-xrsession-squeeze②">squeeze</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> <li data-md> <p><a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑤">Fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-squeezeend" id="ref-for-eventdef-xrsession-squeezeend②">squeezeend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> </ol> </ol> </div> <p>Sometimes platform-specific behavior can result in a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑦">primary action</a> or <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑥">primary squeeze action</a> being interrupted or cancelled. For example, an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②②">XR input source</a> may be removed from the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑤">XR device</a> after the <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑧">primary action</a> or <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑦">primary squeeze action</a> is started but before it ends.</p> <div class="algorithm" data-algorithm="on-input-cancelled"> <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②③">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①①">XRSession</a></code> <var>session</var> has its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action⑨">primary action</a> cancelled the UA MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②⑤">new</a> <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②④">XRFrame</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②⑥">relevant realm</a> of <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①⓪">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑧">time</a> being the time the action occurred.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②③">Queue a task</a> to <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑥">fire an input source event</a> an <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent">XRInputSourceEvent</a></code> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend③">selectend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="on-squeeze-cancelled"> <p>When an <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②④">XR input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①②">XRSession</a></code> <var>session</var> has its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑧">primary squeeze action</a> cancelled the UA MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②⑥">new</a> <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑤">XRFrame</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②⑦">relevant realm</a> of <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①①">session</a></code> <var>session</var> with <a data-link-type="dfn" href="#xrframe-time" id="ref-for-xrframe-time⑨">time</a> being the time the action occurred.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②④">Queue a task</a> to <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑦">fire an input source event</a> an <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent①">XRInputSourceEvent</a></code> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-squeezeend" id="ref-for-eventdef-xrsession-squeezeend③">squeezeend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> </ol> </div> <h3 class="heading settled" data-level="10.2" id="transient-input"><span class="secno">10.2. </span><span class="content">Transient input</span><a class="self-link" href="#transient-input"></a></h3> <p>Some <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①④">XR device</a>s may support <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="transient-input-sources">transient input sources</dfn>, where the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⑤">XR input source</a> is only meaningful while performing a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="transient-action">transient action</dfn>, either the <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⓪">primary action</a> for a <a data-link-type="dfn" href="#primary-input-source" id="ref-for-primary-input-source⑧">primary input source</a>, or a device-specific <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="auxiliary-action">auxiliary action</dfn> for an <a data-link-type="dfn" href="#tracked-input-source" id="ref-for-tracked-input-source⑤">tracked input source</a>.</p> <p>One example would be mouse, touch, or stylus input against an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline①⑨">"inline"</a></code> <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①③">XRSession</a></code>, which MUST produce a transient <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①⑥">XRInputSource</a></code> with a <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode⑥">targetRayMode</a></code> set to <code class="idl"><a data-link-type="idl" href="#dom-xrtargetraymode-screen" id="ref-for-dom-xrtargetraymode-screen②">screen</a></code>, treated as a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①①">primary action</a> for the <a data-link-type="dfn" href="https://www.w3.org/TR/pointerevents/#dfn-primary-pointer" id="ref-for-dfn-primary-pointer">primary pointer</a>, and as a non-primary <a data-link-type="dfn" href="#auxiliary-action" id="ref-for-auxiliary-action">auxiliary action</a> for a non-primary pointer.</p> <p>Another example would be intents from the operating system with input derived from sensitive information that cannot be exposed directly, such as interactions based on gaze. These produce a transient <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①⑦">XRInputSource</a></code> with a <code class="idl"><a data-link-type="idl" href="#dom-xrinputsource-targetraymode" id="ref-for-dom-xrinputsource-targetraymode⑦">targetRayMode</a></code> set to <code class="idl"><a data-link-type="idl" href="#dom-xrtargetraymode-transient-pointer" id="ref-for-dom-xrtargetraymode-transient-pointer③">transient-pointer</a></code>, treated as a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①②">primary action</a>.</p> <p><a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources">Transient input sources</a> are only present in the session’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources⑨">list of active XR input sources</a> for the duration of the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action">transient action</a>.</p> <p><a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources①">Transient input sources</a> follow the following sequence when handling <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action①">transient actions</a> instead of the algorithms for non-transient <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①③">primary actions</a>:</p> <div class="algorithm" data-algorithm="on-transient-input-start"> <p>When a <a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources②">transient input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①④">XRSession</a></code> <var>session</var> begins its <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action②">transient action</a> the UA MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②⑦">new</a> <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑥">XRFrame</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②⑧">relevant realm</a> of <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①②">session</a></code> <var>session</var> for the time the action occurred.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②⑤">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p>Fire any <code>"pointerdown"</code> events produced by the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⑥">XR input source</a>'s action, if necessary.</p> <li data-md> <p><a data-link-type="dfn" href="#xrsession-add-input-source" id="ref-for-xrsession-add-input-source①">Add the XR input source</a> to the <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources①⓪">list of active XR input sources</a>.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action③">transient action</a> is a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①④">primary action</a>, <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑧">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectstart" id="ref-for-eventdef-xrsession-selectstart③">selectstart</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> </ol> </ol> </div> <div class="algorithm" data-algorithm="on-transient-input-end"> <p>When a <a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources③">transient input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⑤">XRSession</a></code> <var>session</var> ends its <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action④">transient action</a> the UA MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②⑧">new</a> <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑦">XRFrame</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②⑨">relevant realm</a> of <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①③">session</a></code> <var>session</var> for the time the action occurred.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②⑥">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p>If the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action⑤">transient action</a> is a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑤">primary action</a>, <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event⑨">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-select" id="ref-for-eventdef-xrsession-select④">select</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> <li data-md> <p>Fire any <code>"click"</code> events produced by the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⑦">XR input source</a>'s action, if necessary.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action⑥">transient action</a> is a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑥">primary action</a>, <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event①⓪">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend④">selectend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> <li data-md> <p><a data-link-type="dfn" href="#xrsession-remove-input-source" id="ref-for-xrsession-remove-input-source①">Remove the XR input source</a> from the <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources①①">list of active XR input sources</a>.</p> <li data-md> <p>Fire any <code>"pointerup"</code> events produced by the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⑧">XR input source</a>'s action, if necessary.</p> </ol> </ol> </div> <div class="algorithm" data-algorithm="on-transient-input-cancelled"> <p>When a <a data-link-type="dfn" href="#transient-input-sources" id="ref-for-transient-input-sources④">transient input source</a> <var>source</var> for <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⑥">XRSession</a></code> <var>session</var> has its <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action⑦">transient action</a> cancelled the UA MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>frame</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new②⑨">new</a> <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑧">XRFrame</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm③⓪">relevant realm</a> of <var>session</var> with <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①④">session</a></code> <var>session</var> for the time the action occurred.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②⑦">Queue a task</a> to perform the following steps:</p> <ol> <li data-md> <p>If the <a data-link-type="dfn" href="#transient-action" id="ref-for-transient-action⑧">transient action</a> is a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑦">primary action</a>, <a data-link-type="dfn" href="#fire-an-input-source-event" id="ref-for-fire-an-input-source-event①①">fire an input source event</a> with name <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-xrsession-selectend" id="ref-for-eventdef-xrsession-selectend⑤">selectend</a></code>, frame <var>frame</var>, and source <var>source</var>.</p> <li data-md> <p><a data-link-type="dfn" href="#xrsession-remove-input-source" id="ref-for-xrsession-remove-input-source②">Remove the XR input source</a> from the <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources①②">list of active XR input sources</a>.</p> <li data-md> <p>Fire any <code>"pointerup"</code> events produced by the <a data-link-type="dfn" href="#xr-input-source" id="ref-for-xr-input-source②⑨">XR input source</a>'s action, if necessary.</p> </ol> </ol> </div> <h3 class="heading settled" data-level="10.3" id="xrinputsourcearray-interface"><span class="secno">10.3. </span><span class="content">XRInputSourceArray</span><a class="self-link" href="#xrinputsourcearray-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray②">XRInputSourceArray</a></code> represents a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②②">list</a> of <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource①⑧">XRInputSource</a></code>s. It is used in favor of a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-frozen-array-type" id="ref-for-dfn-frozen-array-type">frozen array type</a> when the contents of the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②③">list</a> are expected to change over time, such as with the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①①⑦">XRSession</a></code> <code class="idl"><a data-link-type="idl" href="#dom-xrsession-inputsources" id="ref-for-dom-xrsession-inputsources②">inputSources</a></code> attribute.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①④"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①③"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrinputsourcearray"><code><c- g>XRInputSourceArray</c-></code></dfn> { <c- b>iterable</c-><<a data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource①⑨"><c- n>XRInputSource</c-></a>>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long②"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrinputsourcearray-length" id="ref-for-dom-xrinputsourcearray-length"><c- g>length</c-></a>; <c- b>getter</c-> <a data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⓪"><c- n>XRInputSource</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long③"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceArray/__getter__(index)" data-dfn-type="argument" data-export id="dom-xrinputsourcearray-__getter__-index-index"><code><c- g>index</c-></code><a class="self-link" href="#dom-xrinputsourcearray-__getter__-index-index"></a></dfn>); }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourceArray" data-dfn-type="attribute" data-export id="dom-xrinputsourcearray-length"><code>length</code></dfn> attribute of <code class="idl"><a data-link-type="idl" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray③">XRInputSourceArray</a></code> indicates how many <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②①">XRInputSource</a></code>s are contained within the <code class="idl"><a data-link-type="idl" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray④">XRInputSourceArray</a></code>.</p> <p>The <dfn data-dfn-for="XRInputSourceArray" data-dfn-type="dfn" data-export id="xrinputsourcearray-indexed-property-getter"><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-indexed-property-getter" id="ref-for-dfn-indexed-property-getter">indexed property getter</a><a class="self-link" href="#xrinputsourcearray-indexed-property-getter"></a></dfn> of <code class="idl"><a data-link-type="idl" href="#xrinputsourcearray" id="ref-for-xrinputsourcearray⑤">XRInputSourceArray</a></code> retrieves the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②②">XRInputSource</a></code> at the provided index.</p> <h2 class="heading settled" data-level="11" id="layers"><span class="secno">11. </span><span class="content">Layers</span><a class="self-link" href="#layers"></a></h2> <p class="note" role="note"><span class="marker">Note:</span> While this specification only defines the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑦">XRWebGLLayer</a></code> layer, future extensions to the spec are expected to add additional layer types and the image sources that they draw from.</p> <h3 class="heading settled" data-level="11.1" id="xrlayer-interface"><span class="secno">11.1. </span><span class="content">XRLayer</span><a class="self-link" href="#xrlayer-interface"></a></h3> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①⑤"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①④"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrlayer"><code><c- g>XRLayer</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget③"><c- n>EventTarget</c-></a> {}; </pre> <p><code class="idl"><a data-link-type="idl" href="#xrlayer" id="ref-for-xrlayer①">XRLayer</a></code> is the base class for <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑧">XRWebGLLayer</a></code> and other layer types introduced by future extensions.</p> <h3 class="heading settled" data-level="11.2" id="xrwebgllayer-interface"><span class="secno">11.2. </span><span class="content">XRWebGLLayer</span><a class="self-link" href="#xrwebgllayer-interface"></a></h3> <p>An <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer⑨">XRWebGLLayer</a></code> is a layer which provides a WebGL framebuffer to render into, enabling hardware accelerated rendering of 3D graphics to be presented on the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑥">XR device</a>.</p> <pre class="idl highlight def"><c- b>typedef</c-> (<a data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext①"><c- n>WebGLRenderingContext</c-></a> <c- b>or</c-> <a data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/2.0/#WebGL2RenderingContext" id="ref-for-WebGL2RenderingContext"><c- n>WebGL2RenderingContext</c-></a>) <dfn class="dfn-paneled idl-code" data-dfn-type="typedef" data-export id="typedefdef-xrwebglrenderingcontext"><code><c- g>XRWebGLRenderingContext</c-></code></dfn>; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrwebgllayerinit"><code><c- g>XRWebGLLayerInit</c-></code></dfn> { <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean④"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="true" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-antialias"><code><c- g>antialias</c-></code></dfn> = <c- b>true</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean⑤"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="true" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-depth"><code><c- g>depth</c-></code></dfn> = <c- b>true</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean⑥"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="false" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-stencil"><code><c- g>stencil</c-></code></dfn> = <c- b>false</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean⑦"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="true" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-alpha"><code><c- g>alpha</c-></code></dfn> = <c- b>true</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean⑧"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="false" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-xrwebgllayerinit-ignoredepthvalues"><code><c- g>ignoreDepthValues</c-></code></dfn> = <c- b>false</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double⑧"><c- b>double</c-></a> <dfn class="dfn-paneled idl-code" data-default="1.0" data-dfn-for="XRWebGLLayerInit" data-dfn-type="dict-member" data-export data-type="double " id="dom-xrwebgllayerinit-framebufferscalefactor"><code><c- g>framebufferScaleFactor</c-></code></dfn> = 1.0; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①⑥"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①⑤"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrwebgllayer"><code><c- g>XRWebGLLayer</c-></code></dfn>: <a data-link-type="idl-name" href="#xrlayer" id="ref-for-xrlayer②"><c- n>XRLayer</c-></a> { <a class="idl-code" data-link-type="constructor" href="#dom-xrwebgllayer-xrwebgllayer" id="ref-for-dom-xrwebgllayer-xrwebgllayer"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①①⑧"><c- n>XRSession</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/XRWebGLLayer(session, context, layerInit), XRWebGLLayer/constructor(session, context, layerInit), XRWebGLLayer/XRWebGLLayer(session, context), XRWebGLLayer/constructor(session, context)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-session"><code><c- g>session</c-></code><a class="self-link" href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-session"></a></dfn>, <a data-link-type="idl-name" href="#typedefdef-xrwebglrenderingcontext" id="ref-for-typedefdef-xrwebglrenderingcontext"><c- n>XRWebGLRenderingContext</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/XRWebGLLayer(session, context, layerInit), XRWebGLLayer/constructor(session, context, layerInit), XRWebGLLayer/XRWebGLLayer(session, context), XRWebGLLayer/constructor(session, context)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-context"><code><c- g>context</c-></code><a class="self-link" href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-context"></a></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-xrwebgllayerinit" id="ref-for-dictdef-xrwebgllayerinit"><c- n>XRWebGLLayerInit</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/XRWebGLLayer(session, context, layerInit), XRWebGLLayer/constructor(session, context, layerInit), XRWebGLLayer/XRWebGLLayer(session, context), XRWebGLLayer/constructor(session, context)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-layerinit"><code><c- g>layerInit</c-></code><a class="self-link" href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-layerinit"></a></dfn> = {}); // Attributes <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean⑨"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrwebgllayer-antialias" id="ref-for-dom-xrwebgllayer-antialias"><c- g>antialias</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean①⓪"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrwebgllayer-ignoredepthvalues" id="ref-for-dom-xrwebgllayer-ignoredepthvalues"><c- g>ignoreDepthValues</c-></a>; <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-float" id="ref-for-idl-float②"><c- b>float</c-></a>? <a class="idl-code" data-link-type="attribute" data-type="float?" href="#dom-xrwebgllayer-fixedfoveation" id="ref-for-dom-xrwebgllayer-fixedfoveation"><c- g>fixedFoveation</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①⑥"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer"><c- n>WebGLFramebuffer</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="WebGLFramebuffer?" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer"><c- g>framebuffer</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long④"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrwebgllayer-framebufferwidth" id="ref-for-dom-xrwebgllayer-framebufferwidth"><c- g>framebufferWidth</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑤"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrwebgllayer-framebufferheight" id="ref-for-dom-xrwebgllayer-framebufferheight"><c- g>framebufferHeight</c-></a>; // Methods <a data-link-type="idl-name" href="#xrviewport" id="ref-for-xrviewport⑤"><c- n>XRViewport</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrwebgllayer-getviewport" id="ref-for-dom-xrwebgllayer-getviewport③"><c- g>getViewport</c-></a>(<a data-link-type="idl-name" href="#xrview" id="ref-for-xrview①⑥"><c- n>XRView</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/getViewport(view)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-getviewport-view-view"><code><c- g>view</c-></code><a class="self-link" href="#dom-xrwebgllayer-getviewport-view-view"></a></dfn>); // Static Methods <c- b>static</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double⑨"><c- b>double</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrwebgllayer-getnativeframebufferscalefactor" id="ref-for-dom-xrwebgllayer-getnativeframebufferscalefactor"><c- g>getNativeFramebufferScaleFactor</c-></a>(<a data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①①⑨"><c- n>XRSession</c-></a> <dfn class="idl-code" data-dfn-for="XRWebGLLayer/getNativeFramebufferScaleFactor(session)" data-dfn-type="argument" data-export id="dom-xrwebgllayer-getnativeframebufferscalefactor-session-session"><code><c- g>session</c-></code><a class="self-link" href="#dom-xrwebgllayer-getnativeframebufferscalefactor-session-session"></a></dfn>); }; </pre> <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⓪">XRWebGLLayer</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRWebGLLayer" data-dfn-type="dfn" data-noexport id="xrwebgllayer-context">context</dfn> object, initially <code>null</code>, which is an instance of either a <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext②">WebGLRenderingContext</a></code> or a <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/2.0/#WebGL2RenderingContext" id="ref-for-WebGL2RenderingContext①">WebGL2RenderingContext</a></code>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①①">XRWebGLLayer</a></code> has an associated <dfn class="dfn-paneled" data-dfn-for="XRWebGLLayer" data-dfn-type="dfn" data-noexport id="xrwebgllayer-session">session</dfn>, which is the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②⓪">XRSession</a></code> it was created with.</p> <div class="algorithm" data-algorithm="construct-webgl-layer"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="constructor" data-export data-lt="XRWebGLLayer(session, context, layerInit)|constructor(session, context, layerInit)|XRWebGLLayer(session, context)|constructor(session, context)" id="dom-xrwebgllayer-xrwebgllayer"><code>XRWebGLLayer(<var>session</var>, <var>context</var>, <var>layerInit</var>)</code></dfn> constructor MUST perform the following steps when invoked:</p> <ol> <li data-md> <p>Let <var>layer</var> be a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new③⓪">new</a> <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①②">XRWebGLLayer</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm③①">relevant realm</a> of <var>session</var>.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended⑥">ended</a> value is <code>true</code>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①③">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>If <var>context</var> is lost, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①④">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>If <var>session</var> is an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②⑦">immersive session</a> and <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①">XR compatible</a> boolean is <code>false</code>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①⑤">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context①">context</a> to <var>context</var>.</p> <li data-md> <p>Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-session" id="ref-for-xrwebgllayer-session">session</a> to <var>session</var>.</p> <li data-md> <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-ignoredepthvalues" id="ref-for-dom-xrwebgllayer-ignoredepthvalues①">ignoreDepthValues</a></code> as follows:</p> <dl class="switch"> <dt data-md>If <var>layerInit</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-ignoredepthvalues" id="ref-for-dom-xrwebgllayerinit-ignoredepthvalues">ignoreDepthValues</a></code> value is <code>false</code> and the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor⑧">XR Compositor</a> will make use of depth values: <dd data-md> <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-ignoredepthvalues" id="ref-for-dom-xrwebgllayer-ignoredepthvalues②">ignoreDepthValues</a></code> to <code>false</code>.</p> <dt data-md>Otherwise: <dd data-md> <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-ignoredepthvalues" id="ref-for-dom-xrwebgllayer-ignoredepthvalues③">ignoreDepthValues</a></code> to <code>true</code>.</p> </dl> <li data-md> <p>Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-composition-enabled" id="ref-for-xrwebgllayer-composition-enabled①">composition enabled</a> boolean as follows:</p> <dl class="switch"> <dt data-md>If <var>session</var> is an <a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session④">inline session</a>: <dd data-md> <p>Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-composition-enabled" id="ref-for-xrwebgllayer-composition-enabled②">composition enabled</a> to <code>false</code>.</p> <dt data-md>Otherwise: <dd data-md> <p>Initialize <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-composition-enabled" id="ref-for-xrwebgllayer-composition-enabled③">composition enabled</a> boolean to <code>true</code>.</p> </dl> <li data-md> <dl class="switch"> <dt data-md>If <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-composition-enabled" id="ref-for-xrwebgllayer-composition-enabled④">composition enabled</a> boolean is <code>true</code>: <dd data-md> <ol> <li data-md> <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-antialias" id="ref-for-dom-xrwebgllayer-antialias①">antialias</a></code> to <var>layerInit</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-antialias" id="ref-for-dom-xrwebgllayerinit-antialias">antialias</a></code> value.</p> <li data-md> <p>Let <var>scaleFactor</var> be <var>layerInit</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-framebufferscalefactor" id="ref-for-dom-xrwebgllayerinit-framebufferscalefactor">framebufferScaleFactor</a></code>.</p> <li data-md> <p>The user agent MAY choose to clamp or round <var>scaleFactor</var> as it sees fit here, for example if it wishes to fit the buffer dimensions into a power of two for performance reasons.</p> <li data-md> <p>Let <var>framebufferSize</var> be the <a data-link-type="dfn" href="#recommended-webgl-framebuffer-resolution" id="ref-for-recommended-webgl-framebuffer-resolution">recommended WebGL framebuffer resolution</a> with width and height separately multiplied by <var>scaleFactor</var>.</p> <li data-md> <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer①">framebuffer</a></code> to a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#new" id="ref-for-new③①">new</a> <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer①">WebGLFramebuffer</a></code> in the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm③②">relevant realm</a> of <var>context</var>, which is an <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer">opaque framebuffer</a> with the dimensions <var>framebufferSize</var> created with <var>context</var>, <a data-link-type="dfn" href="#opaque-framebuffer-session" id="ref-for-opaque-framebuffer-session">session</a> initialized to <var>session</var>, and <var>layerInit</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-depth" id="ref-for-dom-xrwebgllayerinit-depth">depth</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-stencil" id="ref-for-dom-xrwebgllayerinit-stencil">stencil</a></code>, and <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-alpha" id="ref-for-dom-xrwebgllayerinit-alpha">alpha</a></code> values.</p> <li data-md> <p>Allocate and initialize resources compatible with <var>session</var>’s <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑦">XR device</a>, including GPU accessible memory buffers, as required to support the compositing of <var>layer</var>.</p> <li data-md> <p>If <var>layer</var>’s resources were unable to be created for any reason, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#operationerror" id="ref-for-operationerror">OperationError</a></code> and abort these steps.</p> </ol> <dt data-md>Otherwise: <dd data-md> <ol> <li data-md> <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-antialias" id="ref-for-dom-xrwebgllayer-antialias②">antialias</a></code> to <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-context" id="ref-for-dom-xrwebgllayer-context">context</a></code>'s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#actual-context-parameters" id="ref-for-actual-context-parameters">actual context parameters</a> <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes">antialias</a></code> value.</p> <li data-md> <p>Initialize <var>layer</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer②">framebuffer</a></code> to <code>null</code>.</p> </ol> </dl> <li data-md> <p>Return <var>layer</var>.</p> </ol> </div> <p class="note" role="note"><span class="marker">Note:</span> If an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①③">XRWebGLLayer</a></code>'s <a data-link-type="dfn" href="#xrwebgllayer-composition-enabled" id="ref-for-xrwebgllayer-composition-enabled⑤">composition enabled</a> boolean is set to <code>false</code> all values on the <code class="idl"><a data-link-type="idl" href="#dictdef-xrwebgllayerinit" id="ref-for-dictdef-xrwebgllayerinit①">XRWebGLLayerInit</a></code> object are ignored, since the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext③">WebGLRenderingContext</a></code>'s default framebuffer was already allocated using the context’s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#actual-context-parameters" id="ref-for-actual-context-parameters①">actual context parameters</a> and cannot be overridden.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-context"><code>context</code></dfn> attribute is the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext④">WebGLRenderingContext</a></code> the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①④">XRWebGLLayer</a></code> was created with.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑤">XRWebGLLayer</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRWebGLLayer" data-dfn-type="dfn" data-noexport id="xrwebgllayer-composition-enabled">composition enabled</dfn> boolean which is initially set to <code>true</code>. If set to <code>false</code> it indicates that the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑥">XRWebGLLayer</a></code> MUST NOT allocate its own <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer②">WebGLFramebuffer</a></code>, and all properties of the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑦">XRWebGLLayer</a></code> that reflect <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer③">framebuffer</a></code> properties MUST instead reflect the properties of the <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context②">context</a>'s default framebuffer.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-framebuffer"><code>framebuffer</code></dfn> attribute of an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑧">XRWebGLLayer</a></code> is an instance of a <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer③">WebGLFramebuffer</a></code> which has been marked as <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①">opaque</a> if <a data-link-type="dfn" href="#xrwebgllayer-composition-enabled" id="ref-for-xrwebgllayer-composition-enabled⑥">composition enabled</a> is <code>true</code>, and <code>null</code> otherwise. The <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer④">framebuffer</a></code> size cannot be adjusted by the developer after the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer①⑨">XRWebGLLayer</a></code> has been created.</p> <p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="opaque-framebuffer">opaque framebuffer</dfn> functions identically to a standard <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer" id="ref-for-WebGLFramebuffer④">WebGLFramebuffer</a></code> with the following changes that make it behave more like the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2" id="ref-for-2.2">default framebuffer</a>:</p> <ul> <li data-md> <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer②">opaque framebuffer</a> MAY support antialiasing, even in WebGL 1.0.</p> <li data-md> <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer③">opaque framebuffer</a>'s attachments cannot be inspected or changed. Calling <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6">framebufferTexture2D</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6①">framebufferRenderbuffer</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6②">deleteFramebuffer</a></code>, or <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6③">getFramebufferAttachmentParameter</a></code> with an <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer④">opaque framebuffer</a> MUST generate an <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase①">INVALID_OPERATION</a></code> error.</p> <li data-md> <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑤">opaque framebuffer</a> has a related <dfn class="dfn-paneled" data-dfn-for="opaque framebuffer" data-dfn-type="dfn" data-noexport id="opaque-framebuffer-session">session</dfn>, which is the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②①">XRSession</a></code> it was created for.</p> <li data-md> <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑥">opaque framebuffer</a> is considered incomplete outside of a <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe①③">requestAnimationFrame()</a></code> callback. When not in the <code class="idl"><a data-link-type="idl" href="#dom-xrsession-requestanimationframe" id="ref-for-dom-xrsession-requestanimationframe①④">requestAnimationFrame()</a></code> callback of its <a data-link-type="dfn" href="#opaque-framebuffer-session" id="ref-for-opaque-framebuffer-session①">session</a>, calls to <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6" id="ref-for-5.14.6④">checkFramebufferStatus</a></code> MUST generate a <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase②">FRAMEBUFFER_UNSUPPORTED</a></code> error and attempts to clear, draw to, or read from the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑦">opaque framebuffer</a> MUST generate an <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase③">INVALID_FRAMEBUFFER_OPERATION</a></code> error.</p> <li data-md> <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑧">opaque framebuffer</a> initialized with <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-depth" id="ref-for-dom-xrwebgllayerinit-depth①">depth</a></code> <code>true</code> will have an attached depth buffer.</p> <li data-md> <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer⑨">opaque framebuffer</a> initialized with <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-stencil" id="ref-for-dom-xrwebgllayerinit-stencil①">stencil</a></code> <code>true</code> will have an attached stencil buffer.</p> <li data-md> <p>An <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①⓪">opaque framebuffer</a>'s color buffer will have an alpha channel if and only if <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-alpha" id="ref-for-dom-xrwebgllayerinit-alpha①">alpha</a></code> is <code>true</code>.</p> <li data-md> <p>The <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor⑨">XR Compositor</a> will assume the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①①">opaque framebuffer</a> contains colors with premultiplied alpha. This is true regardless of the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes①">premultipliedAlpha</a></code> value set in the <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-context" id="ref-for-dom-xrwebgllayer-context①">context</a></code>'s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#actual-context-parameters" id="ref-for-actual-context-parameters②">actual context parameters</a>.</p> </ul> <p class="note" role="note"><span class="marker">Note:</span> User agents are required to respect <code>true</code> values of <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-depth" id="ref-for-dom-xrwebgllayerinit-depth②">depth</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-stencil" id="ref-for-dom-xrwebgllayerinit-stencil②">stencil</a></code>, which is similar to WebGL’s behavior when <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#create-a-drawing-buffer" id="ref-for-create-a-drawing-buffer">creating a drawing buffer</a>.</p> <p>The buffers attached to an <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①②">opaque framebuffer</a> MUST be cleared to the values in the table below when first created, or prior to the processing of each <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame③">XR animation frame</a>. This is identical to the behavior of the WebGL context’s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2" id="ref-for-2.2①">default framebuffer</a>. <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①③">Opaque framebuffers</a> will always be cleared regardless of the associated WebGL context’s <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes②">preserveDrawingBuffer</a></code> value.</p> <table class="tg"> <thead> <tr> <th>Buffer <th>Clear Value <tbody> <tr> <td>Color <td>(0, 0, 0, 0) <tr> <td>Depth <td>1.0 <tr> <td>Stencil <td>0 </table> <p class="note" role="note"><span class="marker">Note:</span> Implementations may optimize away the required implicit clear operation of the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①④">opaque framebuffer</a> as long as a guarantee can be made that the developer cannot gain access to buffer contents from another process. For instance, if the developer performs an explicit clear then the implicit clear is not needed.</p> <p>If an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②⓪">XRWebGLLayer</a></code> is created with an <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-alpha" id="ref-for-dom-xrwebgllayerinit-alpha②">alpha</a></code> set to <code>true</code>, the <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer⑤">framebuffer</a></code> must be backed by a texture with the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14" id="ref-for-5.14">RGBA</a></code> color format. If an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②①">XRWebGLLayer</a></code> is created with an <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-alpha" id="ref-for-dom-xrwebgllayerinit-alpha③">alpha</a></code> set to <code>false</code>, the <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer⑥">framebuffer</a></code> must be backed by a texture with the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14" id="ref-for-5.14①">RGB</a></code> color format.</p> <p>However, the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①⓪">XR Compositor</a> MUST treat the <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer⑦">framebuffer</a></code>'s backing’s pixels as if they were in the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.14" id="ref-for-5.14②">SRGB8_ALPHA8</a></code> or <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.14" id="ref-for-5.14③">SRGB8</a></code> <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/webxrlayers-1/#dom-xrlayerinit-colorformat" id="ref-for-dom-xrlayerinit-colorformat">colorFormat</a></code>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> this means that the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①①">XR Compositor</a> MUST not do any gamma conversion from linear <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14" id="ref-for-5.14④">RGBA</a></code> or <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14" id="ref-for-5.14⑤">RGB</a></code> when it processes the texture backing the <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer⑧">framebuffer</a></code>. Otherwise, the pixels in the final rendering will appear too bright which will not match the rendering on a regular 2D <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext⑤">WebGLRenderingContext</a></code> context.</p> <p>When an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②②">XRWebGLLayer</a></code> is set as an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②⑧">immersive session</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer⑧">baseLayer</a></code> the content of the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①⑤">opaque framebuffer</a> is presented to the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②①">immersive XR device</a> immediately after an <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame④">XR animation frame</a> completes, but only if at least one of the following has occurred since the previous <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame⑤">XR animation frame</a>:</p> <ul> <li data-md> <p>The <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session②⑨">immersive session</a>'s <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-baselayer" id="ref-for-dom-xrrenderstate-baselayer⑨">baseLayer</a></code> was changed.</p> <li data-md> <p><code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11" id="ref-for-5.14.11">clear</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11" id="ref-for-5.14.11①">drawArrays</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11" id="ref-for-5.14.11②">drawElements</a></code>, or any other rendering operation which similarly affects the framebuffer’s color values has been called while the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①⑥">opaque framebuffer</a> is the currently bound framebuffer of the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext" id="ref-for-WebGLRenderingContext⑥">WebGLRenderingContext</a></code> associated with the <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②③">XRWebGLLayer</a></code>.</p> </ul> <p>Before the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①⑦">opaque framebuffer</a> is presented to the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②②">immersive XR device</a> the user agent shall ensure that all rendering operations have been flushed to the <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①⑧">opaque framebuffer</a>.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②④">XRWebGLLayer</a></code> has a <dfn class="dfn-paneled" data-dfn-for="XRWebGLLayer" data-dfn-type="dfn" data-noexport id="xrwebgllayer-target-framebuffer">target framebuffer</dfn>, which is the <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-framebuffer" id="ref-for-dom-xrwebgllayer-framebuffer⑨">framebuffer</a></code> if <a data-link-type="dfn" href="#xrwebgllayer-composition-enabled" id="ref-for-xrwebgllayer-composition-enabled⑦">composition enabled</a> is <code>true</code>, and the <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context③">context</a>'s default framebuffer otherwise.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-framebufferwidth"><code>framebufferWidth</code></dfn> and <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-framebufferheight"><code>framebufferHeight</code></dfn> attributes return the width and height of the <a data-link-type="dfn" href="#xrwebgllayer-target-framebuffer" id="ref-for-xrwebgllayer-target-framebuffer">target framebuffer</a>'s attachments, respectively.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-antialias"><code>antialias</code></dfn> attribute is <code>true</code> if the <a data-link-type="dfn" href="#xrwebgllayer-target-framebuffer" id="ref-for-xrwebgllayer-target-framebuffer①">target framebuffer</a> supports antialiasing using a technique of the UA’s choosing, and <code>false</code> if no antialiasing will be performed.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-ignoredepthvalues"><code>ignoreDepthValues</code></dfn> attribute, if <code>true</code>, indicates the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①②">XR Compositor</a> MUST NOT make use of values in the depth buffer attachment when rendering. When the attribute is <code>false</code> it indicates that the content of the depth buffer attachment will be used by the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①③">XR Compositor</a> and is expected to be representative of the scene rendered into the layer.</p> <p>Depth values stored in the buffer are expected to be between <code>0.0</code> and <code>1.0</code>, with <code>0.0</code> representing the distance of <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthnear" id="ref-for-dom-xrrenderstate-depthnear⑧">depthNear</a></code> and <code>1.0</code> representing the distance of <code class="idl"><a data-link-type="idl" href="#dom-xrrenderstate-depthfar" id="ref-for-dom-xrrenderstate-depthfar⑧">depthFar</a></code>, with intermediate values interpolated linearly. This is the default behavior of WebGL. (See documentation for the <a href="https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glDepthRangef.xml">depthRange function</a> for additional details.)</p> <p class="note" role="note"><span class="marker">Note:</span> Making the scene’s depth buffer available to the compositor allows some platforms to provide quality and comfort improvements such as improved reprojection.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="attribute" data-export id="dom-xrwebgllayer-fixedfoveation"><code>fixedFoveation</code></dfn> attribute controls the amount of foveation used by the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①④">XR Compositor</a>. If the user agent or device does not support this attribute, they should return <code>null</code> on getting, and setting should be a <code>no-op</code>. Setting <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-fixedfoveation" id="ref-for-dom-xrwebgllayer-fixedfoveation①">fixedFoveation</a></code> to a value less than <code>0</code> will set it to <code>0</code> and setting it to a value higher than <code>1</code> will set it to <code>1</code>. <code>0</code> sets the minimum amount of foveation while <code>1</code> sets the maximum. It is up to the user agent how the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①⑤">XR Compositor</a> interprets these values. If the <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-fixedfoveation" id="ref-for-dom-xrwebgllayer-fixedfoveation②">fixedFoveation</a></code> level was changed, it will take effect at the next <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe②⑨">XRFrame</a></code>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Fixed foveation is a technique that reduces the resolution content renders at near the edges of the user’s field of view. It can significantly improve experiences that are limited by GPU fill performance. It reduces power consumption and enables applications to increase the resolution of eye textures. It is most useful for low contrast textures, such as background images but less for high contrast ones such as text or detailed images. Authors can adjust the level on a per frame basis to achieve the best tradeoff between performance and visual quality.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②⑤">XRWebGLLayer</a></code> MUST have a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-full-sized-viewports">list of full-sized viewports</dfn> which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②④">list</a> containing one <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4④">WebGL viewport</a> for each <a data-link-type="dfn" href="#view" id="ref-for-view③④">view</a> the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②②">XRSession</a></code> may expose, including <a data-link-type="dfn" href="#secondary-view" id="ref-for-secondary-view①②">secondary views</a> that are not currently <a data-link-type="dfn" href="#view-active" id="ref-for-view-active⑧">active</a> but may become <a data-link-type="dfn" href="#view-active" id="ref-for-view-active⑨">active</a> for the current session. The viewports MUST have a <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-width" id="ref-for-dom-xrviewport-width③">width</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrviewport-height" id="ref-for-dom-xrviewport-height③">height</a></code> greater than <code>0</code> and MUST describe a rectangle that does not exceed the bounds of the <a data-link-type="dfn" href="#xrwebgllayer-target-framebuffer" id="ref-for-xrwebgllayer-target-framebuffer②">target framebuffer</a>. The viewports MUST NOT be overlapping. If <a data-link-type="dfn" href="#xrwebgllayer-composition-enabled" id="ref-for-xrwebgllayer-composition-enabled⑧">composition enabled</a> is <code>false</code>, the <a data-link-type="dfn" href="#list-of-full-sized-viewports" id="ref-for-list-of-full-sized-viewports②">list of full-sized viewports</a> MUST contain a single <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4" id="ref-for-5.14.4⑤">WebGL viewport</a> that covers the <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context④">context</a>'s entire default framebuffer.</p> <p>Each <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②⑥">XRWebGLLayer</a></code> MUST have a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="list-of-viewport-objects">list of viewport objects</dfn> which is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②⑤">list</a> containing one <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport⑥">XRViewport</a></code> for each <a data-link-type="dfn" href="#view-active" id="ref-for-view-active①⓪">active</a> <a data-link-type="dfn" href="#view" id="ref-for-view③⑤">view</a> the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②③">XRSession</a></code> currently exposes.</p> <p><code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-getviewport" id="ref-for-dom-xrwebgllayer-getviewport④">getViewport()</a></code> queries the <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport⑦">XRViewport</a></code> the given <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⑦">XRView</a></code> should use when rendering to the layer.</p> <div class="algorithm" data-algorithm="get-viewport"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="method" data-export id="dom-xrwebgllayer-getviewport"><code>getViewport(<var>view</var>)</code></dfn> method, when invoked on an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②⑦">XRWebGLLayer</a></code> <var>layer</var>, MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>session</var> be <var>view</var>’s <a data-link-type="dfn" href="#xrview-session" id="ref-for-xrview-session①">session</a>.</p> <li data-md> <p>Let <var>frame</var> be <var>session</var>’s <a data-link-type="dfn" href="#xrsession-animation-frame" id="ref-for-xrsession-animation-frame①">animation frame</a>.</p> <li data-md> <p>If <var>session</var> is not equal to <var>layer</var>’s <a data-link-type="dfn" href="#xrwebgllayer-session" id="ref-for-xrwebgllayer-session①">session</a>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①⑥">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>If <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active④">active</a> boolean is <code>false</code>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①⑦">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>If <var>view</var>’s <a data-link-type="dfn" href="#xrview-frame" id="ref-for-xrview-frame①">frame</a> is not equal to <var>frame</var>, throw an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①⑧">InvalidStateError</a></code> and abort these steps.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#view-viewport-modifiable" id="ref-for-view-viewport-modifiable①">viewport modifiable</a> flag is <code>true</code> and <var>view</var>’s <a data-link-type="dfn" href="#view-requested-viewport-scale" id="ref-for-view-requested-viewport-scale③">requested viewport scale</a> is not equal to <a data-link-type="dfn" href="#view-current-viewport-scale" id="ref-for-view-current-viewport-scale①">current viewport scale</a>:</p> <ol> <li data-md> <p>Set <a data-link-type="dfn" href="#view-current-viewport-scale" id="ref-for-view-current-viewport-scale②">current viewport scale</a> to <a data-link-type="dfn" href="#view-requested-viewport-scale" id="ref-for-view-requested-viewport-scale④">requested viewport scale</a>.</p> <li data-md> <p>In the <a data-link-type="dfn" href="#list-of-viewport-objects" id="ref-for-list-of-viewport-objects②">list of viewport objects</a>, set the <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport⑧">XRViewport</a></code> associated with <var>view</var> to the <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport⑨">XRViewport</a></code> result of <a data-link-type="dfn" href="#xrview-obtain-a-scaled-viewport" id="ref-for-xrview-obtain-a-scaled-viewport①">obtaining a scaled viewport</a> from the <a data-link-type="dfn" href="#list-of-full-sized-viewports" id="ref-for-list-of-full-sized-viewports③">list of full-sized viewports</a> associated with <var>view</var> for <var>session</var>.</p> </ol> <li data-md> <p>Set the <var>view</var>’s <a data-link-type="dfn" href="#view-viewport-modifiable" id="ref-for-view-viewport-modifiable②">viewport modifiable</a> flag to false.</p> <li data-md> <p>Let <var>viewport</var> be the <code class="idl"><a data-link-type="idl" href="#xrviewport" id="ref-for-xrviewport①⓪">XRViewport</a></code> from the <a data-link-type="dfn" href="#list-of-viewport-objects" id="ref-for-list-of-viewport-objects③">list of viewport objects</a> associated with <var>view</var>.</p> <li data-md> <p>Return <var>viewport</var>.</p> </ol> <p class="note" role="note"><span class="marker">Note:</span> The <a data-link-type="dfn" href="#view-viewport-modifiable" id="ref-for-view-viewport-modifiable③">viewport modifiable</a> flag is intentionally set to false even if there was no change to the <a data-link-type="dfn" href="#view-current-viewport-scale" id="ref-for-view-current-viewport-scale③">current viewport scale</a>. This ensures that <code>getViewport(view)</code> calls always return consistent results within an animation frame for that view, so the first retrieved value is locked in for the remainder of the frame. If an application calls <code class="idl"><a data-link-type="idl" href="#dom-xrview-requestviewportscale" id="ref-for-dom-xrview-requestviewportscale⑤">requestViewportScale()</a></code> after <code>getViewport()</code>, the requested value is only applied later when <code>getViewport()</code> is called again in a future frame.</p> </div> <p>Each <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②④">XRSession</a></code> MUST identify a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="native-webgl-framebuffer-resolution">native WebGL framebuffer resolution</dfn>, which is the pixel resolution of a WebGL framebuffer required to match the physical pixel resolution of the <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑧">XR device</a>.</p> <div class="algorithm" data-algorithm="native-webgl-framebuffer-resolution"> <p>The <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution">native WebGL framebuffer resolution</a> for an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②⑤">XRSession</a></code> <var>session</var> is determined by running the following steps:</p> <ol> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode⑤">mode</a> value is not <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline②⓪">"inline"</a></code>, set the <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution①">native WebGL framebuffer resolution</a> to the resolution required to have a 1:1 ratio between the pixels of a framebuffer large enough to contain all of the session’s <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⑧">XRView</a></code>s and the physical screen pixels in the area of the display under the highest magnification and abort these steps. If no method exists to determine the native resolution as described, the <a data-link-type="dfn" href="#recommended-webgl-framebuffer-resolution" id="ref-for-recommended-webgl-framebuffer-resolution①">recommended WebGL framebuffer resolution</a> MAY be used.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-mode" id="ref-for-xrsession-mode⑥">mode</a> value is <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline②①">"inline"</a></code>, set the <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution②">native WebGL framebuffer resolution</a> to the size of the <var>session</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-renderstate" id="ref-for-dom-xrsession-renderstate⑥">renderState</a></code>'s <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas⑨">output canvas</a> in physical display pixels and reevaluate these steps every time the size of the canvas changes or the <a data-link-type="dfn" href="#xrrenderstate-output-canvas" id="ref-for-xrrenderstate-output-canvas①⓪">output canvas</a> is changed.</p> </ol> </div> <p>Additionally, the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②⑥">XRSession</a></code> MUST identify a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="recommended-webgl-framebuffer-resolution">recommended WebGL framebuffer resolution</dfn>, which represents a best estimate of the WebGL framebuffer resolution large enough to contain all of the session’s <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview①⑨">XRView</a></code>s that provides an average application a good balance between performance and quality. It MAY be smaller than, larger than, or equal to the <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution③">native WebGL framebuffer resolution</a>. New <a data-link-type="dfn" href="#opaque-framebuffer" id="ref-for-opaque-framebuffer①⑨">opaque framebuffer</a> will be created with this resolution, with width and height each scaled by any <code class="idl"><a data-link-type="idl" href="#dictdef-xrwebgllayerinit" id="ref-for-dictdef-xrwebgllayerinit②">XRWebGLLayerInit</a></code>'s <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-framebufferscalefactor" id="ref-for-dom-xrwebgllayerinit-framebufferscalefactor①">framebufferScaleFactor</a></code> provided.</p> <p class="note" role="note"><span class="marker">Note:</span> The user agent is free to use any method of its choosing to estimate the <a data-link-type="dfn" href="#recommended-webgl-framebuffer-resolution" id="ref-for-recommended-webgl-framebuffer-resolution②">recommended WebGL framebuffer resolution</a>. If there are platform-specific methods for querying a recommended size it is recommended that they be used, but not required. The scale factors used by <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayerinit-framebufferscalefactor" id="ref-for-dom-xrwebgllayerinit-framebufferscalefactor②">framebufferScaleFactor</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-getnativeframebufferscalefactor" id="ref-for-dom-xrwebgllayer-getnativeframebufferscalefactor①">getNativeFramebufferScaleFactor()</a></code> apply to width and height separately, so a scale factor of two results in four times the overall pixel count. If the platform exposes an area-based render scale that’s based on pixel count, the user agent needs to take the square root of that to convert it to a WebXR scale factor.</p> <div class="algorithm" data-algorithm="get-native-framebuffer-scale-factor"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRWebGLLayer" data-dfn-type="method" data-export id="dom-xrwebgllayer-getnativeframebufferscalefactor"><code>getNativeFramebufferScaleFactor(<var>session</var>)</code></dfn> method, when invoked, MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>session</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧">this</a>.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#ended" id="ref-for-ended⑦">ended</a> value is <code>true</code>, return <code>0.0</code> and abort these steps.</p> <li data-md> <p>Return the value that the <var>session</var>’s <a data-link-type="dfn" href="#recommended-webgl-framebuffer-resolution" id="ref-for-recommended-webgl-framebuffer-resolution③">recommended WebGL framebuffer resolution</a> width and height must each be multiplied by to yield the <var>session</var>’s <a data-link-type="dfn" href="#native-webgl-framebuffer-resolution" id="ref-for-native-webgl-framebuffer-resolution④">native WebGL framebuffer resolution</a>.</p> </ol> </div> <h3 class="heading settled" data-level="11.3" id="contextcompatibility"><span class="secno">11.3. </span><span class="content">WebGL Context Compatibility</span><a class="self-link" href="#contextcompatibility"></a></h3> <p>In order for a WebGL context to be used as a source for immersive XR imagery it must be created on a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="compatible-graphics-adapter">compatible graphics adapter</dfn> for the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②③">immersive XR device</a>. What is considered a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter">compatible graphics adapter</a> is platform dependent, but is understood to mean that the graphics adapter can supply imagery to the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②④">immersive XR device</a> without undue latency. If a WebGL context was not already created on the <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter①">compatible graphics adapter</a>, it typically must be re-created on the adapter in question before it can be used with an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②⑧">XRWebGLLayer</a></code>.</p> <p class="note" role="note"><span class="marker">Note:</span> On an XR platform with a single GPU, it can safely be assumed that the GPU is compatible with the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②⑤">immersive XR device</a>s advertised by the platform, and thus any hardware accelerated WebGL contexts are compatible as well. On PCs with both an integrated and discrete GPU the discrete GPU is often considered the <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter②">compatible graphics adapter</a> since it generally is a higher performance chip. On desktop PCs with multiple graphics adapters installed, the one with the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②⑥">immersive XR device</a> physically connected to it is likely to be considered the <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter③">compatible graphics adapter</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline②②">"inline"</a></code> sessions render using the same graphics adapter as canvases, and thus do not need <code class="idl"><a data-link-type="idl" href="#dom-webglcontextattributes-xrcompatible" id="ref-for-dom-webglcontextattributes-xrcompatible">xrCompatible</a></code> contexts.</p> <pre class="idl highlight def"><c- b>partial</c-> <c- b>dictionary</c-> <a class="idl-code" data-link-type="dictionary" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes③"><c- g>WebGLContextAttributes</c-></a> { <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean①①"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-default="false" data-dfn-for="WebGLContextAttributes" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-webglcontextattributes-xrcompatible"><code><c- g>xrCompatible</c-></code></dfn> = <c- b>false</c->; }; <c- b>partial</c-> <c- b>interface</c-> <c- b>mixin</c-> <a class="idl-code" data-link-type="interface" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase④"><c- g>WebGLRenderingContextBase</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject" id="ref-for-NewObject③"><c- g>NewObject</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise" id="ref-for-idl-promise⑤"><c- b>Promise</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined" id="ref-for-idl-undefined⑥"><c- b>undefined</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-webglrenderingcontextbase-makexrcompatible" id="ref-for-dom-webglrenderingcontextbase-makexrcompatible"><c- g>makeXRCompatible</c-></a>(); }; </pre> <p>When a user agent implements this specification it MUST set an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="xr-compatible">XR compatible</dfn> boolean, initially set to <code>false</code>, on every <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase⑤">WebGLRenderingContextBase</a></code>. Once the <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible②">XR compatible</a> boolean is set to <code>true</code>, the context can be used with layers for any <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②⑦">XRSession</a></code> requested from the current <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②⑦">immersive XR device</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> This flag introduces slow synchronous behavior and is discouraged. Consider calling <code class="idl"><a data-link-type="idl" href="#dom-webglrenderingcontextbase-makexrcompatible" id="ref-for-dom-webglrenderingcontextbase-makexrcompatible①">makeXRCompatible()</a></code> instead for an asynchronous solution.</p> <p>The <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible③">XR compatible</a> boolean can be set either at context creation time or after context creation, potentially incurring a context loss. To set the <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible④">XR compatible</a> boolean at context creation time, the <code class="idl"><a data-link-type="idl" href="#dom-webglcontextattributes-xrcompatible" id="ref-for-dom-webglcontextattributes-xrcompatible①">xrCompatible</a></code> context creation attribute must be set to <code>true</code> when requesting a WebGL context. If the requesting document’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin" id="ref-for-concept-origin①">origin</a> is not allowed to use the "xr-spatial-tracking" <a href="#permissions-policy">permissions policy</a>, <code class="idl"><a data-link-type="idl" href="#dom-webglcontextattributes-xrcompatible" id="ref-for-dom-webglcontextattributes-xrcompatible②">xrCompatible</a></code> has no effect.</p> <p>The <code class="idl"><a data-link-type="idl" href="#dom-webglcontextattributes-xrcompatible" id="ref-for-dom-webglcontextattributes-xrcompatible③">xrCompatible</a></code> flag on <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes" id="ref-for-WebGLContextAttributes④">WebGLContextAttributes</a></code>, if <code>true</code>, affects context creation by requesting the user agent <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.1" id="ref-for-2.1">create the WebGL context</a> using a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter④">compatible graphics adapter</a> for the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②⑧">immersive XR device</a>. If the user agent succeeds in this, the created context’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑤">XR compatible</a> boolean will be set to true. To obtain the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device②⑨">immersive XR device</a>, <a data-link-type="dfn" href="#ensure-an-immersive-xr-device-is-selected" id="ref-for-ensure-an-immersive-xr-device-is-selected②">ensure an immersive XR device is selected</a> SHOULD be called.</p> <p class="note" role="note"><span class="marker">Note:</span> <a data-link-type="dfn" href="#ensure-an-immersive-xr-device-is-selected" id="ref-for-ensure-an-immersive-xr-device-is-selected③">Ensure an immersive XR device is selected</a> needs to be run <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑦">in parallel</a>, which introduces slow synchronous behavior on the main thread. User agents SHOULD print a warning to the console requesting that <code class="idl"><a data-link-type="idl" href="#dom-webglrenderingcontextbase-makexrcompatible" id="ref-for-dom-webglrenderingcontextbase-makexrcompatible②">makeXRCompatible()</a></code> be used instead.</p> <div class="example" id="example-8cb16a0d"> <a class="self-link" href="#example-8cb16a0d"></a> The following code creates a WebGL context that is compatible with an <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device③⓪">immersive XR device</a> and then uses it to create an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer②⑨">XRWebGLLayer</a></code>. <pre class="highlight"><c- a>function</c-> onXRSessionStarted<c- p>(</c->xrSession<c- p>)</c-> <c- p>{</c-> <c- a>const</c-> glCanvas <c- o>=</c-> document<c- p>.</c->createElement<c- p>(</c-><c- u>"canvas"</c-><c- p>);</c-> <c- a>const</c-> gl <c- o>=</c-> glCanvas<c- p>.</c->getContext<c- p>(</c-><c- u>"webgl"</c-><c- p>,</c-> <c- p>{</c-> xrCompatible<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> loadWebGLResources<c- p>();</c-> xrSession<c- p>.</c->updateRenderState<c- p>({</c-> baseLayer<c- o>:</c-> <c- ow>new</c-> XRWebGLLayer<c- p>(</c->xrSession<c- p>,</c-> gl<c- p>)</c-> <c- p>});</c-> <c- p>}</c-> </pre> </div> <p>To set the <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑥">XR compatible</a> boolean after the context has been created, the <code class="idl"><a data-link-type="idl" href="#dom-webglrenderingcontextbase-makexrcompatible" id="ref-for-dom-webglrenderingcontextbase-makexrcompatible③">makeXRCompatible()</a></code> method is used.</p> <p class="note" role="note"><span class="marker">Note:</span> On some systems this flag may turn on a high powered discrete GPU, for example, or proxy all commands to an on-device GPU. If you are in a situation where you may or may not be using XR, it is suggested that you only call <code class="idl"><a data-link-type="idl" href="#dom-webglrenderingcontextbase-makexrcompatible" id="ref-for-dom-webglrenderingcontextbase-makexrcompatible④">makeXRCompatible()</a></code> when you intend to start an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session③⓪">immersive session</a>.</p> <div class="algorithm" data-algorithm="make-xr-compatible"> The <dfn class="dfn-paneled idl-code" data-dfn-for="WebGLRenderingContextBase" data-dfn-type="method" data-export id="dom-webglrenderingcontextbase-makexrcompatible"><code>makeXRCompatible()</code></dfn> method ensures the <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase⑥">WebGLRenderingContextBase</a></code> is running on a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter⑤">compatible graphics adapter</a> for the <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device③①">immersive XR device</a>. <p>When this method is invoked, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If the requesting document’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin" id="ref-for-concept-origin②">origin</a> is not allowed to use the "xr-spatial-tracking" <a href="#permissions-policy">permissions policy</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve①①">resolve</a> <var>promise</var> and return it. <span class="note">When the XR permissions policy is disabled, we wish to behave as if there is no XR device in this case, since <code class="idl"><a data-link-type="idl" href="#dom-webglrenderingcontextbase-makexrcompatible" id="ref-for-dom-webglrenderingcontextbase-makexrcompatible⑤">makeXRCompatible()</a></code> is supposed to be a set-and-forget method.</span></p> <li data-md> <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-new-promise" id="ref-for-a-new-promise⑤">a new Promise</a> created in the <a data-link-type="dfn" href="https://tc39.es/ecma262/#realm" id="ref-for-realm①">Realm</a> of this <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase" id="ref-for-WebGLRenderingContextBase⑦">WebGLRenderingContextBase</a></code>.</p> <li data-md> <p>Let <var>context</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨">this</a>.</p> <li data-md> <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑧">in parallel</a>:</p> <ol> <li data-md> <p>Let <var>device</var> be the result of <a data-link-type="dfn" href="#ensure-an-immersive-xr-device-is-selected" id="ref-for-ensure-an-immersive-xr-device-is-selected④">ensuring an immersive XR device is selected</a>.</p> <li data-md> <p>Set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑦">XR compatible</a> boolean as follows:</p> <dl class="switch"> <dt data-md>If <var>context</var>’s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-context-lost-flag" id="ref-for-webgl-context-lost-flag">WebGL context lost flag</a> is set: <dd data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②⑧">Queue a task</a> to set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑧">XR compatible</a> boolean to <code>false</code> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject①②">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror①⑨">InvalidStateError</a></code>.</p> <dt data-md>If <var>device</var> is <code>null</code>: <dd data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②⑨">Queue a task</a> to set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible⑨">XR compatible</a> boolean to <code>false</code> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject①③">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror②⓪">InvalidStateError</a></code>.</p> <dt data-md>If <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①⓪">XR compatible</a> boolean is <code>true</code>: <dd data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task③⓪">Queue a task</a> to <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve①②">resolve</a> <var>promise</var>.</p> <dt data-md>If <var>context</var> was created on a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter⑥">compatible graphics adapter</a> for <var>device</var>: <dd data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task③①">Queue a task</a> to set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①①">XR compatible</a> boolean to <code>true</code> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve①③">resolve</a> <var>promise</var>.</p> <dt data-md>Otherwise: <dd data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task③②">Queue a task</a> on the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15" id="ref-for-5.15">WebGL task source</a> to perform the following steps:</p> <ol> <li data-md> <p>Force <var>context</var> to be lost.</p> <li data-md> <p><a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#CONTEXT_LOST" id="ref-for-CONTEXT_LOST">Handle the context loss</a> as described by the WebGL specification:</p> <ol> <li data-md> <p>Let <var>canvas</var> be the <var>context</var>’s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#context-canvas" id="ref-for-context-canvas">canvas</a>.</p> <li data-md> <p>If <var>context</var>’s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-context-lost-flag" id="ref-for-webgl-context-lost-flag①">webgl context lost flag</a> is set, abort these steps.</p> <li data-md> <p>Set <var>context</var>’s <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-context-lost-flag" id="ref-for-webgl-context-lost-flag②">webgl context lost flag</a>.</p> <li data-md> <p>Set the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-object-invalidated-flag" id="ref-for-webgl-object-invalidated-flag">invalidated</a> flag of each <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLObject" id="ref-for-WebGLObject">WebGLObject</a></code> instance created by <var>context</var>.</p> <li data-md> <p>Disable all extensions except "WEBGL_lose_context".</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task③③">Queue a task</a> on the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15" id="ref-for-5.15①">WebGL task source</a> to perform the following steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#fire-a-webgl-context-event" id="ref-for-fire-a-webgl-context-event">Fire a WebGL context event</a> <var>e</var> named "webglcontextlost" at <var>canvas</var>, with <code class="idl"><a data-link-type="idl" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.1" id="ref-for-5.15.1">statusMessage</a></code> set to "".</p> <li data-md> <p>If <var>e</var>’s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#canceled-flag" id="ref-for-canceled-flag">canceled flag</a> is not set, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject①④">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror">AbortError</a></code> and abort these steps.</p> <li data-md> <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑨">in parallel</a>.</p> <ol> <li data-md> <p>Await a restorable drawing buffer on a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter⑦">compatible graphics adapter</a> for <var>device</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task③④">Queue a task</a> on the <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15" id="ref-for-5.15②">WebGL task source</a> to perform the following steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#restore-the-drawing-buffer" id="ref-for-restore-the-drawing-buffer">Restore the context</a> on a <a data-link-type="dfn" href="#compatible-graphics-adapter" id="ref-for-compatible-graphics-adapter⑧">compatible graphics adapter</a> for <var>device</var>.</p> <li data-md> <p>Set <var>context</var>’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①②">XR compatible</a> boolean to <code>true</code>.</p> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve①④">Resolve</a> <var>promise</var>.</p> </ol> </ol> </ol> </ol> </ol> </dl> </ol> <li data-md> <p>Return <var>promise</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="webgl-context-lost"> <p>Additionally, when any WebGL <a data-link-type="dfn" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#CONTEXT_LOST" id="ref-for-CONTEXT_LOST①">context is lost</a> run the following steps prior to firing the "webglcontextlost" event:</p> <ol> <li data-md> <p>Set the context’s <a data-link-type="dfn" href="#xr-compatible" id="ref-for-xr-compatible①③">XR compatible</a> boolean to <code>false</code>.</p> </ol> </div> <div class="example" id="example-e5b5faa6"> <a class="self-link" href="#example-e5b5faa6"></a> The following code creates an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer③⓪">XRWebGLLayer</a></code> from a pre-existing WebGL context. <pre class="highlight"><c- a>const</c-> glCanvas <c- o>=</c-> document<c- p>.</c->createElement<c- p>(</c-><c- u>"canvas"</c-><c- p>);</c-> <c- a>const</c-> gl <c- o>=</c-> glCanvas<c- p>.</c->getContext<c- p>(</c-><c- u>"webgl"</c-><c- p>);</c-> loadWebGLResources<c- p>();</c-> glCanvas<c- p>.</c->addEventListener<c- p>(</c-><c- u>"webglcontextlost"</c-><c- p>,</c-> <c- p>(</c->event<c- p>)</c-> <c- p>=></c-> <c- p>{</c-> <c- c1>// Indicates that the WebGL context can be restored.</c-> event<c- p>.</c->canceled <c- o>=</c-> <c- kc>true</c-><c- p>;</c-> <c- p>});</c-> glCanvas<c- p>.</c->addEventListener<c- p>(</c-><c- u>"webglcontextrestored"</c-><c- p>,</c-> <c- p>(</c->event<c- p>)</c-> <c- p>=></c-> <c- p>{</c-> <c- c1>// WebGL resources need to be re-created after a context loss.</c-> loadWebGLResources<c- p>();</c-> <c- p>});</c-> <c- k>async</c-> <c- a>function</c-> onXRSessionStarted<c- p>(</c->xrSession<c- p>)</c-> <c- p>{</c-> <c- c1>// Make sure the canvas context we want to use is compatible with the device.</c-> <c- c1>// May trigger a context loss.</c-> <c- k>await</c-> gl<c- p>.</c->makeXRCompatible<c- p>();</c-> xrSession<c- p>.</c->updateRenderState<c- p>({</c-> baseLayer<c- o>:</c-> <c- ow>new</c-> XRWebGLLayer<c- p>(</c->xrSession<c- p>,</c-> gl<c- p>)</c-> <c- p>});</c-> <c- p>}</c-> </pre> </div> <h2 class="heading settled" data-level="12" id="events"><span class="secno">12. </span><span class="content">Events</span><a class="self-link" href="#events"></a></h2> <p>The <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#task-source" id="ref-for-task-source">task source</a> for all <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task③⑤">tasks queued</a> in this specification is the <dfn data-dfn-type="dfn" data-export id="xr-task-source">XR task source<a class="self-link" href="#xr-task-source"></a></dfn>, unless otherwise specified.</p> <h3 class="heading settled" data-level="12.1" id="xrsessionevent-interface"><span class="secno">12.1. </span><span class="content">XRSessionEvent</span><a class="self-link" href="#xrsessionevent-interface"></a></h3> <p><code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent②">XRSessionEvent</a></code>s are fired to indicate changes to the state of an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①②⑧">XRSession</a></code>.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①⑦"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①⑥"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrsessionevent"><code><c- g>XRSessionEvent</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event"><c- n>Event</c-></a> { <dfn class="idl-code" data-dfn-for="XRSessionEvent" data-dfn-type="constructor" data-export data-lt="XRSessionEvent(type, eventInitDict)|constructor(type, eventInitDict)" id="dom-xrsessionevent-xrsessionevent"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-xrsessionevent-xrsessionevent"></a></dfn>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString⑦"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="XRSessionEvent/XRSessionEvent(type, eventInitDict), XRSessionEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrsessionevent-xrsessionevent-type-eventinitdict-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrsessionevent-xrsessionevent-type-eventinitdict-type"></a></dfn>, <a data-link-type="idl-name" href="#dictdef-xrsessioneventinit" id="ref-for-dictdef-xrsessioneventinit"><c- n>XRSessionEventInit</c-></a> <dfn class="idl-code" data-dfn-for="XRSessionEvent/XRSessionEvent(type, eventInitDict), XRSessionEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrsessionevent-xrsessionevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code><a class="self-link" href="#dom-xrsessionevent-xrsessionevent-type-eventinitdict-eventinitdict"></a></dfn>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①⑦"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①②⑨"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrsessionevent-session" id="ref-for-dom-xrsessionevent-session"><c- g>session</c-></a>; }; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrsessioneventinit"><code><c- g>XRSessionEventInit</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit"><c- n>EventInit</c-></a> { <c- b>required</c-> <a data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①③⓪"><c- n>XRSession</c-></a> <dfn class="idl-code" data-dfn-for="XRSessionEventInit" data-dfn-type="dict-member" data-export data-type="XRSession " id="dom-xrsessioneventinit-session"><code><c- g>session</c-></code><a class="self-link" href="#dom-xrsessioneventinit-session"></a></dfn>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionEvent" data-dfn-type="attribute" data-export id="dom-xrsessionevent-session"><code>session</code></dfn> attribute indicates the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①③①">XRSession</a></code> that generated the event.</p> <h3 class="heading settled" data-level="12.2" id="xrinputsourceevent-interface"><span class="secno">12.2. </span><span class="content">XRInputSourceEvent</span><a class="self-link" href="#xrinputsourceevent-interface"></a></h3> <p><code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent②">XRInputSourceEvent</a></code>s are fired to indicate changes to the state of an <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②③">XRInputSource</a></code>.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①⑧"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①⑦"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrinputsourceevent"><code><c- g>XRInputSourceEvent</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event①"><c- n>Event</c-></a> { <dfn class="idl-code" data-dfn-for="XRInputSourceEvent" data-dfn-type="constructor" data-export data-lt="XRInputSourceEvent(type, eventInitDict)|constructor(type, eventInitDict)" id="dom-xrinputsourceevent-xrinputsourceevent"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-xrinputsourceevent-xrinputsourceevent"></a></dfn>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString⑧"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceEvent/XRInputSourceEvent(type, eventInitDict), XRInputSourceEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-type"></a></dfn>, <a data-link-type="idl-name" href="#dictdef-xrinputsourceeventinit" id="ref-for-dictdef-xrinputsourceeventinit"><c- n>XRInputSourceEventInit</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceEvent/XRInputSourceEvent(type, eventInitDict), XRInputSourceEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code><a class="self-link" href="#dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-eventinitdict"></a></dfn>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①⑧"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrframe" id="ref-for-xrframe③⓪"><c- n>XRFrame</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRFrame" href="#dom-xrinputsourceevent-frame" id="ref-for-dom-xrinputsourceevent-frame"><c- g>frame</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject①⑨"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②④"><c- n>XRInputSource</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSource" href="#dom-xrinputsourceevent-inputsource" id="ref-for-dom-xrinputsourceevent-inputsource"><c- g>inputSource</c-></a>; }; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrinputsourceeventinit"><code><c- g>XRInputSourceEventInit</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit①"><c- n>EventInit</c-></a> { <c- b>required</c-> <a data-link-type="idl-name" href="#xrframe" id="ref-for-xrframe③①"><c- n>XRFrame</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceEventInit" data-dfn-type="dict-member" data-export data-type="XRFrame " id="dom-xrinputsourceeventinit-frame"><code><c- g>frame</c-></code><a class="self-link" href="#dom-xrinputsourceeventinit-frame"></a></dfn>; <c- b>required</c-> <a data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⑤"><c- n>XRInputSource</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourceEventInit" data-dfn-type="dict-member" data-export data-type="XRInputSource " id="dom-xrinputsourceeventinit-inputsource"><code><c- g>inputSource</c-></code><a class="self-link" href="#dom-xrinputsourceeventinit-inputsource"></a></dfn>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourceEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceevent-inputsource"><code>inputSource</code></dfn> attribute indicates the <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②⑥">XRInputSource</a></code> that generated this event.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourceEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceevent-frame"><code>frame</code></dfn> attribute is an <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe③②">XRFrame</a></code> that corresponds with the time that the event took place. It may represent historical data. <code class="idl"><a data-link-type="idl" href="#dom-xrframe-getviewerpose" id="ref-for-dom-xrframe-getviewerpose④">getViewerPose()</a></code> MUST throw an exception when called on <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceevent-frame" id="ref-for-dom-xrinputsourceevent-frame①">frame</a></code>.</p> <div class="algorithm" data-algorithm="fire-input-source-event"> <p>When the user agent has to <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="fire-an-input-source-event">fire an input source event</dfn> with name <var>name</var>, <code class="idl"><a data-link-type="idl" href="#xrframe" id="ref-for-xrframe③③">XRFrame</a></code> <var>frame</var>, and <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource②⑦">XRInputSource</a></code> <var>source</var> it MUST run the following steps:</p> <ol> <li data-md> <p>Create an <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent③">XRInputSourceEvent</a></code> <var>event</var> with <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type" id="ref-for-dom-event-type">type</a></code> <var>name</var>, <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceevent-frame" id="ref-for-dom-xrinputsourceevent-frame②">frame</a></code> <var>frame</var>, and <code class="idl"><a data-link-type="idl" href="#dom-xrinputsourceevent-inputsource" id="ref-for-dom-xrinputsourceevent-inputsource①">inputSource</a></code> <var>source</var>.</p> <li data-md> <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active⑤">active</a> boolean to <code>true</code>.</p> <li data-md> <p><a data-link-type="dfn" href="#xrframe-apply-frame-updates" id="ref-for-xrframe-apply-frame-updates①">Apply frame updates</a> for <var>frame</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-dispatch" id="ref-for-concept-event-dispatch">Dispatch</a> <var>event</var> on <var>frame</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrframe-session" id="ref-for-dom-xrframe-session①⑤">session</a></code></p> <li data-md> <p>Set <var>frame</var>’s <a data-link-type="dfn" href="#xrframe-active" id="ref-for-xrframe-active⑥">active</a> boolean to <code>false</code>.</p> </ol> </div> <h3 class="heading settled" data-level="12.3" id="xrinputsourceschangeevent-interface"><span class="secno">12.3. </span><span class="content">XRInputSourcesChangeEvent</span><a class="self-link" href="#xrinputsourceschangeevent-interface"></a></h3> <p><code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent⑦">XRInputSourcesChangeEvent</a></code>s are fired to indicate changes to the <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources①③">list of active XR input sources</a> that are available to an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①③②">XRSession</a></code>.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext①⑨"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①⑧"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrinputsourceschangeevent"><code><c- g>XRInputSourcesChangeEvent</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event②"><c- n>Event</c-></a> { <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEvent" data-dfn-type="constructor" data-export data-lt="XRInputSourcesChangeEvent(type, eventInitDict)|constructor(type, eventInitDict)" id="dom-xrinputsourceschangeevent-xrinputsourceschangeevent"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent"></a></dfn>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString⑨"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEvent/XRInputSourcesChangeEvent(type, eventInitDict), XRInputSourcesChangeEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-type"></a></dfn>, <a data-link-type="idl-name" href="#dictdef-xrinputsourceschangeeventinit" id="ref-for-dictdef-xrinputsourceschangeeventinit"><c- n>XRInputSourcesChangeEventInit</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEvent/XRInputSourcesChangeEvent(type, eventInitDict), XRInputSourcesChangeEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code><a class="self-link" href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-eventinitdict"></a></dfn>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject②⓪"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①③③"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrinputsourceschangeevent-session" id="ref-for-dom-xrinputsourceschangeevent-session"><c- g>session</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject②①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array④"><c- b>FrozenArray</c-></a><<a data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⑧"><c- n>XRInputSource</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRInputSource>" href="#dom-xrinputsourceschangeevent-added" id="ref-for-dom-xrinputsourceschangeevent-added⑤"><c- g>added</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject②②"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array⑤"><c- b>FrozenArray</c-></a><<a data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource②⑨"><c- n>XRInputSource</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRInputSource>" href="#dom-xrinputsourceschangeevent-removed" id="ref-for-dom-xrinputsourceschangeevent-removed④"><c- g>removed</c-></a>; }; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrinputsourceschangeeventinit"><code><c- g>XRInputSourcesChangeEventInit</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit②"><c- n>EventInit</c-></a> { <c- b>required</c-> <a data-link-type="idl-name" href="#xrsession" id="ref-for-xrsession①③④"><c- n>XRSession</c-></a> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEventInit" data-dfn-type="dict-member" data-export data-type="XRSession " id="dom-xrinputsourceschangeeventinit-session"><code><c- g>session</c-></code><a class="self-link" href="#dom-xrinputsourceschangeeventinit-session"></a></dfn>; <c- b>required</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence③"><c- b>sequence</c-></a><<a data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource③⓪"><c- n>XRInputSource</c-></a>> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEventInit" data-dfn-type="dict-member" data-export data-type="sequence<XRInputSource> " id="dom-xrinputsourceschangeeventinit-added"><code><c- g>added</c-></code><a class="self-link" href="#dom-xrinputsourceschangeeventinit-added"></a></dfn>; <c- b>required</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence④"><c- b>sequence</c-></a><<a data-link-type="idl-name" href="#xrinputsource" id="ref-for-xrinputsource③①"><c- n>XRInputSource</c-></a>> <dfn class="idl-code" data-dfn-for="XRInputSourcesChangeEventInit" data-dfn-type="dict-member" data-export data-type="sequence<XRInputSource> " id="dom-xrinputsourceschangeeventinit-removed"><code><c- g>removed</c-></code><a class="self-link" href="#dom-xrinputsourceschangeeventinit-removed"></a></dfn>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourcesChangeEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceschangeevent-session"><code>session</code></dfn> attribute indicates the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①③⑤">XRSession</a></code> that generated the event.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourcesChangeEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceschangeevent-added"><code>added</code></dfn> attribute is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②⑥">list</a> of <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③②">XRInputSource</a></code>s that were added to the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①③⑥">XRSession</a></code> at the time of the event.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRInputSourcesChangeEvent" data-dfn-type="attribute" data-export id="dom-xrinputsourceschangeevent-removed"><code>removed</code></dfn> attribute is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②⑦">list</a> of <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③③">XRInputSource</a></code>s that were removed from the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①③⑦">XRSession</a></code> at the time of the event.</p> <h3 class="heading settled" data-level="12.4" id="xrreferencespaceevent-interface"><span class="secno">12.4. </span><span class="content">XRReferenceSpaceEvent</span><a class="self-link" href="#xrreferencespaceevent-interface"></a></h3> <p><code class="idl"><a data-link-type="idl" href="#xrreferencespaceevent" id="ref-for-xrreferencespaceevent">XRReferenceSpaceEvent</a></code>s are fired to indicate changes to the state of an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace②⑨">XRReferenceSpace</a></code>.</p> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext" id="ref-for-SecureContext②⓪"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed①⑨"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrreferencespaceevent"><code><c- g>XRReferenceSpaceEvent</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event③"><c- n>Event</c-></a> { <dfn class="idl-code" data-dfn-for="XRReferenceSpaceEvent" data-dfn-type="constructor" data-export data-lt="XRReferenceSpaceEvent(type, eventInitDict)|constructor(type, eventInitDict)" id="dom-xrreferencespaceevent-xrreferencespaceevent"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-xrreferencespaceevent-xrreferencespaceevent"></a></dfn>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①⓪"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="XRReferenceSpaceEvent/XRReferenceSpaceEvent(type, eventInitDict), XRReferenceSpaceEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-type"></a></dfn>, <a data-link-type="idl-name" href="#dictdef-xrreferencespaceeventinit" id="ref-for-dictdef-xrreferencespaceeventinit"><c- n>XRReferenceSpaceEventInit</c-></a> <dfn class="idl-code" data-dfn-for="XRReferenceSpaceEvent/XRReferenceSpaceEvent(type, eventInitDict), XRReferenceSpaceEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code><a class="self-link" href="#dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-eventinitdict"></a></dfn>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject②③"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace③⓪"><c- n>XRReferenceSpace</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRReferenceSpace" href="#dom-xrreferencespaceevent-referencespace" id="ref-for-dom-xrreferencespaceevent-referencespace"><c- g>referenceSpace</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject" id="ref-for-SameObject②④"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②①"><c- n>XRRigidTransform</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform?" href="#dom-xrreferencespaceevent-transform" id="ref-for-dom-xrreferencespaceevent-transform"><c- g>transform</c-></a>; }; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrreferencespaceeventinit"><code><c- g>XRReferenceSpaceEventInit</c-></code></dfn> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit③"><c- n>EventInit</c-></a> { <c- b>required</c-> <a data-link-type="idl-name" href="#xrreferencespace" id="ref-for-xrreferencespace③①"><c- n>XRReferenceSpace</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceEventInit" data-dfn-type="dict-member" data-export data-type="XRReferenceSpace " id="dom-xrreferencespaceeventinit-referencespace"><code><c- g>referenceSpace</c-></code></dfn>; <a data-link-type="idl-name" href="#xrrigidtransform" id="ref-for-xrrigidtransform②②"><c- n>XRRigidTransform</c-></a>? <dfn class="idl-code" data-default="null" data-dfn-for="XRReferenceSpaceEventInit" data-dfn-type="dict-member" data-export data-type="XRRigidTransform? " id="dom-xrreferencespaceeventinit-transform"><code><c- g>transform</c-></code><a class="self-link" href="#dom-xrreferencespaceeventinit-transform"></a></dfn> = <c- b>null</c->; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceEvent" data-dfn-type="attribute" data-export id="dom-xrreferencespaceevent-referencespace"><code>referenceSpace</code></dfn> attribute indicates the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③②">XRReferenceSpace</a></code> that generated this event.</p> <p>The optional <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpaceEvent" data-dfn-type="attribute" data-export id="dom-xrreferencespaceevent-transform"><code>transform</code></dfn> attribute describes the post-event position and orientation of the <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespaceevent-referencespace" id="ref-for-dom-xrreferencespaceevent-referencespace①">referenceSpace</a></code>'s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑦">native origin</a> in the pre-event coordinate system. This attribute MAY be <code>null</code> if the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem①⑨">XRSystem</a></code> can’t determine the delta between the old and the new coordinate system.</p> <p class="note" role="note"><span class="marker">NOTE:</span> situations where <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespaceevent-referencespace" id="ref-for-dom-xrreferencespaceevent-referencespace②">referenceSpace</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespaceeventinit-referencespace" id="ref-for-dom-xrreferencespaceeventinit-referencespace">referenceSpace</a></code> can be when the headset was doffed and donned between 2 seperate locations. In such cases, if the experience relies on world-locked content, it should warn the user and reset the scene.</p> <h3 class="heading settled" data-level="12.5" id="event-types"><span class="secno">12.5. </span><span class="content">Event Types</span><a class="self-link" href="#event-types"></a></h3> <p>The user agent MUST provide the following new events. Registration for and firing of the events must follow the usual behavior of DOM Events.</p> <p>The user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire①">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSystem" data-dfn-type="event" data-export id="eventdef-xrsystem-devicechange"><code>devicechange</code></dfn> event on the <code class="idl"><a data-link-type="idl" href="#xrsystem" id="ref-for-xrsystem②⓪">XRSystem</a></code> object to indicate that the availability of <a data-link-type="dfn" href="#immersive-xr-device" id="ref-for-immersive-xr-device③②">immersive XR device</a>s has been changed unless the document’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin" id="ref-for-concept-origin③">origin</a> is not allowed to use the "xr-spatial-tracking" <a href="#permissions-policy">permissions policy</a>.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire②">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-visibilitychange"><code>visibilitychange</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent③">XRSessionEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①③⑧">XRSession</a></code> each time the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state⑨">visibility state</a> of the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①③⑨">XRSession</a></code> has changed.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire③">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-end"><code>end</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent④">XRSessionEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④⓪">XRSession</a></code> when the session ends, either by the application or the user agent.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire④">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-inputsourceschange"><code>inputsourceschange</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent⑧">XRInputSourcesChangeEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④①">XRSession</a></code> when the session’s <a data-link-type="dfn" href="#list-of-active-xr-input-sources" id="ref-for-list-of-active-xr-input-sources①④">list of active XR input sources</a> has changed.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire⑤">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-trackedsourceschange"><code>trackedsourceschange</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrinputsourceschangeevent" id="ref-for-xrinputsourceschangeevent⑨">XRInputSourcesChangeEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④②">XRSession</a></code> when the session’s <a data-link-type="dfn" href="#list-of-active-xr-tracked-sources" id="ref-for-list-of-active-xr-tracked-sources④">list of active XR tracked sources</a> has changed.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire⑥">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-selectstart"><code>selectstart</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent④">XRInputSourceEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④③">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③④">XRInputSource</a></code>s begins its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑧">primary action</a>. The event MUST be of type .</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire⑦">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-selectend"><code>selectend</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑤">XRInputSourceEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④④">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③⑤">XRInputSource</a></code>s ends its <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action①⑨">primary action</a> or when an <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③⑥">XRInputSource</a></code> that has begun a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action②⓪">primary action</a> is disconnected.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire⑧">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-select"><code>select</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑥">XRInputSourceEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④⑤">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③⑦">XRInputSource</a></code>s has fully completed a <a data-link-type="dfn" href="#primary-action" id="ref-for-primary-action②①">primary action</a>.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire⑨">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-squeezestart"><code>squeezestart</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑦">XRInputSourceEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④⑥">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③⑧">XRInputSource</a></code>s begins its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action⑨">primary squeeze action</a>.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire①⓪">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-squeezeend"><code>squeezeend</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑧">XRInputSourceEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④⑦">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource③⑨">XRInputSource</a></code>s ends its <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action①⓪">primary squeeze action</a> or when an <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource④⓪">XRInputSource</a></code> that has begun a <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action①①">primary squeeze action</a> is disconnected.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire①①">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-squeeze"><code>squeeze</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrinputsourceevent" id="ref-for-xrinputsourceevent⑨">XRInputSourceEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④⑧">XRSession</a></code> when one of its <code class="idl"><a data-link-type="idl" href="#xrinputsource" id="ref-for-xrinputsource④①">XRInputSource</a></code>s has fully completed a <a data-link-type="dfn" href="#primary-squeeze-action" id="ref-for-primary-squeeze-action①②">primary squeeze action</a>.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire①②">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRSession" data-dfn-type="event" data-export id="eventdef-xrsession-frameratechange"><code>frameratechange</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrsessionevent" id="ref-for-xrsessionevent⑤">XRSessionEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①④⑨">XRSession</a></code> when the <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①⑥">XR Compositor</a> changes the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤⓪">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-internal-nominal-framerate" id="ref-for-xrsession-internal-nominal-framerate⑤">internal nominal framerate</a>.</p> <p>A user agent MUST <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire①③">fire an event</a> named <dfn class="dfn-paneled idl-code" data-dfn-for="XRReferenceSpace" data-dfn-type="event" data-export id="eventdef-xrreferencespace-reset"><code>reset</code></dfn> using <code class="idl"><a data-link-type="idl" href="#xrreferencespaceevent" id="ref-for-xrreferencespaceevent①">XRReferenceSpaceEvent</a></code> on an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③③">XRReferenceSpace</a></code> when discontinuities of the <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑧">native origin</a> or <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin①①">effective origin</a> occur, i.e. there are significant changes in the origin’s position or orientation relative to the user’s environment. (For example: After user recalibration of their XR device or if the XR device automatically shifts its origin after losing and regaining tracking.) A <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset②">reset</a></code> event MUST also be dispatched when the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry⑨">boundsGeometry</a></code> changes for an <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①①">XRBoundedReferenceSpace</a></code>. A <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset③">reset</a></code> event MUST NOT be dispatched if the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①②">viewer</a>'s pose experiences discontinuities but the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③④">XRReferenceSpace</a></code>'s origin physical mapping remains stable, such as when the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①③">viewer</a> momentarily loses and regains tracking within the same tracking area. A <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset④">reset</a></code> event also MUST NOT be dispatched as an <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded⑥">unbounded</a></code> reference space makes small adjustments to its <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin①⑨">native origin</a> over time to maintain space stability near the user, if a significant discontinuity has not occurred. The event MUST be dispatched prior to the execution of any <a data-link-type="dfn" href="#xr-animation-frame" id="ref-for-xr-animation-frame⑥">XR animation frame</a>s that make use of the new origin. A <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset⑤">reset</a></code> event MUST be dispatched on all offset reference spaces of a reference space that fires a <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset⑥">reset</a></code> event, and the <code class="idl"><a data-link-type="idl" href="#dom-xrboundedreferencespace-boundsgeometry" id="ref-for-dom-xrboundedreferencespace-boundsgeometry①⓪">boundsGeometry</a></code> of offset <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①②">XRBoundedReferenceSpace</a></code>s should also be recomputed.</p> <p class="note" role="note"><span class="marker">Note:</span> This does mean that the session needs to hold on to strong references to any <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③⑤">XRReferenceSpace</a></code>s that have <code class="idl"><a data-link-type="idl" href="#eventdef-xrreferencespace-reset" id="ref-for-eventdef-xrreferencespace-reset⑦">reset</a></code> listeners.</p> <p class="note" role="note"><span class="marker">Note:</span> Jumps in <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①④">viewer</a> position can be handled by the application by observing the <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition⑦">emulatedPosition</a></code> boolean. If a jump in <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑤">viewer</a> position coincides with <code class="idl"><a data-link-type="idl" href="#dom-xrpose-emulatedposition" id="ref-for-dom-xrpose-emulatedposition⑧">emulatedPosition</a></code> switching from <code>true</code> to <code>false</code>, it indicates that the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑥">viewer</a> has regained tracking and their new position represents a correction from the previously emulated values. For experiences without a "teleportation" mechanic, where the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑦">viewer</a> can move through the virtual world without moving physically, this is generally the application’s desired behavior. However, if an experience does provide a "teleportation" mechanic, it may be needlessly jarring to jump the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑧">viewer</a>'s position back after tracking recovery. Instead, when such an application recovers tracking, it can simply resume the experience from the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer①⑨">viewer</a>'s current position in the virtual world by absorbing that sudden jump in position into its teleportation offset. To do so, the developer calls <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespace-getoffsetreferencespace" id="ref-for-dom-xrreferencespace-getoffsetreferencespace④">getOffsetReferenceSpace()</a></code> to create a replacement reference space with its <a data-link-type="dfn" href="#xrspace-effective-origin" id="ref-for-xrspace-effective-origin①②">effective origin</a> adjusted by the amount that the <a data-link-type="dfn" href="#viewer" id="ref-for-viewer②⓪">viewer</a>'s position jumped since the previous frame.</p> <h2 class="heading settled" data-level="13" id="security"><span class="secno">13. </span><span class="content">Security, Privacy, and Comfort Considerations</span><a class="self-link" href="#security"></a></h2> <p>The WebXR Device API provides powerful new features which bring with them several unique privacy, security, and comfort risks that user agents must take steps to mitigate.</p> <h3 class="heading settled" data-level="13.1" id="sensitive-information-header"><span class="secno">13.1. </span><span class="content">Sensitive Information</span><a class="self-link" href="#sensitive-information-header"></a></h3> <p>In the context of XR, <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="sensitive-information">sensitive information</dfn> includes, but is not limited to, user-configurable data such as interpupillary distance (IPD) and sensor-based data such as <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose①①">XRPose</a></code>s. All <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session③①">immersive sessions</a> will expose some amount of sensitive data, due to the user’s pose being necessary to render anything. However, in some cases, the same sensitive information will also be exposed via <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline②③">"inline"</a></code> sessions.</p> <h3 class="heading settled" data-level="13.2" id="user-intention"><span class="secno">13.2. </span><span class="content">User intention</span><a class="self-link" href="#user-intention"></a></h3> <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="user-intent">User intent</dfn> for a given action is a signal from the user that such an action was intentional and has their consent.</p> <p>It is often necessary to be sure of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑥">user intent</a> before exposing sensitive information or allowing actions with a significant effect on the user’s experience. This intent may be communicated or observed in a number of ways.</p> <p class="note" role="note"><span class="marker">Note:</span> A common way of determining user intent is by <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#transient-activation" id="ref-for-transient-activation①">transient activation</a> of a UI control, typically an "enter VR" button. Since activation is transient, the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context②">browsing context</a> requesting an XR session must be an <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-tree-ancestor" id="ref-for-concept-tree-ancestor">ancestor</a> or a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#same-origin-domain" id="ref-for-same-origin-domain">same origin-domain</a> <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-tree-descendant" id="ref-for-concept-tree-descendant">descendant</a> of the context containing the UI control, and must recently have been the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#nav-document" id="ref-for-nav-document">active document</a> of the browsing context.</p> <h4 class="heading settled" data-level="13.2.1" id="user-activation"><span class="secno">13.2.1. </span><span class="content">User activation</span><a class="self-link" href="#user-activation"></a></h4> <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#transient-activation" id="ref-for-transient-activation②">Transient activation</a> MAY serve as an indication of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑦">user intent</a> in some scenarios. <h4 class="heading settled" data-level="13.2.2" id="application-launch"><span class="secno">13.2.2. </span><span class="content">Launching a web application</span><a class="self-link" href="#application-launch"></a></h4> In some environments a page may be presented as an application, installed with the express intent of running immersive content. In that case <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="launching-a-web-application">launching a web application</dfn> MAY also serve as an indication of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑧">user intent</a>. <h4 class="heading settled" data-level="13.2.3" id="user-consent"><span class="secno">13.2.3. </span><span class="content">Implicit and Explicit consent</span><a class="self-link" href="#user-consent"></a></h4> <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="implicit-consent">Implicit consent</dfn> is when the user agent makes a judgement on the consent of a user without explicitly asking for it, for example, based on the install status of a web application, frequency and recency of visits or a user agent defined action where the user clearly signals intent that they want to enter an immersive experience. Given the sensitivity of XR data, caution is strongly advised when relying on implicit signals.</p> <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="explicit-consent">Explicit consent</dfn> is when the user agent makes a judgement on the consent of a user based on having explicitly asked for it. When gathering <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent②">explicit consent</a>, user agents present an explanation of what is being requested and provide users the option to decline. Requests for user consent can be presented in many visual forms based on the features being protected and user agent choice. Install status of a web application MAY count as a signal of <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent③">explicit consent</a> provided some form of <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent④">explicit consent</a> is requested at install time.</p> <h4 class="heading settled" data-level="13.2.4" id="consent-duration"><span class="secno">13.2.4. </span><span class="content">Duration of consent</span><a class="self-link" href="#consent-duration"></a></h4> It is recommended that once <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑤">explicit consent</a> is granted for a specific <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin" id="ref-for-concept-origin④">origin</a> that this consent persist until the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context③">browsing context</a> has ended. User agents may choose to lengthen or shorten this consent duration based upon implicit or explicit signals of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent⑨">user intent</a>, but implementations are advised to exercise caution when deviating from this recommendation, particularly when relying on implicit signals. For example, it may be appropriate for a web application installed with the express intent of running immersive content to persist the user’s consent, but not for an installed web application where immersive content is a secondary feature. <p>Regardless of how long the user agent chooses to persist the user’s consent, <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information②">sensitive information</a> MUST only be exposed by an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤①">XRSession</a></code> which has not <a data-link-type="dfn" href="#ended" id="ref-for-ended⑧">ended</a>.</p> <h3 class="heading settled" data-level="13.3" id="mid-session-consent"><span class="secno">13.3. </span><span class="content">Mid-session consent</span><a class="self-link" href="#mid-session-consent"></a></h3> <p>There are multiple non-XR APIs which cause user agents to request <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑥">explicit consent</a> to use a feature. If the user agent will request the user’s consent while there is an <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session⑧">active immersive session</a>, the user agent MUST <a data-link-type="dfn" href="#shut-down-the-session" id="ref-for-shut-down-the-session③">shut down the session</a> prior to displaying the consent request to the user. If the user’s consent for the feature had been granted prior to the <a data-link-type="dfn" href="#active-immersive-session" id="ref-for-active-immersive-session⑨">active immersive session</a> being created the session does not need to be terminated.</p> <p class="note" role="note"><span class="marker">Note:</span> This limitation is to ensure that there is behavioral parity between all user agents until consensus is reached about how user agents should manage mid-session <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑦">explicit consent</a>. It is not expected to be a long term requirement.</p> <h3 class="heading settled" data-level="13.4" id="data-adjustments-header"><span class="secno">13.4. </span><span class="content">Data adjustments</span><a class="self-link" href="#data-adjustments-header"></a></h3> <p>In some cases, security and privacy threats can be mitigated through <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="data-adjustment">data adjustment</dfn>s such as throttling, quantizing, rounding, limiting, or otherwise manipulating the data reported from the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①⑤">XR device</a>. This may sometimes be necessary to avoid fingerprinting, even in situations when <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①⓪">user intent</a> has been established. However, <a data-link-type="dfn" href="#data-adjustment" id="ref-for-data-adjustment">data adjustment</a> mitigations MUST only be used in situations which would not result in user discomfort.</p> <h4 class="heading settled" data-level="13.4.1" id="throttling-header"><span class="secno">13.4.1. </span><span class="content">Throttling</span><a class="self-link" href="#throttling-header"></a></h4> <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="throttling">Throttling</dfn> is when <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information③">sensitive information</a> is reported at a lower frequency than otherwise possible. This mitigation has the potential to reduce a site’s ability to infer user intent, infer location, or perform user profiling. However, when not used appropriately throttling runs a significant risk of causing user discomfort. In addition, under many circumstances it may be inadequate to provide a complete mitigation. <h4 class="heading settled" data-level="13.4.2" id="rounding-and-friends"><span class="secno">13.4.2. </span><span class="content">Rounding, quantization, and fuzzing</span><a class="self-link" href="#rounding-and-friends"></a></h4> Rounding, quantization, and fuzzing are three categories of mitigations that modify the raw data that would otherwise be returned to the developer. <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="rounding">Rounding</dfn> decreases the precision of data by reducing the number of digits used to express it. <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="quantization">Quantization</dfn> constrains continuous data to instead report a discrete subset of values. Fuzzing is the introduction of slight, random errors into the data. Collectively, these mitigations are useful to avoid fingerprinting, and are especially useful when doing so does not cause noticeable impact on user comfort. <h4 class="heading settled" data-level="13.4.3" id="limiting-header"><span class="secno">13.4.3. </span><span class="content">Limiting</span><a class="self-link" href="#limiting-header"></a></h4> <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="limiting">Limiting</dfn> is when data is reported only when it is within a specific range. For example, it is possible to comfortably limit reporting positional pose data when a user has moved beyond a specific distance away from an approved location. Care should be taken to ensure that the user experience is not negatively affected when employing this mitigation. It is often desirable to avoid a 'hard stop' at the end of a range as this may cause disruptive user experiences. <h3 class="heading settled" data-level="13.5" id="protected-functionality"><span class="secno">13.5. </span><span class="content">Protected functionality</span><a class="self-link" href="#protected-functionality"></a></h3> <p>The <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information④">sensitive information</a> exposed by the API can be divided into categories that share threat profiles and necessary protections against those threats.</p> <h4 class="heading settled" data-level="13.5.1" id="protect-immersiveness"><span class="secno">13.5.1. </span><span class="content">Immersiveness</span><a class="self-link" href="#protect-immersiveness"></a></h4> Users must be in control of when immersive sessions are created because the creation causes invasive changes on a user’s machine. For example, starting an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session③②">immersive session</a> will engage the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①⑥">XR device</a> sensors, take over access to the device’s display, and begin presenting immersive content which may terminate another application’s access to the XR hardware. It may also incur significant power or performance overhead on some systems or trigger the launching of a status tray or storefront. <div class="algorithm" data-algorithm="immersive-session-allowed"> <p>To determine if an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="immersive-session-request-is-allowed">immersive session request is allowed</dfn> for a given <var>global object</var> the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If the request was not made while the <var>global object</var> has <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#transient-activation" id="ref-for-transient-activation③">transient activation</a> or when <a data-link-type="dfn" href="#launching-a-web-application" id="ref-for-launching-a-web-application">launching a web application</a>, return <code>false</code></p> <li data-md> <p>If <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①①">user intent</a> to begin an <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session③③">immersive session</a> is not well understood, either via <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑧">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent②">implicit consent</a>, return <code>false</code></p> <li data-md> <p>Return <code>true</code></p> </ol> </div> <p>Starting an <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-inline" id="ref-for-dom-xrsessionmode-inline②④">"inline"</a></code> session does not implicitly carry the same requirements, though additional requirements may be imposed depending on the session’s <a data-link-type="dfn" href="#requested-features" id="ref-for-requested-features③">requested features</a>.</p> <div class="algorithm" data-algorithm="inline-session-allowed"> <p>To determine if an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="inline-session-request-is-allowed">inline session request is allowed</dfn> for a given <var>global object</var> the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If the session request contained any <a data-link-type="dfn" href="#required-features" id="ref-for-required-features②">required features</a> or <a data-link-type="dfn" href="#optional-features" id="ref-for-optional-features①">optional features</a> and the request was not made while the <var>global object</var> has <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#transient-activation" id="ref-for-transient-activation④">transient activation</a> or when <a data-link-type="dfn" href="#launching-a-web-application" id="ref-for-launching-a-web-application①">launching a web application</a>, return <code>false</code>.</p> <li data-md> <p>If the <var>global object</var> is not a <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#window" id="ref-for-window⑥">Window</a></code>, return <code>false</code>.</p> <li data-md> <p>Return <code>true</code>.</p> </ol> </div> <h4 class="heading settled" data-level="13.5.2" id="protect-poses"><span class="secno">13.5.2. </span><span class="content">Poses</span><a class="self-link" href="#protect-poses"></a></h4> When based on sensor data, <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose①②">XRPose</a></code> and <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose⑨">XRViewerPose</a></code> will expose <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑤">sensitive information</a> that may be misused in a number of ways, including input sniffing, gaze tracking, or fingerprinting. <div class="algorithm" data-algorithm="poses-allowed"> <p>To determine if <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="poses-may-be-reported">poses may be reported</dfn> to an <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤②">XRSession</a></code> <var>session</var>, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-global" id="ref-for-concept-relevant-global②">relevant global object</a> is not the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#current-global-object" id="ref-for-current-global-object">current global object</a>, return <code>false</code>.</p> <li data-md> <p>If <var>session</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrsession-visibilitystate" id="ref-for-dom-xrsession-visibilitystate②">visibilityState</a></code> is <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-hidden" id="ref-for-dom-xrvisibilitystate-hidden①">"hidden"</a></code>, return <code>false</code>.</p> <li data-md> <p>Determine if the pose data can be returned as follows:</p> <dl class="switch"> <dt data-md>If the pose data is known by the user agent to not expose fingerprintable sensor data <dd data-md> <p>Return <code>true</code>.</p> <dt data-md>If <a data-link-type="dfn" href="#data-adjustment" id="ref-for-data-adjustment①">data adjustments</a> will be applied to the underlying sensor data to prevent fingerprinting or profiling <dd data-md> <p>Return <code>true</code>.</p> <dt data-md>If <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①②">user intent</a> is well understood, either via <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent⑨">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent③">implicit consent</a> <dd data-md> <p>Return <code>true</code>.</p> <dt data-md>Otherwise <dd data-md> <p>Return <code>false</code>.</p> </dl> </ol> <p class="note" role="note"><span class="marker">Note:</span> The method by which a user agent determines that poses do not expose fingerprintable data is left to the user agent’s discretion.</p> </div> <p>The primary difference between <code class="idl"><a data-link-type="idl" href="#xrviewerpose" id="ref-for-xrviewerpose①⓪">XRViewerPose</a></code> and <code class="idl"><a data-link-type="idl" href="#xrpose" id="ref-for-xrpose①③">XRPose</a></code> is the inclusion of <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview②⓪">XRView</a></code> information. When more than one view is present and the physical relationship between these views is configurable by the user, the relationship between these views is considered <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑥">sensitive information</a> as it can be used to fingerprint or profile the user.</p> <p>If the relationship between <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview②①">XRView</a></code>s could uniquely identify the <a data-link-type="dfn" href="#xr-device" id="ref-for-xr-device①⑦">XR device</a>, then the user agent MUST anonymize the <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview②②">XRView</a></code> data to prevent fingerprinting. The method of anonymization is at the discretion of the user agent.</p> <p class="note" role="note"><span class="marker">Note:</span> Furthermore, if the relationship between <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview②③">XRView</a></code>s is affected by a user-configured interpupillary distance (IPD), then it is strongly recommended that the user agent require <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①⓪">explicit consent</a> during session creation, prior to reporting any <code class="idl"><a data-link-type="idl" href="#xrview" id="ref-for-xrview②④">XRView</a></code> data.</p> <h4 class="heading settled" data-level="13.5.3" id="protect-reference-spaces"><span class="secno">13.5.3. </span><span class="content">Reference spaces</span><a class="self-link" href="#protect-reference-spaces"></a></h4> Depending on the reference spaces used, several different types of <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑦">sensitive information</a> may be exposed to the application. <ul> <li data-md> <p>On devices which support <a data-link-type="dfn" href="#6dof" id="ref-for-6dof⑦">6DoF</a> tracking, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑧">"local"</a></code> reference spaces may be used to perform gait analysis, allowing user profiling and fingerprinting.</p> <li data-md> <p>On devices which support <a data-link-type="dfn" href="#6dof" id="ref-for-6dof⑧">6DoF</a> tracking, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑦">"local-floor"</a></code> reference spaces may be used to perform gait analysis, allowing user profiling and fingerprinting. In addition, because the <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑧">"local-floor"</a></code> reference spaces provide an established floor level, it may be possible for a site to infer the user’s height, allowing user profiling and fingerprinting.</p> <li data-md> <p><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor⑨">"bounded-floor"</a></code> reference spaces, when sufficiently constrained in size, do not enable developers to determine geographic location. However, because the floor level is established and users are able to walk around, it may be possible for a site to infer the user’s height or perform gait analysis, allowing user profiling and fingerprinting. In addition, it may be possible to perform fingerprinting using the bounds reported by a bounded reference space.</p> <li data-md> <p><code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded⑦">"unbounded"</a></code> reference spaces reveal the largest amount of spatial data and may result in user profiling and fingerprinting. For example, this data may enable determining a user’s specific geographic location or to perform gait analysis.</p> </ul> <p>As a result the various reference space types have restrictions placed on their creation to ensure the <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑧">sensitive information</a> exposed is handled safely:</p> <p>Most reference spaces require that <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①③">user intent</a> to use the reference space is well understood, either via <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①①">explicit consent</a> or <a data-link-type="dfn" href="#implicit-consent" id="ref-for-implicit-consent④">implicit consent</a>. See the <a data-link-type="dfn" href="#feature-requirements" id="ref-for-feature-requirements">feature requirements</a> table for details.</p> <p>Any group of <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local⑨">"local"</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor⑨">"local-floor"</a></code>, and <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-bounded-floor" id="ref-for-dom-xrreferencespacetype-bounded-floor①⓪">"bounded-floor"</a></code> reference spaces that are capable of being related to one another MUST share a common <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin②⓪">native origin</a>; This restriction only applies when the creation of <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-unbounded" id="ref-for-dom-xrreferencespacetype-unbounded⑧">"unbounded"</a></code> reference spaces has been restricted.</p> <div class="algorithm" data-algorithm="poses-limited"> <p>To determine if <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="poses-must-be-limited">poses must be limited</dfn> between two spaces, <var>space</var> and <var>baseSpace</var>, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>If either <var>space</var> or <var>baseSpace</var> are an <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①③">XRBoundedReferenceSpace</a></code> and the other space’s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin②①">native origin</a> falls further outside the <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry⑥">native bounds geometry</a> than a reasonable distance determined by the user agent, return true.</p> <li data-md> <p>If either <var>space</var> or <var>baseSpace</var> are an <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③⑥">XRReferenceSpace</a></code> with a <a data-link-type="dfn" href="#xrreferencespace-type" id="ref-for-xrreferencespace-type③">type</a> of <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local①⓪">"local"</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor①⓪">"local-floor"</a></code> and the distance between the spaces' <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin②②">native origins</a> is greater than a reasonable distance determined by the user agent, return <code>true</code>.</p> <li data-md> <p>Return <code>false</code>.</p> </ol> </div> <p class="note" role="note"><span class="marker">Note:</span> The requirement for document visibility is based on <a data-link-type="biblio" href="#biblio-device-orientation" title="Device Orientation and Motion">[DEVICE-ORIENTATION]</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> It is suggested that poses reported relative to a <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local" id="ref-for-dom-xrreferencespacetype-local①①">"local"</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-local-floor" id="ref-for-dom-xrreferencespacetype-local-floor①①">"local-floor"</a></code> reference space be <a data-link-type="dfn" href="#limiting" id="ref-for-limiting②">limited</a> to a distance of 15 meters from the <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③⑦">XRReferenceSpace</a></code>'s <a data-link-type="dfn" href="#xrspace-native-origin" id="ref-for-xrspace-native-origin②③">native origin</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> It is suggested that poses reported relative to an <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①④">XRBoundedReferenceSpace</a></code> be <a data-link-type="dfn" href="#limiting" id="ref-for-limiting③">limited</a> to a distance of 1 meter outside the <code class="idl"><a data-link-type="idl" href="#xrboundedreferencespace" id="ref-for-xrboundedreferencespace①⑤">XRBoundedReferenceSpace</a></code>'s <a data-link-type="dfn" href="#xrboundedreferencespace-native-bounds-geometry" id="ref-for-xrboundedreferencespace-native-bounds-geometry⑦">native bounds geometry</a>.</p> <h3 class="heading settled" data-level="13.6" id="trustedenvironment-security"><span class="secno">13.6. </span><span class="content">Trusted Environment</span><a class="self-link" href="#trustedenvironment-security"></a></h3> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="trusted-ui">Trusted UI</dfn> is an interface presented by the User Agent that the user is able to interact with but the page cannot. The user agent MUST support showing <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui">trusted UI</a>.</p> <p>A <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui①">trusted UI</a> MUST have the following properties:</p> <ul> <li data-md> <p>It must not be spoofable</p> <li data-md> <p>It indicates where the request/content displayed originates from</p> <li data-md> <p>If it relies on a shared secret with the user, this shared secret cannot be observed by a mixed reality capture (e.g. it may not be a gesture that can be seen by the camera)</p> <li data-md> <p>It is consistent between immersive experiences in the same UA</p> </ul> <p>Broadly speaking, there are two options for user agents who wish to support <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui②">trusted UI</a>. One option is <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="trusted-immersive-ui">trusted immersive UI</dfn>, which is a <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui③">trusted UI</a> which does not exit immersive mode. Implementing <a data-link-type="dfn" href="#trusted-immersive-ui" id="ref-for-trusted-immersive-ui">trusted immersive UI</a> can be challenging because <code>XRWebGLLayer</code> buffers fill the XR Device display and the User Agent does not typically "reserve" pixels for its own use. User agents are not required to support <a data-link-type="dfn" href="#trusted-immersive-ui" id="ref-for-trusted-immersive-ui①">trusted immersive UI</a>, they may instead temporarily pause/exit immersive mode and show non-immersive <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui④">trusted UI</a> to the user.</p> <div class="note" role="note"> Note: Examples of <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑤">trusted UI</a> include: <ul> <li data-md> <p>The default 2D mode browser shown when not in immersive mode</p> <li data-md> <p>A prompt shown within immersive mode which can only be interacted with via a reserved hardware button to prevent spoofing</p> <li data-md> <p>Pausing the immersive session and showing some form of native system environment in which a prompt can be shown</p> </ul> </div> <p>The ability to read input information (head pose, input pose, etc) poses a risk to the integrity of <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑥">trusted UI</a> as the page may use this information to snoop on the choices made by the user while interacting with the <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑦">trusted UI</a>, including guessing keyboard input. To prevent this risk the user agent MUST set the <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state①⓪">visibility state</a> of all <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤③">XRSession</a></code>s to <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-hidden" id="ref-for-dom-xrvisibilitystate-hidden②">"hidden"</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-visible-blurred" id="ref-for-dom-xrvisibilitystate-visible-blurred④">"visible-blurred"</a></code> when the user is interacting with <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑧">trusted UI</a> (<a data-link-type="dfn" href="#trusted-immersive-ui" id="ref-for-trusted-immersive-ui②">immersive</a> or non-immersive) such as URL bars or system dialogs. Additionally, to prevent a malicious page from being able to monitor input on other pages the user agent MUST set the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤④">XRSession</a></code>'s <a data-link-type="dfn" href="#xrsession-visibility-state" id="ref-for-xrsession-visibility-state①①">visibility state</a> to <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-hidden" id="ref-for-dom-xrvisibilitystate-hidden③">"hidden"</a></code> if the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#currently-focused-area-of-a-top-level-browsing-context" id="ref-for-currently-focused-area-of-a-top-level-browsing-context">currently focused area</a> does not belong to the document which created the <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤⑤">XRSession</a></code>.</p> <p>When choosing between using <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-hidden" id="ref-for-dom-xrvisibilitystate-hidden④">"hidden"</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-xrvisibilitystate-visible-blurred" id="ref-for-dom-xrvisibilitystate-visible-blurred⑤">"visible-blurred"</a></code> for a particular instance of <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui⑨">trusted UI</a>, the user agent MUST consider whether head pose information is a security risk. For example, <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui①⓪">trusted UI</a> involving text input, especially password inputs, can potentially leak the typed text through the user’s head pose as they type. The user agent SHOULD also stop exposing any eye tracking-related information in such cases.</p> <p>The user agent MUST use <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui①①">trusted UI</a> to show permissions prompts.</p> <p>If the virtual environment does not consistently track the user’s head motion with low latency and at a high frame rate the user may become disoriented or physically ill. Since it is impossible to force pages to produce consistently performant and correct content the user agent MUST provide a tracked, trusted environment and an <a data-link-type="dfn" href="#xr-compositor" id="ref-for-xr-compositor①⑦">XR Compositor</a> which runs asynchronously from page content. The compositor is responsible for compositing the trusted and untrusted content. If content is not performant, does not submit frames, or terminates unexpectedly the user agent should be able to continue presenting a responsive, <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui①②">trusted UI</a>.</p> <p>Additionally, page content has the ability to make users uncomfortable in ways not related to performance. Badly applied tracking, strobing colors, and content intended to offend, frighten, or intimidate are examples of content which may cause the user to want to quickly exit the XR experience. Removing the XR device in these cases may not always be a fast or practical option. To accommodate this the user agent MUST provide users with an action, such as pressing a reserved hardware button or performing a gesture, that escapes out of WebXR content and displays the user agent’s <a data-link-type="dfn" href="#trusted-ui" id="ref-for-trusted-ui①③">trusted UI</a>.</p> <h3 class="heading settled" data-level="13.7" id="contextisolation-security"><span class="secno">13.7. </span><span class="content">Context Isolation</span><a class="self-link" href="#contextisolation-security"></a></h3> <p>The trusted UI must be drawn by an independent rendering context whose state is isolated from any rendering contexts used by the page. (For example, any WebGL rendering contexts.) This is to prevent the page from corrupting the state of the trusted UI’s context, which may prevent it from properly rendering a tracked environment. It also prevents the possibility of the page being able to capture imagery from the trusted UI, which could lead to private information being leaked.</p> <p>Also, to prevent CORS-related vulnerabilities each <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context④">browsing context</a> will see a new instance of objects returned by the API, such as <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤⑥">XRSession</a></code>. Attributes such as the <a data-link-type="dfn" href="#xrwebgllayer-context" id="ref-for-xrwebgllayer-context⑤">context</a> set on an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer③①">XRWebGLLayer</a></code> with one <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm③③">relevant realm</a> should not be able to be read through an <code class="idl"><a data-link-type="idl" href="#xrwebgllayer" id="ref-for-xrwebgllayer③②">XRWebGLLayer</a></code> with a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm③④">relevant realm</a> that does not have the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#same-origin" id="ref-for-same-origin">same origin</a>. Similarly, methods invoked on the API MUST NOT cause an observable state change on other <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context⑤">browsing contexts</a>. For example: No method will be exposed that enables a system-level orientation reset, as this could be called repeatedly by a malicious page to prevent other pages from tracking properly. The user agent MUST, however, respect system-level orientation resets triggered by a user gesture or system menu.</p> <p class="note" role="note"><span class="marker">Note:</span> This doesn’t apply to state changes that are caused by one <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context⑥">browsing context</a> entering immersive mode, acquiring a lock on the device, and potentially firing <a class="idl-code" data-link-type="event" href="#eventdef-xrsystem-devicechange" id="ref-for-eventdef-xrsystem-devicechange②">devicechange</a> events on other <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context⑦">browsing contexts</a>.</p> <h3 class="heading settled" data-level="13.8" id="fingerprinting-security"><span class="secno">13.8. </span><span class="content">Fingerprinting</span><a class="self-link" href="#fingerprinting-security"></a></h3> <p>Given that the API describes hardware available to the user and its capabilities it will inevitably provide additional surface area for fingerprinting. While it’s impossible to completely avoid this, user agents should take steps to mitigate the issue. This spec limits reporting of available hardware to only a single device at a time, which prevents using the rare cases of multiple headsets being connected as a fingerprinting signal. Also, the devices that are reported have no string identifiers and expose very little information about the devices capabilities until an XRSession is created, which requires additional protections when <a data-link-type="dfn" href="#sensitive-information" id="ref-for-sensitive-information⑨">sensitive information</a> will be exposed.</p> <h4 class="heading settled" data-level="13.8.1" id="issessionsupported-fingerprinting"><span class="secno">13.8.1. </span><span class="content">Fingerprinting considerations of <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported⑥">isSessionSupported()</a></code></span><a class="self-link" href="#issessionsupported-fingerprinting"></a></h4> <p>Because <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported⑦">isSessionSupported()</a></code> can be called without user activation it may be used as a fingerprinting vector.</p> <p><dfn class="dfn-paneled idl-code" data-dfn-type="permission" data-export id="permissiondef-xr-session-supported"><code>"xr-session-supported"</code></dfn> <a data-link-type="dfn" href="https://www.w3.org/TR/permissions/#dfn-powerful-feature" id="ref-for-dfn-powerful-feature①">powerful feature</a> gates access to the <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported⑧">isSessionSupported()</a></code> API.</p> <p>The <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported①">"xr-session-supported"</a>’s permission-related algorithms and types are defined as follows:</p> <dl> <dt><a data-link-type="dfn" href="https://www.w3.org/TR/permissions/#dfn-permission-descriptor-type" id="ref-for-dfn-permission-descriptor-type">permission descriptor type</a> <dd> <pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrsessionsupportedpermissiondescriptor"><code><c- g>XRSessionSupportedPermissionDescriptor</c-></code></dfn>: <a data-link-type="idl-name" href="https://www.w3.org/TR/permissions/#dom-permissiondescriptor" id="ref-for-dom-permissiondescriptor"><c- n>PermissionDescriptor</c-></a> { <a data-link-type="idl-name" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode⑧"><c- n>XRSessionMode</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="XRSessionSupportedPermissionDescriptor" data-dfn-type="dict-member" data-export data-type="XRSessionMode " id="dom-xrsessionsupportedpermissiondescriptor-mode"><code><c- g>mode</c-></code></dfn>; }; </pre> <p><code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissiondescriptor-name" id="ref-for-dom-permissiondescriptor-name">name</a></code> for <code class="idl"><a data-link-type="idl" href="#dictdef-xrpermissiondescriptor" id="ref-for-dictdef-xrpermissiondescriptor①">XRPermissionDescriptor</a></code> is <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported②">"xr-session-supported"</a>.</p> </dl> <h4 class="heading settled" data-level="13.8.2" id="automatic-granting-xr-session-supported"><span class="secno">13.8.2. </span><span class="content">Considerations for when to automatically grant <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported③">"xr-session-supported"</a></span><a class="self-link" href="#automatic-granting-xr-session-supported"></a></h4> <section class="non-normative"> <p>There is often tension between privacy and personalization on the Web. This section provides guidance on where that tradeoff can be circumscribed, and when the user agent can describe the browser’s WebXR capabilities to a site via <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported⑨">isSessionSupported()</a></code> without any privacy reduction.</p> <p><a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported④">"xr-session-supported"</a> may be granted automatically for some systems based on the criteria below. This can provide a better user experience and mitigate permissions fatigue.</p> <p>A set of user agents is <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="indistinguishable-by-user-agent-string">indistinguishable by user agent string</dfn> if they all report the same <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-useragent" id="ref-for-dom-navigator-useragent">userAgent</a></code> and <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-appversion" id="ref-for-dom-navigator-appversion">appVersion</a></code>. Such classes are typically identified by the browser version and platform/device being run on, but cannot be distinguished by the status of any connected external device. We can use the concept of user agents that are <a data-link-type="dfn" href="#indistinguishable-by-user-agent-string" id="ref-for-indistinguishable-by-user-agent-string①">indistinguishable by user agent string</a> to properly assess fingerprinting risk.</p> <p>Some user agents <a data-link-type="dfn" href="#indistinguishable-by-user-agent-string" id="ref-for-indistinguishable-by-user-agent-string②">indistinguishable by user agent string</a> will <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="never-support">never support</dfn> sessions of a given <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode⑨">XRSessionMode</a></code>. <span class="note">For example: User agents running on a model of phone that is known to not meet requirements for mobile AR support.</span> In these cases there is little fingerprinting risk in <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported①⓪">isSessionSupported()</a></code> always reporting the <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①⓪">XRSessionMode</a></code> is not supported because every such device will consistently report the same value and it’s assumed that device type and model can be inferred in other ways, such as through <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-useragent" id="ref-for-dom-navigator-useragent①">userAgent</a></code>. Thus, on such systems, the user agent should automatically deny <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported⑤">"xr-session-supported"</a> for the relevant <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①①">XRSessionMode</a></code>.</p> <p>Other user agents <a data-link-type="dfn" href="#indistinguishable-by-user-agent-string" id="ref-for-indistinguishable-by-user-agent-string③">indistinguishable by user agent string</a> will <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="usually-support">usually support</dfn> sessions of a given <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①②">XRSessionMode</a></code>. <span class="note">For example: User agents known to support WebXR that run exclusively within VR headsets are likely to support <code class="idl"><a data-link-type="idl" href="#dom-xrsessionmode-immersive-vr" id="ref-for-dom-xrsessionmode-immersive-vr④">"immersive-vr"</a></code> sessions unless specifically blocked by the user.</span> In these cases reporting that the <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①③">XRSessionMode</a></code> is not supported, while accurate, would offer more uniquely identifying information about the user. As such reporting that the <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①④">XRSessionMode</a></code> is always available and allowing <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-requestsession" id="ref-for-dom-xrsystem-requestsession④">requestSession()</a></code> to fail is more privacy-preserving while likely not being a source of confusion for the user. On such systems, the user agent should automatically grant <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported⑥">"xr-session-supported"</a> for the relevant <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①⑤">XRSessionMode</a></code>.</p> <p>User agents <a data-link-type="dfn" href="#indistinguishable-by-user-agent-string" id="ref-for-indistinguishable-by-user-agent-string④">indistinguishable by user agent string</a> for which availability of XR capabilities is highly variable, such as desktop systems which support XR peripherals, present the highest fingerprinting risk. User agents on such devices should not automatically grant <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported⑦">"xr-session-supported"</a> in a way that allows the <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported①①">isSessionSupported()</a></code> API to provide additional fingerprinting bits.</p> <div class="note" role="note"> Note: Some acceptable approaches to handle such cases are as follows: <ul> <li data-md> <p>Always judging <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①②">explicit consent</a> for <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported⑧">"xr-session-supported"</a> (with a potentially cached permissions prompt or similar) when <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported①②">isSessionSupported()</a></code> is called.</p> <li data-md> <p>Automatically granting <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported⑨">"xr-session-supported"</a> but having <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported①③">isSessionSupported()</a></code> always report <code>true</code> even on platforms which do not consistently have XR capabilities available, regardless of whether or not the appropriate hardware or software is present. This comes at the cost of user ergonomics, as it will cause pages to advertise XR content to users that cannot view it.</p> <li data-md> <p>Have <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported①④">isSessionSupported()</a></code> request <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①③">explicit consent</a> for <a class="idl-code" data-link-type="permission" href="#permissiondef-xr-session-supported" id="ref-for-permissiondef-xr-session-supported①⓪">"xr-session-supported"</a> when the appropriate hardware is present, and when such hardware is _not_ present, return <code>false</code> after an appropriately random length of time. In such an implementation content must not be able to distinguish between cases where the user agent was not connected to XR hardware and cases where the user agent was connected to XR hardware but the user declined to provide <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①④">explicit consent</a>.</p> </ul> </div> <p>Whatever the technique chosen, it should not reveal additional knowledge about connected XR hardware without <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①⑤">explicit consent</a>.</p> </section> <h2 class="heading settled" data-level="14" id="integrations"><span class="secno">14. </span><span class="content">Integrations</span><a class="self-link" href="#integrations"></a></h2> <h3 class="heading settled" data-level="14.1" id="permissions-policy"><span class="secno">14.1. </span><span class="content">Permissions Policy</span><a class="self-link" href="#permissions-policy"></a></h3> <p>This specification defines a <a data-link-type="dfn" href="https://www.w3.org/TR/permissions-policy-1/#policy-controlled-feature" id="ref-for-policy-controlled-feature">policy-controlled feature</a> that controls whether any <code class="idl"><a data-link-type="idl" href="#xrsession" id="ref-for-xrsession①⑤⑦">XRSession</a></code> that requires the use of spatial tracking may be returned by <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-requestsession" id="ref-for-dom-xrsystem-requestsession⑤">requestSession()</a></code>, and whether support for session modes that require spatial tracking may be indicated by either <code class="idl"><a data-link-type="idl" href="#dom-xrsystem-issessionsupported" id="ref-for-dom-xrsystem-issessionsupported①⑤">isSessionSupported()</a></code> or <a class="idl-code" data-link-type="event" href="#eventdef-xrsystem-devicechange" id="ref-for-eventdef-xrsystem-devicechange③">devicechange</a> events on the <code class="idl"><a data-link-type="idl" href="#dom-navigator-xr" id="ref-for-dom-navigator-xr②">navigator.xr</a></code> object.</p> <p>The feature identifier for this feature is <code>"xr-spatial-tracking"</code>.</p> <p>The <a data-link-type="dfn" href="https://www.w3.org/TR/permissions-policy-1/#policy-controlled-feature-default-allowlist" id="ref-for-policy-controlled-feature-default-allowlist">default allowlist</a> for this feature is <code>["self"]</code>.</p> <p class="note" role="note"><span class="marker">Note:</span> If the document’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin" id="ref-for-concept-origin⑤">origin</a> is not allowed to use the <code>"xr-spatial-tracking"</code> <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/dom.html#concept-document-permissions-policy" id="ref-for-concept-document-permissions-policy①">permissions policy</a> any <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session③④">immersive sessions</a> will be blocked, because all <a data-link-type="dfn" href="#immersive-session" id="ref-for-immersive-session③⑤">immersive sessions</a> require some use of spatial tracking. <a data-link-type="dfn" href="#inline-session" id="ref-for-inline-session⑤">Inline sessions</a> will still be allowed, but restricted to only using the <code class="idl"><a data-link-type="idl" href="#dom-xrreferencespacetype-viewer" id="ref-for-dom-xrreferencespacetype-viewer⑥">"viewer"</a></code> <code class="idl"><a data-link-type="idl" href="#xrreferencespace" id="ref-for-xrreferencespace③⑧">XRReferenceSpace</a></code>.</p> <h3 class="heading settled" data-level="14.2" id="permissions"><span class="secno">14.2. </span><span class="content">Permissions API Integration</span><a class="self-link" href="#permissions"></a></h3> <p>The <a data-link-type="biblio" href="#biblio-permissions" title="Permissions">[permissions]</a> API provides a uniform way for websites to request permissions from users and query which permissions they have been granted.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-type="permission" data-export id="permissiondef-xr"><code>"xr"</code></dfn> <a data-link-type="dfn" href="https://www.w3.org/TR/permissions/#dfn-powerful-feature" id="ref-for-dfn-powerful-feature②">powerful feature</a>’s permission-related algorithms and types are defined as follows:</p> <dl> <dt><a data-link-type="dfn" href="https://www.w3.org/TR/permissions/#dfn-permission-descriptor-type" id="ref-for-dfn-permission-descriptor-type①">permission descriptor type</a> <dd> <pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-xrpermissiondescriptor"><code><c- g>XRPermissionDescriptor</c-></code></dfn>: <a data-link-type="idl-name" href="https://www.w3.org/TR/permissions/#dom-permissiondescriptor" id="ref-for-dom-permissiondescriptor①"><c- n>PermissionDescriptor</c-></a> { <a data-link-type="idl-name" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①⑥"><c- n>XRSessionMode</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="XRPermissionDescriptor" data-dfn-type="dict-member" data-export data-type="XRSessionMode " id="dom-xrpermissiondescriptor-mode"><code><c- g>mode</c-></code></dfn>; <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence⑤"><c- b>sequence</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①①"><c- b>DOMString</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="XRPermissionDescriptor" data-dfn-type="dict-member" data-export data-type="sequence<DOMString> " id="dom-xrpermissiondescriptor-requiredfeatures"><code><c- g>requiredFeatures</c-></code></dfn>; <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence⑥"><c- b>sequence</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①②"><c- b>DOMString</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="XRPermissionDescriptor" data-dfn-type="dict-member" data-export data-type="sequence<DOMString> " id="dom-xrpermissiondescriptor-optionalfeatures"><code><c- g>optionalFeatures</c-></code></dfn>; }; </pre> <p><code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissiondescriptor-name" id="ref-for-dom-permissiondescriptor-name①">name</a></code> for <code class="idl"><a data-link-type="idl" href="#dictdef-xrpermissiondescriptor" id="ref-for-dictdef-xrpermissiondescriptor②">XRPermissionDescriptor</a></code> is <a class="idl-code" data-link-type="permission" href="#permissiondef-xr" id="ref-for-permissiondef-xr">"xr"</a>.</p> <dt><a data-link-type="dfn" href="https://www.w3.org/TR/permissions/#dfn-permission-result-type" id="ref-for-dfn-permission-result-type">permission result type</a> <dd> <pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed" id="ref-for-Exposed②⓪"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrpermissionstatus"><code><c- g>XRPermissionStatus</c-></code></dfn>: <a data-link-type="idl-name" href="https://www.w3.org/TR/permissions/#dom-permissionstatus" id="ref-for-dom-permissionstatus"><c- n>PermissionStatus</c-></a> { <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array⑥"><c- b>FrozenArray</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①③"><c- b>DOMString</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="XRPermissionStatus" data-dfn-type="attribute" data-export data-type="FrozenArray<DOMString>" id="dom-xrpermissionstatus-granted"><code><c- g>granted</c-></code></dfn>; }; </pre> <dt><a data-link-type="dfn" href="https://www.w3.org/TR/permissions/#dfn-permission-query-algorithm" id="ref-for-dfn-permission-query-algorithm">permission query algorithm</a> <dd> <div class="algorithm" data-algorithm="xr-permission-query-algorithm"> To query the "xr" permission with an <code class="idl"><a data-link-type="idl" href="#dictdef-xrpermissiondescriptor" id="ref-for-dictdef-xrpermissiondescriptor③">XRPermissionDescriptor</a></code> <var>descriptor</var> and a <code class="idl"><a data-link-type="idl" href="#xrpermissionstatus" id="ref-for-xrpermissionstatus②">XRPermissionStatus</a></code> <var>status</var>, the UA MUST run the following steps: <ol> <li data-md> <p>Set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state①">state</a></code> to <var>descriptor</var>’s <a data-link-type="dfn" href="https://www.w3.org/TR/permissions/#dfn-permission-state" id="ref-for-dfn-permission-state">permission state</a>.</p> <li data-md> <p>If <var>status</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state②">state</a></code> is <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstate-denied" id="ref-for-dom-permissionstate-denied②">"denied"</a></code>, set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpermissionstatus-granted" id="ref-for-dom-xrpermissionstatus-granted①">granted</a></code> to an empty <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array⑦">FrozenArray</a></code> and abort these steps.</p> <li data-md> <p>Let <var>result</var> be the result of <a data-link-type="dfn" href="#resolve-the-requested-features" id="ref-for-resolve-the-requested-features①">resolving the requested features</a> given <var>descriptor</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpermissiondescriptor-requiredfeatures" id="ref-for-dom-xrpermissiondescriptor-requiredfeatures">requiredFeatures</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-xrpermissiondescriptor-optionalfeatures" id="ref-for-dom-xrpermissiondescriptor-optionalfeatures">optionalFeatures</a></code>, and <code class="idl"><a data-link-type="idl" href="#dom-xrpermissiondescriptor-mode" id="ref-for-dom-xrpermissiondescriptor-mode">mode</a></code>.</p> <li data-md> <p>If <var>result</var> is <code>null</code>, run the following steps:</p> <ol> <li data-md> <p>Set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpermissionstatus-granted" id="ref-for-dom-xrpermissionstatus-granted②">granted</a></code> to an empty <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array⑧">FrozenArray</a></code>.</p> <li data-md> <p>Set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state③">state</a></code> to <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstate-denied" id="ref-for-dom-permissionstate-denied③">"denied"</a></code>.</p> <li data-md> <p>Abort these steps.</p> </ol> <li data-md> <p>Let (<var>consentRequired</var>, <var>consentOptional</var>, <var>granted</var>) be the fields of <var>result</var>.</p> <li data-md> <p>Set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpermissionstatus-granted" id="ref-for-dom-xrpermissionstatus-granted③">granted</a></code> to <var>granted</var>.</p> <li data-md> <p>If <var>consentRequired</var> <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-is-empty" id="ref-for-list-is-empty">is empty</a> and <var>consentOptional</var> <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-is-empty" id="ref-for-list-is-empty①">is empty</a>, set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state④">state</a></code> to <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstate-granted" id="ref-for-dom-permissionstate-granted">"granted"</a></code> and abort these steps</p> <li data-md> <p>Set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state⑤">state</a></code> to <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstate-prompt" id="ref-for-dom-permissionstate-prompt">"prompt"</a></code>.</p> </ol> </div> <dt>permission request algorithm <dd> <div class="algorithm" data-algorithm="xr-permission-request-algorithm"> To <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="request the xr permission" data-noexport id="request-the-xr-permission">request the "xr" permission</dfn> with an <code class="idl"><a data-link-type="idl" href="#dictdef-xrpermissiondescriptor" id="ref-for-dictdef-xrpermissiondescriptor④">XRPermissionDescriptor</a></code> <var>descriptor</var> and a <code class="idl"><a data-link-type="idl" href="#xrpermissionstatus" id="ref-for-xrpermissionstatus③">XRPermissionStatus</a></code> <var>status</var>, the UA MUST run the following steps: <ol> <li data-md> <p>Set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpermissionstatus-granted" id="ref-for-dom-xrpermissionstatus-granted④">granted</a></code> to an empty <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-frozen-array" id="ref-for-idl-frozen-array⑨">FrozenArray</a></code>.</p> <li data-md> <p>Let <var>requiredFeatures</var> be <var>descriptor</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpermissiondescriptor-requiredfeatures" id="ref-for-dom-xrpermissiondescriptor-requiredfeatures①">requiredFeatures</a></code>.</p> <li data-md> <p>Let <var>optionalFeatures</var> be <var>descriptor</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpermissiondescriptor-optionalfeatures" id="ref-for-dom-xrpermissiondescriptor-optionalfeatures①">optionalFeatures</a></code>.</p> <li data-md> <p>Let <var>device</var> be the result of <a data-link-type="dfn" href="#obtain-the-current-device" id="ref-for-obtain-the-current-device①">obtaining the current device</a> for <var>mode</var>, <var>requiredFeatures</var>, and <var>optionalFeatures</var>.</p> <li data-md> <p>Let <var>result</var> be the result of <a data-link-type="dfn" href="#resolve-the-requested-features" id="ref-for-resolve-the-requested-features②">resolving the requested features</a> given <var>requiredFeatures</var>,<var>optionalFeatures</var>, and <code class="idl"><a data-link-type="idl" href="#dom-xrpermissiondescriptor-mode" id="ref-for-dom-xrpermissiondescriptor-mode①">mode</a></code>.</p> <li data-md> <p>If <var>result</var> is <code>null</code>, run the following steps:</p> <ol> <li data-md> <p>Set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state⑥">state</a></code> to <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstate-denied" id="ref-for-dom-permissionstate-denied④">"denied"</a></code>.</p> <li data-md> <p>Abort these steps.</p> </ol> <li data-md> <p>Let (<var>consentRequired</var>, <var>consentOptional</var>, <var>granted</var>) be the fields of <var>result</var>.</p> <li data-md> <p>The user agent MAY at this point ask the user’s permission for the calling algorithm to use any of the features in <var>consentRequired</var> and <var>consentOptional</var>. The results of these prompts should be included when determining if there is a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①④">user intent</a> for enabling these features.</p> <li data-md> <p>For each <var>feature</var> in <var>consentRequired</var> perform the following steps:</p> <ol> <li data-md> <p>The user agent MAY at this point ask the user’s permission for the calling algorithm to use <var>feature</var>. The results of these prompts should be included when determining if there is a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①⑤">user intent</a> to enable <var>feature</var>.</p> <li data-md> <p>If a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①⑥">user intent</a> to enable <var>feature</var> has not been determined, set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state⑦">state</a></code> to <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstate-denied" id="ref-for-dom-permissionstate-denied⑤">"denied"</a></code> and abort these steps.</p> <li data-md> <p>If <var>feature</var> is not in <var>granted</var>, append <var>feature</var> to <var>granted</var>.</p> </ol> <li data-md> <p>For each <var>feature</var> in <var>consentOptional</var> perform the following steps:</p> <ol> <li data-md> <p>The user agent MAY at this point ask the user’s permission for the calling algorithm to use <var>feature</var>. The results of these prompts should be included when determining if there is a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①⑦">user intent</a> to enable <var>feature</var>.</p> <li data-md> <p>If a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①⑧">user intent</a> to enable <var>feature</var> has not been determined, continue to the next entry.</p> <li data-md> <p>If <var>feature</var> is not in <var>granted</var>, append <var>feature</var> to <var>granted</var>.</p> </ol> <li data-md> <p>Set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="#dom-xrpermissionstatus-granted" id="ref-for-dom-xrpermissionstatus-granted⑤">granted</a></code> to <var>granted</var>.</p> <li data-md> <p>Add all elements of <var>granted</var> to <var>device</var>’s <a data-link-type="dfn" href="#xr-device-set-of-granted-features" id="ref-for-xr-device-set-of-granted-features">set of granted features</a> for <var>mode</var>.</p> <li data-md> <p>Set <var>status</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state⑧">state</a></code> to <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/permissions/#dom-permissionstate-granted" id="ref-for-dom-permissionstate-granted①">"granted"</a></code>.</p> </ol> <p class="note" role="note"><span class="marker">Note:</span> The user agent has the freedom to batch up permissions prompts for all requested features when gauging if there is a clear signal of <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent①⑨">user intent</a>, but it is also allowed to show them one at a time.</p> <p class="note" role="note"><span class="marker">Note:</span> When determining <a data-link-type="dfn" href="#user-intent" id="ref-for-user-intent②⓪">user intent</a> for a web application, user agents must check that it was explicitly <a data-link-type="dfn" href="#launching-a-web-application" id="ref-for-launching-a-web-application②">launched by the user</a> as a web application. They must NOT just check if the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin" id="ref-for-concept-origin⑥">origin</a> matches that of an installed web application.</p> </div> </dl> <div class="algorithm" data-algorithm="resolve-features"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="resolve-the-requested-features">resolve the requested features</dfn> given <var>requiredFeatures</var> and <var>optionalFeatures</var> for an <code class="idl"><a data-link-type="idl" href="#enumdef-xrsessionmode" id="ref-for-enumdef-xrsessionmode①⑦">XRSessionMode</a></code> <var>mode</var>, the user agent MUST run the following steps:</p> <ol> <li data-md> <p>Let <var>consentRequired</var> be an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②⑧">list</a> of <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①④">DOMString</a></code>.</p> <li data-md> <p>Let <var>consentOptional</var> be an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list②⑨">list</a> of <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①⑤">DOMString</a></code>.</p> <li data-md> <p>Let <var>granted</var> be an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list③⓪">list</a> of <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①⑥">DOMString</a></code>.</p> <li data-md> <p>Let <var>device</var> be the result of <a data-link-type="dfn" href="#obtain-the-current-device" id="ref-for-obtain-the-current-device②">obtaining the current device</a> for <var>mode</var>, <var>requiredFeatures</var>, and <var>optionalFeatures</var>.</p> <li data-md> <p>Let <var>previouslyEnabled</var> be <var>device</var>’s <a data-link-type="dfn" href="#xr-device-set-of-granted-features" id="ref-for-xr-device-set-of-granted-features①">set of granted features</a> for <var>mode</var>.</p> <li data-md> <p>If <var>device</var> is <code>null</code> or <var>device</var>’s <a data-link-type="dfn" href="#list-of-supported-modes" id="ref-for-list-of-supported-modes⑥">list of supported modes</a> does not <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain⑦">contain</a> <var>mode</var>, run the following steps:</p> <ol> <li data-md> <p>Return the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#tuple" id="ref-for-tuple">tuple</a> (<var>consentRequired</var>, <var>consentOptional</var>, <var>granted</var>)</p> </ol> <li data-md> <p>Add every <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor⑨">feature descriptor</a> in the <a data-link-type="dfn" href="#default-features" id="ref-for-default-features①">default features</a> table associated with <var>mode</var> to <var>granted</var> if it is not already present.</p> <li data-md> <p>For each <var>feature</var> in <var>requiredFeatures</var> perform the following steps:</p> <ol> <li data-md> <p>If the <var>feature</var> is <code>null</code>, <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#iteration-continue" id="ref-for-iteration-continue">continue</a> to the next entry.</p> <li data-md> <p>If <var>feature</var> is not a valid <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor①⓪">feature descriptor</a>, return <code>null</code>.</p> <li data-md> <p>If <var>feature</var> is already in <var>granted</var>, continue to the next entry.</p> <li data-md> <p>If the requesting document’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#concept-origin" id="ref-for-concept-origin⑦">origin</a> is not allowed to use any <a href="#permissions-policy">permissions policy</a> required by <var>feature</var> as indicated by the <a data-link-type="dfn" href="#feature-requirements" id="ref-for-feature-requirements①">feature requirements</a> table, return <code>null</code>.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device②⑨">XR device</a> is not <a data-link-type="dfn" href="#capable-of-supporting" id="ref-for-capable-of-supporting①">capable of supporting</a> the functionality described by <var>feature</var> or the user agent has otherwise determined to reject the feature, return <code>null</code>.</p> <li data-md> <p>If the functionality described by <var>feature</var> requires <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①⑥">explicit consent</a> and <var>feature</var> is not in <var>previouslyEnabled</var>, append it to <var>consentRequired</var>.</p> <li data-md> <p>Else append <var>feature</var> to <var>granted</var>.</p> </ol> <li data-md> <p>For each <var>feature</var> in <var>optionalFeatures</var> perform the following steps:</p> <ol> <li data-md> <p>If the <var>feature</var> is <code>null</code>, <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#iteration-continue" id="ref-for-iteration-continue①">continue</a> to the next entry.</p> <li data-md> <p>If <var>feature</var> is not a valid <a data-link-type="dfn" href="#feature-descriptor" id="ref-for-feature-descriptor①①">feature descriptor</a>, <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#iteration-continue" id="ref-for-iteration-continue②">continue</a> to the next entry.</p> <li data-md> <p>If <var>feature</var> is already in <var>granted</var>, continue to the next entry.</p> <li data-md> <p>If the requesting document’s origin is not allowed to use any <a href="#permissions-policy">permissions policy</a> required by <var>feature</var> as indicated by the <a data-link-type="dfn" href="#feature-requirements" id="ref-for-feature-requirements②">feature requirements</a> table, continue to the next entry.</p> <li data-md> <p>If <var>session</var>’s <a data-link-type="dfn" href="#xrsession-xr-device" id="ref-for-xrsession-xr-device③⓪">XR device</a> is not <a data-link-type="dfn" href="#capable-of-supporting" id="ref-for-capable-of-supporting②">capable of supporting</a> the functionality described by <var>feature</var> or the user agent has otherwise determined to reject the feature, continue to the next entry.</p> <li data-md> <p>If the functionality described by <var>feature</var> requires <a data-link-type="dfn" href="#explicit-consent" id="ref-for-explicit-consent①⑦">explicit consent</a> and <var>feature</var> is not in <var>previouslyEnabled</var>, append it to <var>consentOptional</var>.</p> <li data-md> <p>Else append <var>feature</var> to <var>granted</var>.</p> </ol> <li data-md> <p>Return the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#tuple" id="ref-for-tuple①">tuple</a> <code>(|consentRequired|, |consentOptional|, |granted|)</code></p> </ol> </div> <h2 class="no-num heading settled" id="changes"><span class="content"> Changes</span><a class="self-link" href="#changes"></a></h2> <h3 class="no-num heading settled" id="changes-from-20220331"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2022/CR-webxr-20220331/">Candidate Recommendation Snapshot, 31 March 2022</a></span><a class="self-link" href="#changes-from-20220331"></a></h3> <ul> <li data-md> <p>Expose XRSession’s granted features (<a href="https://github.com/immersive-web/webxr/pull/1296">GitHub #1296</a>)</p> <li data-md> <p>Add support for the isSystemKeyboardSupported attribute (<a href="https://github.com/immersive-web/webxr/pull/1314">GitHub #1314</a>)</p> <li data-md> <p>Clarify getPose behavior with visibile-blurred (<a href="https://github.com/immersive-web/webxr/pull/1332">GitHub #1332</a>)</p> <li data-md> <p>Transient intent addition (<a href="https://github.com/immersive-web/webxr/pull/1343">GitHub #1343</a>)</p> <li data-md> <p>First draft for adding a property to XRInputSource to say it’s visible elsewhere (<a href="https://github.com/immersive-web/webxr/pull/1353">GitHub #1353</a>)</p> <li data-md> <p>Clarify rgb vs srgb behavior (<a href="https://github.com/immersive-web/webxr/pull/1359">GitHub #1359</a>)</p> </ul> <h3 class="no-num heading settled" id="changes-from-20200724"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2020/WD-webxr-20200724/">Working Draft 24 July 2020</a></span><a class="self-link" href="#changes-from-20200724"></a></h3> <ul> <li data-md> <p>Fixed up predictedDisplayTime and defined inline behavior (<a href="https://github.com/immersive-web/webxr/pull/1230">GitHub #1230</a>)</p> <li data-md> <p>Add XRFrame.predictedDisplayTime (<a href="https://github.com/immersive-web/webxr/pull/1217">GitHub #1217</a>)</p> <li data-md> <p>Add support for targetFrameRate and supportedFrameRates (<a href="https://github.com/immersive-web/webxr/pull/1201">GitHub #1201</a>)</p> <li data-md> <p>Add support for foveation (<code class="idl"><a data-link-type="idl" href="#dom-xrwebgllayer-fixedfoveation" id="ref-for-dom-xrwebgllayer-fixedfoveation③">fixedFoveation</a></code> (<a href="https://github.com/immersive-web/webxr/pull/1195">GitHub #1195</a>)</p> <li data-md> <p>Only allow sessions to use features they explicity request or are implicitly granted based on mode (<a href="https://github.com/immersive-web/webxr/pull/1189">GitHub #1189</a>)</p> <li data-md> <p>Enhance examples of implicit user intent (<a href="https://github.com/immersive-web/webxr/pull/1188">GitHub #1188</a>)</p> <li data-md> <p>Added support for angular and linear velocity (<a href="https://github.com/immersive-web/webxr/pull/1182">GitHub #1182</a>)</p> <li data-md> <p>Ensure platform conventions remain consistent for XRReferenceSpaces (<a href="https://github.com/immersive-web/webxr/pull/1180">GitHub #1180</a>)</p> <li data-md> <p>Inverted composition disabled flag to be <a data-link-type="dfn" href="#xrrenderstate-composition-enabled" id="ref-for-xrrenderstate-composition-enabled⑦">composition enabled</a> (<a href="https://github.com/immersive-web/webxr/pull/1172">GitHub #1172</a>)</p> <li data-md> <p>Reject promise returned from end() if session is already ended (<a href="https://github.com/immersive-web/webxr/pull/1170">GitHub #1170</a>)</p> <li data-md> <p>During requestAnimationFrame detect if session has ended (<a href="https://github.com/immersive-web/webxr/pull/1169">GitHub #1169</a>)</p> <li data-md> <p>Require quantization for recommendedViewportScale (<a href="https://github.com/immersive-web/webxr/pull/1151">GitHub #1151</a>)</p> <li data-md> <p>Make sessionsupported pref autogranting non-normative (<a href="https://github.com/immersive-web/webxr/pull/1136">GitHub #1146</a>)</p> <li data-md> <p>Added a definition of XR device that includes nonvisual usage (<a href="https://github.com/immersive-web/webxr/pull/927">GitHub #927</a>)</p> <li data-md> <p>Incorporating conclusions of recent privacy discussions (<a href="https://github.com/immersive-web/webxr/pull/1124">GitHub #1124</a>)</p> <li data-md> <p>Switch isSessionSupported from using user intent to using permissions (<a href="https://github.com/immersive-web/webxr/pull/1136">GitHub #1136</a>)</p> <li data-md> <p>Clarify that minimum viewport scale may change (<a href="https://github.com/immersive-web/webxr/pull/1134">GitHub #1134</a>)</p> <li data-md> <p>Improvements to the fingerprinting PR (<a href="https://github.com/immersive-web/webxr/pull/1133">GitHub #1133</a>)</p> <li data-md> <p>Add requestViewportScale/recommendedViewportScale (<a href="https://github.com/immersive-web/webxr/pull/1132">GitHub #1132</a>)</p> <li data-md> <p>Clarify that framebuffer scale factors apply to width/height separately (<a href="https://github.com/immersive-web/webxr/pull/1131">GitHub #1131</a>)</p> <li data-md> <p>Ensure that pending render state is always applied (<a href="https://github.com/immersive-web/webxr/pull/1128">GitHub #1128</a>)</p> <li data-md> <p>Gate context XR compatability on xr-spatial-tracking permissions policy. (<a href="https://github.com/immersive-web/webxr/pull/1126">GitHub #1126</a>)</p> <li data-md> <p>Change timing of when updateRenderState changes apply (<a href="https://github.com/immersive-web/webxr/pull/1111">GitHub #1111</a>)</p> </ul> <h3 class="no-num heading settled" id="changes-from-20191010"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2019/WD-webxr-20191010/">Working Draft 10 October 2019</a></span><a class="self-link" href="#changes-from-20191010"></a></h3> <p>New features:</p> <ul> <li data-md> <p>Add feature for secondary views (<a href="https://github.com/immersive-web/webxr/pull/1083">GitHub #1083</a>)</p> <li data-md> <p>Update XRRenderStateInit with layers sequence (<a href="https://github.com/immersive-web/webxr/pull/999">GitHub #999</a>)</p> <li data-md> <p>Split input sources into primary/auxiliary (<a href="https://github.com/immersive-web/webxr/pull/929">GitHub #929</a>)</p> <li data-md> <p>Define squeeze events (<a href="https://github.com/immersive-web/webxr/pull/893">GitHub #893</a>)</p> </ul> <p>Changes:</p> <ul> <li data-md> <p>Primary views MUST always be active (<a href="https://github.com/immersive-web/webxr/pull/1105">GitHub #1105</a>)</p> <li data-md> <p>Correctly handle context loss in makeXRCompatible() (<a href="https://github.com/immersive-web/webxr/pull/1097">GitHub #1097</a>)</p> <li data-md> <p>Introduce concept of active view (<a href="https://github.com/immersive-web/webxr/pull/1096">GitHub #1096</a>)</p> <li data-md> <p>Fixup frame and viewport caching to be explicit (<a href="https://github.com/immersive-web/webxr/pull/1093">GitHub #1093</a>)</p> <li data-md> <p>Allow caching various objects (<a href="https://github.com/immersive-web/webxr/pull/1088">GitHub #1088</a>)</p> <li data-md> <p>Allow clamping framebufferScaleFactor (<a href="https://github.com/immersive-web/webxr/pull/1084">GitHub #1084</a>)</p> <li data-md> <p>Clarify threading nature of "ensure an immersive device is selected", deprecate xrCompatible (<a href="https://github.com/immersive-web/webxr/pull/1081">GitHub #1081</a>)</p> <li data-md> <p>Clarify some things about native origins (<a href="https://github.com/immersive-web/webxr/pull/1071">GitHub #1071</a>)</p> <li data-md> <p>Change document visibility check to be UA choice (<a href="https://github.com/immersive-web/webxr/pull/1067">GitHub #1067</a>)</p> <li data-md> <p>added \'check the layers state\' algorithm (<a href="https://github.com/immersive-web/webxr/pull/1064">GitHub #1064</a>)</p> <li data-md> <p>Various changes around null and emulated poses (<a href="https://github.com/immersive-web/webxr/pull/1058">GitHub #1058</a>)</p> <li data-md> <p>Mention correct input frame semantics on XRInputSource/frame (<a href="https://github.com/immersive-web/webxr/pull/1053">GitHub #1053</a>)</p> <li data-md> <p>Added validation for XRRigidTransform (<a href="https://github.com/immersive-web/webxr/pull/1043">GitHub #1043</a>)</p> <li data-md> <p>Minor change to when empty input profile arrays are appropriate. (<a href="https://github.com/immersive-web/webxr/pull/1037">GitHub #1037</a>)</p> <li data-md> <p>Allow trusted ui to use visible-blurred, cautioning against text input leakage (<a href="https://github.com/immersive-web/webxr/pull/1034">GitHub #1034</a>)</p> <li data-md> <p>Some clarifications about window.rAF() (<a href="https://github.com/immersive-web/webxr/pull/1033">GitHub #1033</a>)</p> <li data-md> <p>Cleanups on how we do tasks and promises (<a href="https://github.com/immersive-web/webxr/pull/1032">GitHub #1032</a>)</p> <li data-md> <p>Short circuit updateRenderState() if no render state is passed (<a href="https://github.com/immersive-web/webxr/pull/1031">GitHub #1031</a>)</p> <li data-md> <p>Removed use of responsible and active and focused documents (<a href="https://github.com/immersive-web/webxr/pull/1030">GitHub #1030</a>)</p> <li data-md> <p>Clarify situation around browsing contexts and realms in context isolation (<a href="https://github.com/immersive-web/webxr/pull/1029">GitHub #1029</a>)</p> <li data-md> <p>Explicitly specify that reset events work on offset spaces (<a href="https://github.com/immersive-web/webxr/pull/1024">GitHub #1024</a>)</p> <li data-md> <p>Made it explicit which realm each object gets created in (<a href="https://github.com/immersive-web/webxr/pull/1023">GitHub #1023</a>)</p> <li data-md> <p>Use current timestamp for rAF() callback arguments (<a href="https://github.com/immersive-web/webxr/pull/1015">GitHub #1015</a>)</p> <li data-md> <p>Session feature requests no longer need the session parameter (<a href="https://github.com/immersive-web/webxr/pull/1012">GitHub #1012</a>)</p> <li data-md> <p>Allow cancelling rAF callbacks from within rAF (<a href="https://github.com/immersive-web/webxr/pull/1005">GitHub #1005</a>)</p> <li data-md> <p>Mention that the opaque framebuffer holds a reference to a particular session (<a href="https://github.com/immersive-web/webxr/pull/1004">GitHub #1004</a>)</p> <li data-md> <p>Defer initial inputsourcechange event till after the promise resolves (<a href="https://github.com/immersive-web/webxr/pull/1002">GitHub #1002</a>)</p> <li data-md> <p>Documented the effects of the framebufferScaleFactor (<a href="https://github.com/immersive-web/webxr/pull/993">GitHub #993</a>)</p> <li data-md> <p>Allow depth&&stencil result if depth||stencil requested (<a href="https://github.com/immersive-web/webxr/pull/987">GitHub #987</a>)</p> <li data-md> <p>Allow more flexibility in what isSessionSupported returns (<a href="https://github.com/immersive-web/webxr/pull/986">GitHub #986</a>)</p> <li data-md> <p>Clarify when tracking/input data is exposed via inline devices (<a href="https://github.com/immersive-web/webxr/pull/985">GitHub #985</a>)</p> <li data-md> <p>Add common sense restrictions on viewport shape (<a href="https://github.com/immersive-web/webxr/pull/976">GitHub #976</a>)</p> <li data-md> <p>Specify that preserveDrawingBuffer has no power here (<a href="https://github.com/immersive-web/webxr/pull/975">GitHub #975</a>)</p> <li data-md> <p>Clarified the behavior of visiblityState for inline sessions (<a href="https://github.com/immersive-web/webxr/pull/974">GitHub #974</a>)</p> <li data-md> <p>Defining when an opaque framebuffer is considered dirty (<a href="https://github.com/immersive-web/webxr/pull/970">GitHub #970</a>)</p> <li data-md> <p>Potentially update the inline device when the device changes (<a href="https://github.com/immersive-web/webxr/pull/947">GitHub #947</a>)</p> <li data-md> <p>Clarify bounded reference space behavior (<a href="https://github.com/immersive-web/webxr/pull/938">GitHub #938</a>)</p> <li data-md> <p>Multiple fixes to XR compatibility algorithms (<a href="https://github.com/immersive-web/webxr/pull/921">GitHub #921</a>)</p> <li data-md> <p>Fill out section on trusted UI (<a href="https://github.com/immersive-web/webxr/pull/875">GitHub #875</a>)</p> <li data-md> <p>Better define how depthNear and depthFar are used (<a href="https://github.com/immersive-web/webxr/pull/888">GitHub #888</a>)</p> <li data-md> <p>Clarify that emulatedPosition is not true when the local-floor space is using an estimated height (<a href="https://github.com/immersive-web/webxr/pull/871">GitHub #871</a>)</p> </ul> <h3 class="no-num heading settled" id="changes-from-20190205"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2019/WD-webxr-20190205/">First Public Working Draft 5 Feburary 2019</a></span><a class="self-link" href="#changes-from-20190205"></a></h3> <p>New features:</p> <ul> <li data-md> <p>Added XRInputSource->profiles for list of input profile name (<a href="https://github.com/immersive-web/webxr/pull/695">GitHub #695</a>)</p> <li data-md> <p>Add none variant to XREye (<a href="https://github.com/immersive-web/webxr/pull/641">GitHub #641</a>)</p> <li data-md> <p>Add an explicit inline XR device (<a href="https://github.com/immersive-web/webxr/pull/737">GitHub #737</a>)</p> <li data-md> <p>Pose privacy considerations with data adjustments and protected functionality (<a href="https://github.com/immersive-web/webxr/pull/761">GitHub #761</a>)</p> <li data-md> <p>Reference space privacy considerations (<a href="https://github.com/immersive-web/webxr/pull/762">GitHub #762</a>)</p> <li data-md> <p>Define sensitive information and user intent (<a href="https://github.com/immersive-web/webxr/pull/757">GitHub #757</a>)</p> <li data-md> <p>Required and optional features (Feature dependencies) (<a href="https://github.com/immersive-web/webxr/pull/749">GitHub #749</a>)</p> <li data-md> <p>Tracking loss and tracking recovery (<a href="https://github.com/immersive-web/webxr/pull/559">GitHub #559</a>)</p> <li data-md> <p>Change blur/focus to visibilitychange (<a href="https://github.com/immersive-web/webxr/pull/687">GitHub #687</a>)</p> <li data-md> <p>Define event order of input sources (<a href="https://github.com/immersive-web/webxr/pull/629">GitHub #629</a>)</p> <li data-md> <p>Describe how the input source list is maintained (<a href="https://github.com/immersive-web/webxr/pull/628">GitHub #628</a>)</p> <li data-md> <p>Make origin offset immutable (<a href="https://github.com/immersive-web/webxr/pull/612">GitHub #612</a>)</p> <li data-md> <p>Add inlineVerticalFieldOfView to XRRenderState (<a href="https://github.com/immersive-web/webxr/pull/519">GitHub #519</a>)</p> <li data-md> <p>Document Gamepad integration (<a href="https://github.com/immersive-web/webxr/pull/553">GitHub #553</a>)</p> <li data-md> <p>Add ignoreDepthValues attribute to the XRWebGLLayer (<a href="https://github.com/immersive-web/webxr/pull/548">GitHub #548</a>)</p> <li data-md> <p>Added XRSpace XREnvironmentBlendMode.viewerSpace (<a href="https://github.com/immersive-web/webxr/pull/522">GitHub #522</a>)</p> <li data-md> <p>Added XRPose and related refactors to the spec (<a href="https://github.com/immersive-web/webxr/pull/496">GitHub #496</a>)</p> </ul> <p>Removed features:</p> <ul> <li data-md> <p>Changed canvas inline to single, drop XRPresentationContext (<a href="https://github.com/immersive-web/webxr/pull/656">GitHub #656</a>)</p> <li data-md> <p>Remove XRLayer base type (<a href="https://github.com/immersive-web/webxr/pull/688">GitHub #688</a>)</p> <li data-md> <p>Remove XRWebGLLayer.requestViewportScaling() (<a href="https://github.com/immersive-web/webxr/pull/631">GitHub #631</a>)</p> <li data-md> <p>Remove context Attribute from XRWebGLLayer (<a href="https://github.com/immersive-web/webxr/pull/707">GitHub #707</a>)</p> <li data-md> <p>Remove attribs that only reflect requested values (<a href="https://github.com/immersive-web/webxr/pull/574">GitHub #574</a>)</p> <li data-md> <p>Remove XRSessionCreationOptions (<a href="https://github.com/immersive-web/webxr/pull/566">GitHub #566</a>)</p> </ul> <p>Changes:</p> <ul> <li data-md> <p>Decribe the required clear behavior of an XRWebGLLayer (<a href="https://github.com/immersive-web/webxr/pull/866">GitHub #866</a>)</p> <li data-md> <p>Specified that XRWebGLLayer framebuffers always use premultiplied alpha (<a href="https://github.com/immersive-web/webxr/pull/840">GitHub #840</a>)</p> <li data-md> <p>Clarify the transform direction for the reset event (<a href="https://github.com/immersive-web/webxr/pull/843">GitHub #843</a>)</p> <li data-md> <p>Define how feature requirements are satisfied (<a href="https://github.com/immersive-web/webxr/pull/839">GitHub #839</a>)</p> <li data-md> <p>Check whether a session is inline rather than immersive when appropriate (<a href="https://github.com/immersive-web/webxr/pull/834">GitHub #834</a>)</p> <li data-md> <p>Disallow stereo inline sessions for now (<a href="https://github.com/immersive-web/webxr/pull/829">GitHub #829</a>)</p> <li data-md> <p>Handle detached buffers in projectionMatrix (<a href="https://github.com/immersive-web/webxr/pull/830">GitHub #830</a>)</p> <li data-md> <p>Ensure an immersive device is selected in makeXRCompatible() (<a href="https://github.com/immersive-web/webxr/pull/809">GitHub #809</a>)</p> <li data-md> <p>Change features to a sequence of \'any\' (<a href="https://github.com/immersive-web/webxr/pull/807">GitHub #807</a>)</p> <li data-md> <p>Link to \'fire an input source\' algorithm, explicitly construct frame (<a href="https://github.com/immersive-web/webxr/pull/797">GitHub #797</a>)</p> <li data-md> <p>Remove Environment blend mode from spec and explainer (<a href="https://github.com/immersive-web/webxr/pull/804">GitHub #804</a>)</p> <li data-md> <p>Provide descriptions for each method (<a href="https://github.com/immersive-web/webxr/pull/798">GitHub #798</a>)</p> <li data-md> <p>Require UAs to show manual device activation steps (<a href="https://github.com/immersive-web/webxr/pull/799">GitHub #799</a>)</p> <li data-md> <p>Clarify the compositor a bit (<a href="https://github.com/immersive-web/webxr/pull/805">GitHub #805</a>)</p> <li data-md> <p>Clarify matrix math for obtaining matrices for rigid transforms (<a href="https://github.com/immersive-web/webxr/pull/806">GitHub #806</a>)</p> <li data-md> <p>Allow UA to constrain clip planes (<a href="https://github.com/immersive-web/webxr/pull/802">GitHub #802</a>)</p> <li data-md> <p>Forbid using stale XRViews in getViewport() (<a href="https://github.com/immersive-web/webxr/pull/796">GitHub #796</a>)</p> <li data-md> <p>Explicitly mention how depth/alpha/stencil values get used (<a href="https://github.com/immersive-web/webxr/pull/800">GitHub #800</a>)</p> <li data-md> <p>Fire input source events when profiles changes (<a href="https://github.com/immersive-web/webxr/pull/795">GitHub #795</a>)</p> <li data-md> <p>Clarify when the reset event gets fired (<a href="https://github.com/immersive-web/webxr/pull/637">GitHub #637</a>)</p> <li data-md> <p>Explicitly spec out when requestReferenceSpace() can reject queries (<a href="https://github.com/immersive-web/webxr/pull/651">GitHub #651</a>)</p> <li data-md> <p>Make XRRay.matrix unique, add steps for obtaining it (<a href="https://github.com/immersive-web/webxr/pull/655">GitHub #655</a>)</p> <li data-md> <p>Use TAG recommendations for returning promises (<a href="https://github.com/immersive-web/webxr/pull/700">GitHub #700</a>)</p> <li data-md> <p>Move racy parts of requestSession() to the main thread (<a href="https://github.com/immersive-web/webxr/pull/706">GitHub #706</a>)</p> <li data-md> <p>Clarify that small overlay UIs are allowed in exclusive access (<a href="https://github.com/immersive-web/webxr/pull/709">GitHub #709</a>)</p> <li data-md> <p>Merge \'end the session\' with \'shut down the session\', clarify, add onend event (<a href="https://github.com/immersive-web/webxr/pull/710">GitHub #710</a>)</p> <li data-md> <p>Don’t check XR compat flag for inline sessions (<a href="https://github.com/immersive-web/webxr/pull/705">GitHub #705</a>)</p> <li data-md> <p>Validate position DOMPointInit (<a href="https://github.com/immersive-web/webxr/pull/568">GitHub #568</a>)</p> <li data-md> <p>Explicitly spec out native origins (<a href="https://github.com/immersive-web/webxr/pull/621">GitHub #621</a>)</p> <li data-md> <p>Remove buttonIndex (<a href="https://github.com/immersive-web/webxr/pull/741">GitHub #741</a>)</p> <li data-md> <p>Removes references to "immersive-ar" and XRRay (<a href="https://github.com/immersive-web/webxr/pull/784">GitHub #784</a>)</p> <li data-md> <p>Removes references to XRInputSource.gamepad from explainer and index.bs (<a href="https://github.com/immersive-web/webxr/pull/782">GitHub #782</a>)</p> <li data-md> <p>getViewport with an invalid view throws an error (<a href="https://github.com/immersive-web/webxr/pull/771">GitHub #771</a>)</p> <li data-md> <p>Block mid-session consent requests (<a href="https://github.com/immersive-web/webxr/pull/767">GitHub #767</a>)</p> <li data-md> <p>Spec XRPresentationContext creation (<a href="https://github.com/immersive-web/webxr/pull/501">GitHub #501</a>)</p> <li data-md> <p>Change inputSources getter from method to attrib (<a href="https://github.com/immersive-web/webxr/pull/624">GitHub #624</a>)</p> <li data-md> <p>Change required gamepad index to -1 (<a href="https://github.com/immersive-web/webxr/pull/690">GitHub #690</a>)</p> <li data-md> <p>Handle detached arrays (<a href="https://github.com/immersive-web/webxr/pull/684">GitHub #684</a>)</p> <li data-md> <p>Require that sensitive UI hides WebXR content (<a href="https://github.com/immersive-web/webxr/pull/742">GitHub #742</a>)</p> <li data-md> <p>Made the xr-standard gamepad mapping more rigid (<a href="https://github.com/immersive-web/webxr/pull/735">GitHub #735</a>)</p> <li data-md> <p>Fix algorithm to compute XRRay.matrix (<a href="https://github.com/immersive-web/webxr/pull/728">GitHub #728</a>)</p> <li data-md> <p>Fix detached array in XRRay.matrix algorithm (<a href="https://github.com/immersive-web/webxr/pull/716">GitHub #716</a>)</p> <li data-md> <p>Simplify handling of unsupported modes in requestSession() (<a href="https://github.com/immersive-web/webxr/pull/714">GitHub #714</a>)</p> <li data-md> <p>Some XRRenderState clarifications (<a href="https://github.com/immersive-web/webxr/pull/703">GitHub #703</a>)</p> <li data-md> <p>Replace \'list of pending render states\' with \'pending render state\' (<a href="https://github.com/immersive-web/webxr/pull/701">GitHub #701</a>)</p> <li data-md> <p>Better define gamepad placeholder buttons and axes (<a href="https://github.com/immersive-web/webxr/pull/661">GitHub #661</a>)</p> <li data-md> <p>Clarify what value a touchpad should report when not being touched (<a href="https://github.com/immersive-web/webxr/pull/660">GitHub #660</a>)</p> <li data-md> <p>Rename getPose arg referenceSpace->baseSpace (<a href="https://github.com/immersive-web/webxr/pull/659">GitHub #659</a>)</p> <li data-md> <p>Fix multiplication order for transforms (<a href="https://github.com/immersive-web/webxr/pull/649">GitHub #649</a>)</p> <li data-md> <p>Clarify assumptions for local and local-floor tracking (<a href="https://github.com/immersive-web/webxr/pull/648">GitHub #648</a>)</p> <li data-md> <p>Simplify available spaces (<a href="https://github.com/immersive-web/webxr/pull/626">GitHub #626</a>)</p> <li data-md> <p>requestSession: Check for user activation first (<a href="https://github.com/immersive-web/webxr/pull/685">GitHub #685</a>)</p> <li data-md> <p>Make boundsGeometry work relative to the effective origin (<a href="https://github.com/immersive-web/webxr/pull/613">GitHub #613</a>)</p> <li data-md> <p>Explicitly specify how the views array is populated (<a href="https://github.com/immersive-web/webxr/pull/614">GitHub #614</a>)</p> <li data-md> <p>Identify cases where the Gamepad id should be unknown (<a href="https://github.com/immersive-web/webxr/pull/615">GitHub #615</a>)</p> <li data-md> <p>Overhaul XRSpace, get(Viewer)Pose definitions (<a href="https://github.com/immersive-web/webxr/pull/609">GitHub #609</a>)</p> <li data-md> <p>Rename supportsSessionMode to supportsSession (<a href="https://github.com/immersive-web/webxr/pull/595">GitHub #595</a>)</p> <li data-md> <p>Consolidate reference space types and interfaces (<a href="https://github.com/immersive-web/webxr/pull/587">GitHub #587</a>)</p> <li data-md> <p>inverse attribute always returns the same object (<a href="https://github.com/immersive-web/webxr/pull/586">GitHub #586</a>)</p> <li data-md> <p>Reject outstanding promises on session shut down (<a href="https://github.com/immersive-web/webxr/pull/585">GitHub #585</a>)</p> <li data-md> <p>Specify that projection matrices may include shear (<a href="https://github.com/immersive-web/webxr/pull/575">GitHub #575</a>)</p> <li data-md> <p>Describe exceptions that updateRenderState may throw (<a href="https://github.com/immersive-web/webxr/pull/511">GitHub #511</a>)</p> <li data-md> <p>Edit requestSession() and Initialize the session (<a href="https://github.com/immersive-web/webxr/pull/601">GitHub #601</a>)</p> <li data-md> <p>Change XRRigidTransform inverse from a method to an attribute (<a href="https://github.com/immersive-web/webxr/pull/560">GitHub #560</a>)</p> <li data-md> <p>Indicate when compositing is using depth values (<a href="https://github.com/immersive-web/webxr/pull/563">GitHub #563</a>)</p> <li data-md> <p>Stationary subtype support is all-or-nothing (<a href="https://github.com/immersive-web/webxr/pull/537">GitHub #537</a>)</p> <li data-md> <p>Move outputContext to XRRenderState (<a href="https://github.com/immersive-web/webxr/pull/536">GitHub #536</a>)</p> <li data-md> <p>Specify that getViewerPose throws an error for non-rAF XRFrames (<a href="https://github.com/immersive-web/webxr/pull/535">GitHub #535</a>)</p> <li data-md> <p>Remove viewMatrix and add XRTransform.inverse() (<a href="https://github.com/immersive-web/webxr/pull/531">GitHub #531</a>)</p> <li data-md> <p>Changed XRHandedness enum to use \'none\' instead of \'\' (<a href="https://github.com/immersive-web/webxr/pull/526">GitHub #526</a>)</p> <li data-md> <p>Indicate the preferred ergonomics of a tracked-pointer ray (<a href="https://github.com/immersive-web/webxr/pull/524">GitHub #524</a>)</p> <li data-md> <p>Clarify XRRay constructor and define normalization (<a href="https://github.com/immersive-web/webxr/pull/521">GitHub #521</a>)</p> <li data-md> <p>Spec text for the identity reference space (<a href="https://github.com/immersive-web/webxr/pull/520">GitHub #520</a>)</p> <li data-md> <p>Clarified when immersive sessions are rejected (<a href="https://github.com/immersive-web/webxr/pull/360">GitHub #360</a>)</p> <li data-md> <p>Specify that frame callbacks are not called without a base layer (<a href="https://github.com/immersive-web/webxr/pull/512">GitHub #512</a>)</p> </ul> <h2 class="heading settled" data-level="15" id="ack"><span class="secno">15. </span><span class="content">Acknowledgements</span><a class="self-link" href="#ack"></a></h2> <p>Thank you to the following individuals for their contributions the WebXR Device API specification:</p> <ul> <li data-md> <p><a href="mailto:cvan@mozilla.com">Chris Van Wiemeersch</a> (<a href="https://mozilla.org/">Mozilla</a>)</p> <li data-md> <p><a href="mailto:kgilbert@mozilla.com">Kearwood Gilbert</a> (<a href="https://mozilla.org/">Mozilla</a>)</p> <li data-md> <p><a href="mailto:rafael.cintron@microsoft.com">Rafael Cintron</a> (<a href="https://microsoft.com/">Microsoft</a>)</p> <li data-md> <p><a href="mailto:sebastian.sylvan@gmail.com">Sebastian Sylvan</a> (Formerly <a href="https://microsoft.com/">Microsoft</a>)</p> <li data-md> <p><a href="mailto:alexturn@microsoft.com">Alex Turner</a> (<a href="https://microsoft.com/">Microsoft</a>)</p> <li data-md> <p><a href="mailto:laford@microsoft.com">Lachlan Ford</a> (<a href="https://microsoft.com/">Microsoft</a>)</p> <li data-md> <p><a href="mailto:blair@mozilla.com">Blair MacIntyre</a> (<a href="https://mozilla.org/">Mozilla</a>)</p> <li data-md> <p><a href="mailto:johnpallett@google.com">John Pallett</a> (<a href="https://www.google.com">Google</a>)</p> <li data-md> <p><a href="mailto:taoyagi@mozilla.com">Takahiro Aoyagi</a> (<a href="https://mozilla.org/">Mozilla</a>)</p> <li data-md> <p><a href="mailto:nb@8thwall.com">Nicholas Butko</a> (<a href="https://8thwall.com">8th Wall</a>)</p> <li data-md> <p><a href="mailto:artyom@fb.com">Artem Bolgar</a> (<a href="https://about.fb.com/company-info/">Facebook, Inc.</a>)</p> <li data-md> <p><a href="mailto:cwilso@google.com">Chris Wilson</a> (<a href="https://google.com/">Google</a>)</p> <li data-md> <p><a href="mailto:alanvartavrse.com">Alan Smithson</a> (<a href="https://MetaVRse.com">MetaVRse</a>)</p> <li data-md> <p><a href="mailto:jmarinacci@mozilla.com">Josh Marinacci</a> (<a href="https://mozilla.org/">Mozilla</a>)</p> <li data-md> <p><a href="mailto:loc@locdao.com">Loc Dao</a> (<a href="https://nfb.ca/interactive">National Film Board of Canada</a>)</p> <li data-md> <p><a href="mailto:ningxin.hu@intel.com">Ningxin Hu</a> (<a href="https://www.intel.com/">Intel</a>)</p> <li data-md> <p><a href="mailto:jared@plutovr.com">Jared Cheshier</a> (<a href="https://www.plutovr.com/">PlutoVR</a>)</p> <li data-md> <p><a href="mailto:thodgson@brainwaive.com">Tony Hodgson</a> (<a href="http://www.brainwaive.com">Brainwaive LLC</a>)</p> <li data-md> <p><a href="mailto:info@latorly.com">Christopher P. La Torres</a> (<a href="https://exokit.org">Exokit</a>)</p> <li data-md> <p><a href="mailto:alexis.menard@intel.com">Alexis Menard</a> (<a href="http://intel.com">Intel Corporation</a>)</p> <li data-md> <p><a href="mailto:klausw@google.com">Klaus Weidner</a> (<a href="https://google.com">Google</a>)</p> <li data-md> <p><a href="mailto:ajeffrey@mozilla.com">Alan Jeffrey</a> (<a href="https://mozilla.org/">Mozilla</a>)</p> <li data-md> <p><a href="mailto:dhosfelt@mozilla.com">Diane Hosfelt</a> (<a href="https://mozilla.org/">Mozilla</a>)</p> <li data-md> <p><a href="mailto:gminthe@gmail.com">Kyungsuk</a> (<a href="https://www.xandr.com/">AT&T Xandr</a>)</p> <li data-md> <p><a href="mailto:ddorwin@google.com">David Dorwin</a> (<a href="https://google.com">Google</a>)</p> <li data-md> <p><a href="mailto:trevor@transmutable.com">Trevor F. Smith</a> (<a href="https://transmutable.com/">Transmutable</a>)</p> <li data-md> <p><a href="mailto:ada.cannon@samsung.com">Ada Rose Cannon</a> (<a href="https://samsung.com">Samsung</a>)</p> <li data-md> <p><a href="mailto:mlamouri@google.com">Mounir Lamouri</a> (<a href="https://google.com">Google</a>)</p> <li data-md> <p><a href="mailto:stew@rtsmith.io">Stewart Smith</a> (<a href="https://moar.io">Moar Technologies Corp</a>)</p> <li data-md> <p><a href="mailto:web3d@realism.com">Leonard Daly</a> (<a href="https://realism.com">Daly Realism</a>)</p> </ul> <p>And a special thanks to <a href="mailto:vladv@unity3d.com">Vladimir Vukicevic</a> (<a href="https://unity3d.com/">Unity</a>) for kick-starting this whole adventure!</p> </main> <div data-fill-with="conformance"> <h2 class="no-ref no-num heading settled" id="w3c-conformance"><span class="content">Conformance</span><a class="self-link" href="#w3c-conformance"></a></h2> <h3 class="no-ref no-num heading settled" id="w3c-conventions"><span class="content">Document conventions</span><a class="self-link" href="#w3c-conventions"></a></h3> <p>Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification. </p> <p>All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119" title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</a> </p> <p>Examples in this specification are introduced with the words “for example” or are set apart from the normative text with <code>class="example"</code>, like this: </p> <div class="example" id="w3c-example"> <a class="self-link" href="#w3c-example"></a> <p>This is an example of an informative example. </p> </div> <p>Informative notes begin with the word “Note” and are set apart from the normative text with <code>class="note"</code>, like this: </p> <p class="note" role="note">Note, this is an informative note.</p> <section> <h3 class="no-ref no-num heading settled" id="w3c-conformant-algorithms"><span class="content">Conformant Algorithms</span><a class="self-link" href="#w3c-conformant-algorithms"></a></h3> <p>Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or "return false and abort these steps") are to be interpreted with the meaning of the key word ("must", "should", "may", etc) used in introducing the algorithm. </p> <p>Conformance requirements phrased as algorithms or specific steps can be implemented in any manner, so long as the end result is equivalent. In particular, the algorithms defined in this specification are intended to be easy to understand and are not intended to be performant. Implementers are encouraged to optimize. </p> </section> </div> <script src="https://www.w3.org/scripts/TR/2021/fixup.js"></script> <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2> <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3> <ul class="index"> <li><a href="#3dof">3DoF</a><span>, in § 1.1</span> <li><a href="#6dof">6DoF</a><span>, in § 1.1</span> <li> active <ul> <li><a href="#xrframe-active">dfn for XRFrame</a><span>, in § 5.1</span> <li><a href="#view-active">dfn for view</a><span>, in § 7.1</span> </ul> <li><a href="#active-immersive-session">active immersive session</a><span>, in § 3.2</span> <li><a href="#active-render-state">active render state</a><span>, in § 4.1</span> <li> added <ul> <li><a href="#dom-xrinputsourceschangeevent-added">attribute for XRInputSourcesChangeEvent</a><span>, in § 12.3</span> <li><a href="#dom-xrinputsourceschangeeventinit-added">dict-member for XRInputSourcesChangeEventInit</a><span>, in § 12.3</span> </ul> <li><a href="#xrsession-add-input-source">add input source</a><span>, in § 4.1</span> <li><a href="#dom-xrwebgllayerinit-alpha">alpha</a><span>, in § 11.2</span> <li><a href="#dom-xrpose-angularvelocity">angularVelocity</a><span>, in § 9.1</span> <li><a href="#xrsession-animation-frame">animation frame</a><span>, in § 4.1</span> <li><a href="#xrframe-animationframe">animationFrame</a><span>, in § 5.1</span> <li><a href="#animation-frame-callback-identifier">animation frame callback identifier</a><span>, in § 4.3</span> <li> antialias <ul> <li><a href="#dom-xrwebgllayer-antialias">attribute for XRWebGLLayer</a><span>, in § 11.2</span> <li><a href="#dom-xrwebgllayerinit-antialias">dict-member for XRWebGLLayerInit</a><span>, in § 11.2</span> </ul> <li><a href="#xrframe-apply-frame-updates">apply frame updates</a><span>, in § 5.1</span> <li><a href="#apply-the-nominal-frame-rate">apply the nominal frame rate</a><span>, in § 4.1</span> <li><a href="#apply-the-pending-render-state">apply the pending render state</a><span>, in § 4.1</span> <li><a href="#auxiliary-action">auxiliary action</a><span>, in § 10.2</span> <li> baseLayer <ul> <li><a href="#dom-xrrenderstate-baselayer">attribute for XRRenderState</a><span>, in § 4.2</span> <li><a href="#dom-xrrenderstateinit-baselayer">dict-member for XRRenderStateInit</a><span>, in § 4.2</span> </ul> <li><a href="#dom-xrreferencespacetype-bounded-floor">"bounded-floor"</a><span>, in § 6.2</span> <li><a href="#dom-xrreferencespacetype-bounded-floor">bounded-floor</a><span>, in § 6.2</span> <li><a href="#bounded-reference-spaces-are-supported">bounded reference spaces are supported</a><span>, in § 6.3</span> <li><a href="#dom-xrboundedreferencespace-boundsgeometry">boundsGeometry</a><span>, in § 6.3</span> <li><a href="#dom-xrsession-cancelanimationframe">cancelAnimationFrame(handle)</a><span>, in § 4.3</span> <li><a href="#xrframerequestcallback-cancelled">cancelled</a><span>, in § 4.3</span> <li><a href="#capable-of-supporting">capable of supporting</a><span>, in § 3.4</span> <li><a href="#xrsession-change-input-source">change input source</a><span>, in § 4.1</span> <li><a href="#check-the-layers-state">check the layers state</a><span>, in § 4.3</span> <li><a href="#compatible-graphics-adapter">compatible graphics adapter</a><span>, in § 11.3</span> <li> composition enabled <ul> <li><a href="#xrrenderstate-composition-enabled">dfn for XRRenderState</a><span>, in § 4.2</span> <li><a href="#xrwebgllayer-composition-enabled">dfn for XRWebGLLayer</a><span>, in § 11.2</span> </ul> <li><a href="#xrpose-computed-offset">computed offset</a><span>, in § 9.1</span> <li><a href="#dom-xrrigidtransform-xrrigidtransform">constructor()</a><span>, in § 8.3</span> <li><a href="#dom-xrrigidtransform-xrrigidtransform">constructor(position)</a><span>, in § 8.3</span> <li><a href="#dom-xrrigidtransform-xrrigidtransform">constructor(position, orientation)</a><span>, in § 8.3</span> <li><a href="#dom-xrwebgllayer-xrwebgllayer">constructor(session, context)</a><span>, in § 11.2</span> <li><a href="#dom-xrwebgllayer-xrwebgllayer">constructor(session, context, layerInit)</a><span>, in § 11.2</span> <li> constructor(type, eventInitDict) <ul> <li><a href="#dom-xrinputsourceevent-xrinputsourceevent">constructor for XRInputSourceEvent</a><span>, in § 12.2</span> <li><a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent">constructor for XRInputSourcesChangeEvent</a><span>, in § 12.3</span> <li><a href="#dom-xrreferencespaceevent-xrreferencespaceevent">constructor for XRReferenceSpaceEvent</a><span>, in § 12.4</span> <li><a href="#dom-xrsessionevent-xrsessionevent">constructor for XRSessionEvent</a><span>, in § 12.1</span> </ul> <li> context <ul> <li><a href="#dom-xrwebgllayer-context">attribute for XRWebGLLayer</a><span>, in § 11.2</span> <li><a href="#xrwebgllayer-context">dfn for XRWebGLLayer</a><span>, in § 11.2</span> </ul> <li><a href="#xrspace-coordinate-system">coordinate system</a><span>, in § 6.1</span> <li><a href="#create-a-reference-space">create a reference space</a><span>, in § 6.2</span> <li><a href="#view-current-viewport-scale">current viewport scale</a><span>, in § 7.1</span> <li><a href="#data-adjustment">data adjustment</a><span>, in § 13.4</span> <li><a href="#default-features">default features</a><span>, in § 3.4</span> <li><a href="#default-inline-xr-device">default inline XR device</a><span>, in § 2.1</span> <li><a href="#dom-xrwebgllayerinit-depth">depth</a><span>, in § 11.2</span> <li> depthFar <ul> <li><a href="#dom-xrrenderstate-depthfar">attribute for XRRenderState</a><span>, in § 4.2</span> <li><a href="#dom-xrrenderstateinit-depthfar">dict-member for XRRenderStateInit</a><span>, in § 4.2</span> </ul> <li> depthNear <ul> <li><a href="#dom-xrrenderstate-depthnear">attribute for XRRenderState</a><span>, in § 4.2</span> <li><a href="#dom-xrrenderstateinit-depthnear">dict-member for XRRenderStateInit</a><span>, in § 4.2</span> </ul> <li><a href="#eventdef-xrsystem-devicechange">devicechange</a><span>, in § 12.5</span> <li><a href="#display-frame-rate">display frame rate</a><span>, in § 4.1</span> <li><a href="#effective-frame-rate">effective frame rate</a><span>, in § 4.1</span> <li><a href="#xrspace-effective-origin">effective origin</a><span>, in § 6.1</span> <li><a href="#dom-xrpose-emulatedposition">emulatedPosition</a><span>, in § 9.1</span> <li><a href="#dom-xrsession-enabledfeatures">enabledFeatures</a><span>, in § 4.1</span> <li><a href="#eventdef-xrsession-end">end</a><span>, in § 12.5</span> <li><a href="#dom-xrsession-end">end()</a><span>, in § 4.1</span> <li><a href="#ended">ended</a><span>, in § 4.1</span> <li><a href="#ensure-an-immersive-xr-device-is-selected">ensure an immersive XR device is selected</a><span>, in § 3.2</span> <li><a href="#enumerate-immersive-xr-devices">enumerate immersive XR devices</a><span>, in § 3.2</span> <li><a href="#estimated-floor-level">estimated floor level</a><span>, in § 6.2</span> <li><a href="#exclusive-access">exclusive access</a><span>, in § 3.3</span> <li><a href="#explicit-consent">Explicit consent</a><span>, in § 13.2.3</span> <li> eye <ul> <li><a href="#dom-xrview-eye">attribute for XRView</a><span>, in § 7.1</span> <li><a href="#view-eye">dfn for view</a><span>, in § 7.1</span> </ul> <li><a href="#feature-descriptor">feature descriptor</a><span>, in § 3.4</span> <li><a href="#feature-requirements">feature requirements</a><span>, in § 3.4</span> <li><a href="#fire-an-input-source-event">fire an input source event</a><span>, in § 12.2</span> <li><a href="#dom-xrwebgllayer-fixedfoveation">fixedFoveation</a><span>, in § 11.2</span> <li> frame <ul> <li><a href="#dom-xrinputsourceevent-frame">attribute for XRInputSourceEvent</a><span>, in § 12.2</span> <li><a href="#xrview-frame">dfn for XRView</a><span>, in § 7.1</span> <li><a href="#dom-xrinputsourceeventinit-frame">dict-member for XRInputSourceEventInit</a><span>, in § 12.2</span> </ul> <li><a href="#dom-xrwebgllayer-framebuffer">framebuffer</a><span>, in § 11.2</span> <li><a href="#dom-xrwebgllayer-framebufferheight">framebufferHeight</a><span>, in § 11.2</span> <li><a href="#dom-xrwebgllayerinit-framebufferscalefactor">framebufferScaleFactor</a><span>, in § 11.2</span> <li><a href="#dom-xrwebgllayer-framebufferwidth">framebufferWidth</a><span>, in § 11.2</span> <li><a href="#dom-xrsession-framerate">frameRate</a><span>, in § 4.1</span> <li><a href="#eventdef-xrsession-frameratechange">frameratechange</a><span>, in § 12.5</span> <li><a href="#frame-update">frame update</a><span>, in § 5.1</span> <li><a href="#dom-xrtargetraymode-gaze">"gaze"</a><span>, in § 10.1</span> <li><a href="#dom-xrtargetraymode-gaze">gaze</a><span>, in § 10.1</span> <li><a href="#dom-xrwebgllayer-getnativeframebufferscalefactor">getNativeFramebufferScaleFactor(session)</a><span>, in § 11.2</span> <li><a href="#dom-xrreferencespace-getoffsetreferencespace">getOffsetReferenceSpace(originOffset)</a><span>, in § 6.2</span> <li><a href="#dom-xrframe-getpose">getPose(space, baseSpace)</a><span>, in § 5.1</span> <li><a href="#dom-xrframe-getviewerpose">getViewerPose(referenceSpace)</a><span>, in § 5.1</span> <li><a href="#dom-xrwebgllayer-getviewport">getViewport(view)</a><span>, in § 11.2</span> <li><a href="#dom-xrpermissionstatus-granted">granted</a><span>, in § 14.2</span> <li><a href="#dom-xrinputsource-gripspace">gripSpace</a><span>, in § 10.1</span> <li><a href="#dom-xrinputsource-handedness">handedness</a><span>, in § 10.1</span> <li><a href="#dom-xrviewport-height">height</a><span>, in § 7.3</span> <li><a href="#dom-xrvisibilitystate-hidden">"hidden"</a><span>, in § 4.1</span> <li><a href="#dom-xrvisibilitystate-hidden">hidden</a><span>, in § 4.1</span> <li><a href="#identity-transform">identity transform</a><span>, in § 8.3</span> <li> ignoreDepthValues <ul> <li><a href="#dom-xrwebgllayer-ignoredepthvalues">attribute for XRWebGLLayer</a><span>, in § 11.2</span> <li><a href="#dom-xrwebgllayerinit-ignoredepthvalues">dict-member for XRWebGLLayerInit</a><span>, in § 11.2</span> </ul> <li><a href="#dom-xrsessionmode-immersive-ar">"immersive-ar"</a><span>, in § 3.3</span> <li><a href="#dom-xrsessionmode-immersive-ar">immersive-ar</a><span>, in § 3.3</span> <li><a href="#immersive-session">immersive session</a><span>, in § 3.3</span> <li><a href="#immersive-session-request-is-allowed">immersive session request is allowed</a><span>, in § 13.5.1</span> <li><a href="#dom-xrsessionmode-immersive-vr">"immersive-vr"</a><span>, in § 3.3</span> <li><a href="#dom-xrsessionmode-immersive-vr">immersive-vr</a><span>, in § 3.3</span> <li><a href="#immersive-xr-device">immersive XR device</a><span>, in § 2.1</span> <li><a href="#implicit-consent">Implicit consent</a><span>, in § 13.2.3</span> <li><a href="#xrinputsourcearray-indexed-property-getter">indexed property getter</a><span>, in § 10.3</span> <li><a href="#indistinguishable-by-user-agent-string">indistinguishable by user agent string</a><span>, in § 13.8.2</span> <li><a href="#initialize-the-render-state">initialize the render state</a><span>, in § 4.2</span> <li><a href="#initialize-the-session">initialize the session</a><span>, in § 4.1</span> <li><a href="#dom-xrsessionmode-inline">"inline"</a><span>, in § 3.3</span> <li><a href="#dom-xrsessionmode-inline">inline</a><span>, in § 3.3</span> <li><a href="#inline-session">inline session</a><span>, in § 3.3</span> <li><a href="#inline-session-request-is-allowed">inline session request is allowed</a><span>, in § 13.5.1</span> <li> inlineVerticalFieldOfView <ul> <li><a href="#dom-xrrenderstate-inlineverticalfieldofview">attribute for XRRenderState</a><span>, in § 4.2</span> <li><a href="#dom-xrrenderstateinit-inlineverticalfieldofview">dict-member for XRRenderStateInit</a><span>, in § 4.2</span> </ul> <li><a href="#inline-xr-device">inline XR device</a><span>, in § 2.1</span> <li><a href="#xrinputsource-input-profile-name">input profile name</a><span>, in § 10.1</span> <li> inputSource <ul> <li><a href="#dom-xrinputsourceevent-inputsource">attribute for XRInputSourceEvent</a><span>, in § 12.2</span> <li><a href="#dom-xrinputsourceeventinit-inputsource">dict-member for XRInputSourceEventInit</a><span>, in § 12.2</span> </ul> <li><a href="#dom-xrsession-inputsources">inputSources</a><span>, in § 4.1</span> <li><a href="#eventdef-xrsession-inputsourceschange">inputsourceschange</a><span>, in § 12.5</span> <li><a href="#xrrigidtransform-internal-matrix">internal matrix</a><span>, in § 8.3</span> <li><a href="#xrsession-internal-nominal-framerate">internal nominal frameRate</a><span>, in § 4.1</span> <li><a href="#xrview-internal-projection-matrix">internal projection matrix</a><span>, in § 7.1</span> <li><a href="#xrsession-internal-target-framerate">internal target frameRate</a><span>, in § 4.1</span> <li><a href="#dom-xrrigidtransform-inverse">inverse</a><span>, in § 8.3</span> <li><a href="#dom-xrsystem-issessionsupported">isSessionSupported(mode)</a><span>, in § 3.2</span> <li><a href="#dom-xrsession-issystemkeyboardsupported">isSystemKeyboardSupported</a><span>, in § 4.1</span> <li><a href="#launching-a-web-application">launching a web application</a><span>, in § 13.2.2</span> <li><a href="#dom-xrrenderstateinit-layers">layers</a><span>, in § 4.2</span> <li> "left" <ul> <li><a href="#dom-xreye-left">enum-value for XREye</a><span>, in § 7.1</span> <li><a href="#dom-xrhandedness-left">enum-value for XRHandedness</a><span>, in § 10.1</span> </ul> <li><a href="#dom-xrinputsourcearray-length">length</a><span>, in § 10.3</span> <li><a href="#limiting">Limiting</a><span>, in § 13.4.3</span> <li><a href="#dom-xrpose-linearvelocity">linearVelocity</a><span>, in § 9.1</span> <li><a href="#list-of-active-xr-input-sources">list of active XR input sources</a><span>, in § 4.1</span> <li><a href="#list-of-active-xr-tracked-sources">list of active XR tracked sources</a><span>, in § 4.1</span> <li><a href="#list-of-animation-frame-callbacks">list of animation frame callbacks</a><span>, in § 4.3</span> <li><a href="#list-of-currently-running-animation-frame-callbacks">list of currently running animation frame callbacks</a><span>, in § 4.3</span> <li><a href="#xrsession-list-of-frame-updates">list of frame updates</a><span>, in § 5.1</span> <li><a href="#list-of-full-sized-viewports">list of full-sized viewports</a><span>, in § 11.2</span> <li><a href="#list-of-immersive-xr-devices">list of immersive XR devices</a><span>, in § 2.1</span> <li><a href="#list-of-inline-sessions">list of inline sessions</a><span>, in § 3.2</span> <li><a href="#list-of-supported-modes">list of supported modes</a><span>, in § 2.1</span> <li><a href="#list-of-viewport-objects">list of viewport objects</a><span>, in § 11.2</span> <li><a href="#xrsession-list-of-views">list of views</a><span>, in § 4.1</span> <li><a href="#dom-xrreferencespacetype-local">"local"</a><span>, in § 6.2</span> <li><a href="#dom-xrreferencespacetype-local">local</a><span>, in § 6.2</span> <li><a href="#dom-xrreferencespacetype-local-floor">"local-floor"</a><span>, in § 6.2</span> <li><a href="#dom-xrreferencespacetype-local-floor">local-floor</a><span>, in § 6.2</span> <li><a href="#dom-webglrenderingcontextbase-makexrcompatible">makeXRCompatible()</a><span>, in § 11.3</span> <li> matrix <ul> <li><a href="#dom-xrrigidtransform-matrix">attribute for XRRigidTransform</a><span>, in § 8.3</span> <li><a href="#matrix">definition of</a><span>, in § 8.1</span> </ul> <li><a href="#maximum-far-clip-plane">maximum far clip plane</a><span>, in § 4.1</span> <li><a href="#maximum-inline-field-of-view">maximum inline field of view</a><span>, in § 4.1</span> <li><a href="#minimum-inline-field-of-view">minimum inline field of view</a><span>, in § 4.1</span> <li><a href="#minimum-near-clip-plane">minimum near clip plane</a><span>, in § 4.1</span> <li> mode <ul> <li><a href="#xrsession-mode">dfn for XRSession</a><span>, in § 4.1</span> <li><a href="#dom-xrpermissiondescriptor-mode">dict-member for XRPermissionDescriptor</a><span>, in § 14.2</span> <li><a href="#dom-xrsessionsupportedpermissiondescriptor-mode">dict-member for XRSessionSupportedPermissionDescriptor</a><span>, in § 13.8.1</span> </ul> <li><a href="#multiply-transforms">multiply transforms</a><span>, in § 8.3</span> <li><a href="#xrboundedreferencespace-native-bounds-geometry">native bounds geometry</a><span>, in § 6.3</span> <li><a href="#xrspace-native-origin">native origin</a><span>, in § 6.1</span> <li><a href="#native-webgl-framebuffer-resolution">native WebGL framebuffer resolution</a><span>, in § 11.2</span> <li><a href="#never-support">never support</a><span>, in § 13.8.2</span> <li><a href="#nominal-frame-rate">nominal frame rate</a><span>, in § 4.1</span> <li> "none" <ul> <li><a href="#dom-xreye-none">enum-value for XREye</a><span>, in § 7.1</span> <li><a href="#dom-xrhandedness-none">enum-value for XRHandedness</a><span>, in § 10.1</span> </ul> <li><a href="#normalize">normalize</a><span>, in § 8.2</span> <li><a href="#xrview-obtain-a-scaled-viewport">obtain a scaled viewport</a><span>, in § 7.1</span> <li><a href="#obtain-the-current-device">obtain the current device</a><span>, in § 3.2</span> <li><a href="#xrrigidtransform-obtain-the-matrix">obtain the matrix</a><span>, in § 8.3</span> <li><a href="#xrview-obtain-the-projection-matrix">obtain the projection matrix</a><span>, in § 7.1</span> <li><a href="#dom-xrsystem-ondevicechange">ondevicechange</a><span>, in § 3.2</span> <li><a href="#dom-xrsession-onend">onend</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-onframeratechange">onframeratechange</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-oninputsourceschange">oninputsourceschange</a><span>, in § 4.1</span> <li><a href="#dom-xrreferencespace-onreset">onreset</a><span>, in § 6.2</span> <li><a href="#dom-xrsession-onselect">onselect</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-onselectend">onselectend</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-onselectstart">onselectstart</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-onsqueeze">onsqueeze</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-onsqueezeend">onsqueezeend</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-onsqueezestart">onsqueezestart</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-onvisibilitychange">onvisibilitychange</a><span>, in § 4.1</span> <li><a href="#opaque-framebuffer">opaque framebuffer</a><span>, in § 11.2</span> <li><a href="#optional-features">Optional features</a><span>, in § 3.4</span> <li> optionalFeatures <ul> <li><a href="#dom-xrpermissiondescriptor-optionalfeatures">dict-member for XRPermissionDescriptor</a><span>, in § 14.2</span> <li><a href="#dom-xrsessioninit-optionalfeatures">dict-member for XRSessionInit</a><span>, in § 3.4</span> </ul> <li><a href="#dom-xrrigidtransform-orientation">orientation</a><span>, in § 8.3</span> <li><a href="#xrspace-origin-offset">origin offset</a><span>, in § 6.1</span> <li><a href="#xrrenderstate-output-canvas">output canvas</a><span>, in § 4.2</span> <li><a href="#pending-immersive-session">pending immersive session</a><span>, in § 3.2</span> <li><a href="#pending-render-state">pending render state</a><span>, in § 4.1</span> <li><a href="#populate-the-pose">populate the pose</a><span>, in § 6.1</span> <li><a href="#poses-may-be-reported">poses may be reported</a><span>, in § 13.5.2</span> <li><a href="#poses-must-be-limited">poses must be limited</a><span>, in § 13.5.3</span> <li><a href="#dom-xrrigidtransform-position">position</a><span>, in § 8.3</span> <li><a href="#dom-xrframe-predicteddisplaytime">predictedDisplayTime</a><span>, in § 5.1</span> <li><a href="#primary-action">primary action</a><span>, in § 10.1</span> <li><a href="#primary-input-source">primary input source</a><span>, in § 10.1</span> <li><a href="#primary-squeeze-action">primary squeeze action</a><span>, in § 10.1</span> <li><a href="#primary-view">primary view</a><span>, in § 7.2</span> <li><a href="#dom-xrinputsource-profiles">profiles</a><span>, in § 10.1</span> <li><a href="#view-projection-matrix">projection matrix</a><span>, in § 7.1</span> <li><a href="#dom-xrview-projectionmatrix">projectionMatrix</a><span>, in § 7.1</span> <li><a href="#xrsession-promise-resolved">promise resolved</a><span>, in § 4.1</span> <li><a href="#quantization">Quantization</a><span>, in § 13.4.2</span> <li><a href="#dom-xrview-recommendedviewportscale">recommendedViewportScale</a><span>, in § 7.1</span> <li><a href="#recommended-webgl-framebuffer-resolution">recommended WebGL framebuffer resolution</a><span>, in § 11.2</span> <li> referenceSpace <ul> <li><a href="#dom-xrreferencespaceevent-referencespace">attribute for XRReferenceSpaceEvent</a><span>, in § 12.4</span> <li><a href="#dom-xrreferencespaceeventinit-referencespace">dict-member for XRReferenceSpaceEventInit</a><span>, in § 12.4</span> </ul> <li><a href="#reference-space-is-supported">reference space is supported</a><span>, in § 6.2</span> <li> removed <ul> <li><a href="#dom-xrinputsourceschangeevent-removed">attribute for XRInputSourcesChangeEvent</a><span>, in § 12.3</span> <li><a href="#dom-xrinputsourceschangeeventinit-removed">dict-member for XRInputSourcesChangeEventInit</a><span>, in § 12.3</span> </ul> <li><a href="#xrsession-remove-input-source">remove input source</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-renderstate">renderState</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-requestanimationframe">requestAnimationFrame(callback)</a><span>, in § 4.3</span> <li><a href="#requested-features">requested features</a><span>, in § 3.4</span> <li><a href="#view-requested-viewport-scale">requested viewport scale</a><span>, in § 7.1</span> <li><a href="#dom-xrsession-requestreferencespace">requestReferenceSpace(type)</a><span>, in § 4.1</span> <li><a href="#dom-xrsystem-requestsession">requestSession(mode)</a><span>, in § 3.2</span> <li><a href="#dom-xrsystem-requestsession">requestSession(mode, options)</a><span>, in § 3.2</span> <li><a href="#request-the-xr-permission">request the xr permission</a><span>, in § 14.2</span> <li><a href="#dom-xrview-requestviewportscale">requestViewportScale(scale)</a><span>, in § 7.1</span> <li><a href="#required-features">required features</a><span>, in § 3.4</span> <li> requiredFeatures <ul> <li><a href="#dom-xrpermissiondescriptor-requiredfeatures">dict-member for XRPermissionDescriptor</a><span>, in § 14.2</span> <li><a href="#dom-xrsessioninit-requiredfeatures">dict-member for XRSessionInit</a><span>, in § 3.4</span> </ul> <li><a href="#eventdef-xrreferencespace-reset">reset</a><span>, in § 12.5</span> <li><a href="#resolve-the-requested-features">resolve the requested features</a><span>, in § 14.2</span> <li> "right" <ul> <li><a href="#dom-xreye-right">enum-value for XREye</a><span>, in § 7.1</span> <li><a href="#dom-xrhandedness-right">enum-value for XRHandedness</a><span>, in § 10.1</span> </ul> <li><a href="#rounding">Rounding</a><span>, in § 13.4.2</span> <li><a href="#dom-xrtargetraymode-screen">"screen"</a><span>, in § 10.1</span> <li><a href="#dom-xrtargetraymode-screen">screen</a><span>, in § 10.1</span> <li><a href="#secondary-view">secondary view</a><span>, in § 7.2</span> <li><a href="#secondary-view-secondary-views">secondary-views</a><span>, in § 7.2</span> <li><a href="#eventdef-xrsession-select">select</a><span>, in § 12.5</span> <li><a href="#select-an-immersive-xr-device">select an immersive XR device</a><span>, in § 3.2</span> <li><a href="#eventdef-xrsession-selectend">selectend</a><span>, in § 12.5</span> <li><a href="#eventdef-xrsession-selectstart">selectstart</a><span>, in § 12.5</span> <li><a href="#sensitive-information">sensitive information</a><span>, in § 13.1</span> <li> session <ul> <li><a href="#dom-xrframe-session">attribute for XRFrame</a><span>, in § 5.1</span> <li><a href="#dom-xrinputsourceschangeevent-session">attribute for XRInputSourcesChangeEvent</a><span>, in § 12.3</span> <li><a href="#dom-xrsessionevent-session">attribute for XRSessionEvent</a><span>, in § 12.1</span> <li><a href="#xrspace-session">dfn for XRSpace</a><span>, in § 6.1</span> <li><a href="#xrview-session">dfn for XRView</a><span>, in § 7.1</span> <li><a href="#xrwebgllayer-session">dfn for XRWebGLLayer</a><span>, in § 11.2</span> <li><a href="#opaque-framebuffer-session">dfn for opaque framebuffer</a><span>, in § 11.2</span> <li><a href="#dom-xrinputsourceschangeeventinit-session">dict-member for XRInputSourcesChangeEventInit</a><span>, in § 12.3</span> <li><a href="#dom-xrsessioneventinit-session">dict-member for XRSessionEventInit</a><span>, in § 12.1</span> </ul> <li> set of granted features <ul> <li><a href="#xr-device-set-of-granted-features">dfn for XR device</a><span>, in § 2.1</span> <li><a href="#xrsession-set-of-granted-features">dfn for XRSession</a><span>, in § 4.1</span> </ul> <li><a href="#should-be-rendered">should be rendered</a><span>, in § 4.3</span> <li><a href="#should-not-initialize-device-tracking">SHOULD NOT initialize device tracking</a><span>, in § 4.1</span> <li><a href="#shut-down-the-session">shut down the session</a><span>, in § 4.1</span> <li><a href="#dom-xrinputsource-skiprendering">skipRendering</a><span>, in § 10.1</span> <li><a href="#eventdef-xrsession-squeeze">squeeze</a><span>, in § 12.5</span> <li><a href="#eventdef-xrsession-squeezeend">squeezeend</a><span>, in § 12.5</span> <li><a href="#eventdef-xrsession-squeezestart">squeezestart</a><span>, in § 12.5</span> <li><a href="#dom-xrwebgllayerinit-stencil">stencil</a><span>, in § 11.2</span> <li><a href="#dom-xrsession-supportedframerates">supportedFrameRates</a><span>, in § 4.1</span> <li><a href="#xrwebgllayer-target-framebuffer">target framebuffer</a><span>, in § 11.2</span> <li><a href="#target-frame-rate">target frame rate</a><span>, in § 4.1</span> <li><a href="#dom-xrinputsource-targetraymode">targetRayMode</a><span>, in § 10.1</span> <li><a href="#dom-xrinputsource-targetrayspace">targetRaySpace</a><span>, in § 10.1</span> <li><a href="#throttling">Throttling</a><span>, in § 13.4.1</span> <li><a href="#xrframe-time">time</a><span>, in § 5.1</span> <li><a href="#tracked-input-source">tracked input source</a><span>, in § 10.1</span> <li><a href="#dom-xrtargetraymode-tracked-pointer">"tracked-pointer"</a><span>, in § 10.1</span> <li><a href="#dom-xrtargetraymode-tracked-pointer">tracked-pointer</a><span>, in § 10.1</span> <li><a href="#dom-xrsession-trackedsources">trackedSources</a><span>, in § 4.1</span> <li><a href="#eventdef-xrsession-trackedsourceschange">trackedsourceschange</a><span>, in § 12.5</span> <li> transform <ul> <li><a href="#dom-xrpose-transform">attribute for XRPose</a><span>, in § 9.1</span> <li><a href="#dom-xrreferencespaceevent-transform">attribute for XRReferenceSpaceEvent</a><span>, in § 12.4</span> <li><a href="#dom-xrview-transform">attribute for XRView</a><span>, in § 7.1</span> <li><a href="#dom-xrreferencespaceeventinit-transform">dict-member for XRReferenceSpaceEventInit</a><span>, in § 12.4</span> </ul> <li><a href="#transient-action">transient action</a><span>, in § 10.2</span> <li><a href="#transient-input-sources">transient input sources</a><span>, in § 10.2</span> <li><a href="#dom-xrtargetraymode-transient-pointer">"transient-pointer"</a><span>, in § 10.1</span> <li><a href="#dom-xrtargetraymode-transient-pointer">transient-pointer</a><span>, in § 10.1</span> <li><a href="#trusted-immersive-ui">trusted immersive UI</a><span>, in § 13.6</span> <li><a href="#trusted-ui">Trusted UI</a><span>, in § 13.6</span> <li><a href="#xrreferencespace-type">type</a><span>, in § 6.2</span> <li><a href="#dom-xrreferencespacetype-unbounded">"unbounded"</a><span>, in § 6.2</span> <li><a href="#dom-xrreferencespacetype-unbounded">unbounded</a><span>, in § 6.2</span> <li><a href="#xrview-underlying-view">underlying view</a><span>, in § 7.1</span> <li><a href="#dom-xrsession-updaterenderstate">updateRenderState()</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-updaterenderstate">updateRenderState(newState)</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-updaterenderstate">updateRenderState(state)</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-updatetargetframerate">updateTargetFrameRate(rate)</a><span>, in § 4.1</span> <li><a href="#update-the-pending-layers-state">update the pending layers state</a><span>, in § 4.1</span> <li><a href="#update-the-viewports">update the viewports</a><span>, in § 7.1</span> <li><a href="#user-intent">User intent</a><span>, in § 13.2</span> <li><a href="#usually-support">usually support</a><span>, in § 13.8.2</span> <li><a href="#view">view</a><span>, in § 7.1</span> <li><a href="#dom-xrreferencespacetype-viewer">"viewer"</a><span>, in § 6.2</span> <li> viewer <ul> <li><a href="#viewer">definition of</a><span>, in § 9.2</span> <li><a href="#dom-xrreferencespacetype-viewer">enum-value for XRReferenceSpaceType</a><span>, in § 6.2</span> </ul> <li><a href="#xrsession-viewer-reference-space">viewer reference space</a><span>, in § 4.1</span> <li><a href="#view-offset">view offset</a><span>, in § 7.1</span> <li><a href="#view-viewport-modifiable">viewport modifiable</a><span>, in § 7.1</span> <li><a href="#dom-xrviewerpose-views">views</a><span>, in § 9.2</span> <li><a href="#eventdef-xrsession-visibilitychange">visibilitychange</a><span>, in § 12.5</span> <li><a href="#xrsession-visibility-state">visibility state</a><span>, in § 4.1</span> <li><a href="#dom-xrsession-visibilitystate">visibilityState</a><span>, in § 4.1</span> <li><a href="#dom-xrvisibilitystate-visible">"visible"</a><span>, in § 4.1</span> <li><a href="#dom-xrvisibilitystate-visible">visible</a><span>, in § 4.1</span> <li><a href="#dom-xrvisibilitystate-visible-blurred">"visible-blurred"</a><span>, in § 4.1</span> <li><a href="#dom-xrvisibilitystate-visible-blurred">visible-blurred</a><span>, in § 4.1</span> <li><a href="#dom-xrviewport-width">width</a><span>, in § 7.3</span> <li><a href="#dom-xrviewport-x">x</a><span>, in § 7.3</span> <li><a href="#permissiondef-xr">"xr"</a><span>, in § 14.2</span> <li><a href="#dom-navigator-xr">xr</a><span>, in § 3.1</span> <li><a href="#xr-animation-frame">XR animation frame</a><span>, in § 4.3</span> <li><a href="#xrboundedreferencespace">XRBoundedReferenceSpace</a><span>, in § 6.3</span> <li><a href="#xr-compatible">XR compatible</a><span>, in § 11.3</span> <li><a href="#dom-webglcontextattributes-xrcompatible">xrCompatible</a><span>, in § 11.3</span> <li><a href="#xr-compositor">XR Compositor</a><span>, in § 4.4</span> <li> XR device <ul> <li><a href="#xr-device">dfn for </a><span>, in § 2.1</span> <li><a href="#xrsession-xr-device">dfn for XRSession</a><span>, in § 4.1</span> </ul> <li><a href="#enumdef-xreye">XREye</a><span>, in § 7.1</span> <li><a href="#xrframe">XRFrame</a><span>, in § 5.1</span> <li><a href="#callbackdef-xrframerequestcallback">XRFrameRequestCallback</a><span>, in § 4.3</span> <li><a href="#enumdef-xrhandedness">XRHandedness</a><span>, in § 10.1</span> <li><a href="#xr-input-source">XR input source</a><span>, in § 10.1</span> <li><a href="#xrinputsource">XRInputSource</a><span>, in § 10.1</span> <li><a href="#xrinputsourcearray">XRInputSourceArray</a><span>, in § 10.3</span> <li><a href="#xrinputsourceevent">XRInputSourceEvent</a><span>, in § 12.2</span> <li><a href="#dictdef-xrinputsourceeventinit">XRInputSourceEventInit</a><span>, in § 12.2</span> <li><a href="#dom-xrinputsourceevent-xrinputsourceevent">XRInputSourceEvent(type, eventInitDict)</a><span>, in § 12.2</span> <li><a href="#xrinputsourceschangeevent">XRInputSourcesChangeEvent</a><span>, in § 12.3</span> <li><a href="#dictdef-xrinputsourceschangeeventinit">XRInputSourcesChangeEventInit</a><span>, in § 12.3</span> <li><a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent">XRInputSourcesChangeEvent(type, eventInitDict)</a><span>, in § 12.3</span> <li><a href="#xrlayer">XRLayer</a><span>, in § 11.1</span> <li><a href="#dictdef-xrpermissiondescriptor">XRPermissionDescriptor</a><span>, in § 14.2</span> <li><a href="#xrpermissionstatus">XRPermissionStatus</a><span>, in § 14.2</span> <li><a href="#xrpose">XRPose</a><span>, in § 9.1</span> <li><a href="#xrreferencespace">XRReferenceSpace</a><span>, in § 6.2</span> <li><a href="#xrreferencespaceevent">XRReferenceSpaceEvent</a><span>, in § 12.4</span> <li><a href="#dictdef-xrreferencespaceeventinit">XRReferenceSpaceEventInit</a><span>, in § 12.4</span> <li><a href="#dom-xrreferencespaceevent-xrreferencespaceevent">XRReferenceSpaceEvent(type, eventInitDict)</a><span>, in § 12.4</span> <li><a href="#enumdef-xrreferencespacetype">XRReferenceSpaceType</a><span>, in § 6.2</span> <li><a href="#xrrenderstate">XRRenderState</a><span>, in § 4.2</span> <li><a href="#dictdef-xrrenderstateinit">XRRenderStateInit</a><span>, in § 4.2</span> <li><a href="#xrrigidtransform">XRRigidTransform</a><span>, in § 8.3</span> <li><a href="#dom-xrrigidtransform-xrrigidtransform">XRRigidTransform()</a><span>, in § 8.3</span> <li><a href="#dom-xrrigidtransform-xrrigidtransform">XRRigidTransform(position)</a><span>, in § 8.3</span> <li><a href="#dom-xrrigidtransform-xrrigidtransform">XRRigidTransform(position, orientation)</a><span>, in § 8.3</span> <li><a href="#xrsession">XRSession</a><span>, in § 4.1</span> <li><a href="#xrsessionevent">XRSessionEvent</a><span>, in § 12.1</span> <li><a href="#dictdef-xrsessioneventinit">XRSessionEventInit</a><span>, in § 12.1</span> <li><a href="#dom-xrsessionevent-xrsessionevent">XRSessionEvent(type, eventInitDict)</a><span>, in § 12.1</span> <li><a href="#dictdef-xrsessioninit">XRSessionInit</a><span>, in § 3.4</span> <li><a href="#enumdef-xrsessionmode">XRSessionMode</a><span>, in § 3.3</span> <li><a href="#permissiondef-xr-session-supported">"xr-session-supported"</a><span>, in § 13.8.1</span> <li><a href="#dictdef-xrsessionsupportedpermissiondescriptor">XRSessionSupportedPermissionDescriptor</a><span>, in § 13.8.1</span> <li><a href="#xrspace">XRSpace</a><span>, in § 6.1</span> <li><a href="#xrsystem">XRSystem</a><span>, in § 3.2</span> <li><a href="#enumdef-xrtargetraymode">XRTargetRayMode</a><span>, in § 10.1</span> <li><a href="#xr-task-source">XR task source</a><span>, in § 12</span> <li><a href="#xrview">XRView</a><span>, in § 7.1</span> <li><a href="#xrviewerpose">XRViewerPose</a><span>, in § 9.2</span> <li><a href="#xrviewport">XRViewport</a><span>, in § 7.3</span> <li><a href="#enumdef-xrvisibilitystate">XRVisibilityState</a><span>, in § 4.1</span> <li><a href="#xrwebgllayer">XRWebGLLayer</a><span>, in § 11.2</span> <li><a href="#dictdef-xrwebgllayerinit">XRWebGLLayerInit</a><span>, in § 11.2</span> <li><a href="#dom-xrwebgllayer-xrwebgllayer">XRWebGLLayer(session, context)</a><span>, in § 11.2</span> <li><a href="#dom-xrwebgllayer-xrwebgllayer">XRWebGLLayer(session, context, layerInit)</a><span>, in § 11.2</span> <li><a href="#typedefdef-xrwebglrenderingcontext">XRWebGLRenderingContext</a><span>, in § 11.2</span> <li><a href="#dom-xrviewport-y">y</a><span>, in § 7.3</span> </ul> <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3> <ul class="index"> <li> <a data-link-type="biblio">[DOM]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="85394472">Document</span> <li><span class="dfn-paneled" id="129bdae8">Event</span> <li><span class="dfn-paneled" id="44a7708c">EventInit</span> <li><span class="dfn-paneled" id="2bc0cdf4">EventTarget</span> <li><span class="dfn-paneled" id="80159636">ancestor</span> <li><span class="dfn-paneled" id="2e9f6464">canceled flag</span> <li><span class="dfn-paneled" id="da8b8e0e">descendant</span> <li><span class="dfn-paneled" id="1372f92a">dispatch</span> <li><span class="dfn-paneled" id="5fd23811">fire an event</span> <li><span class="dfn-paneled" id="9d09d04c">type</span> </ul> <li> <a data-link-type="biblio">[ECMASCRIPT]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="acab177a">IsDetachedBuffer</span> <li><span class="dfn-paneled" id="32132694">realm</span> </ul> <li> <a data-link-type="biblio">[GEOMETRY-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="fc6d6516">DOMMatrix</span> <li><span class="dfn-paneled" id="09dd3a01">DOMPointInit</span> <li><span class="dfn-paneled" id="463fdafc">DOMPointReadOnly</span> <li><span class="dfn-paneled" id="013cfbcc">w</span> <li><span class="dfn-paneled" id="c56bac1e">x</span> <li><span class="dfn-paneled" id="00b07258">y</span> <li><span class="dfn-paneled" id="7cb6dca4">z</span> </ul> <li> <a data-link-type="biblio">[HIGH RESOLUTION TIME]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="a0c6f7f7">DOMHighResTimeStamp</span> </ul> <li> <a data-link-type="biblio">[HR-TIME-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="a18023da">current high resolution time</span> </ul> <li> <a data-link-type="biblio">[HTML]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="f0951476">EventHandler</span> <li><span class="dfn-paneled" id="5b13c537">HTMLCanvasElement</span> <li><span class="dfn-paneled" id="be0c27b2">Navigator</span> <li><span class="dfn-paneled" id="5d7209e9">Window</span> <li><span class="dfn-paneled" id="35972864">active document</span> <li><span class="dfn-paneled" id="6c7bb277">appVersion</span> <li><span class="dfn-paneled" id="faf954d6">browsing context</span> <li><span class="dfn-paneled" id="ce3d2bbb">current global object</span> <li><span class="dfn-paneled" id="be15b25b">current realm</span> <li><span class="dfn-paneled" id="5a0d3e81">currently focused area</span> <li><span class="dfn-paneled" id="03675365">event handler idl attribute</span> <li><span class="dfn-paneled" id="9c69a1e4">focus</span> <li><span class="dfn-paneled" id="a72449dd">in parallel</span> <li><span class="dfn-paneled" id="a0768d9f">navigator</span> <li><span class="dfn-paneled" id="a944ac4c">origin</span> <li><span class="dfn-paneled" id="a41102eb">permissions policy</span> <li><span class="dfn-paneled" id="9a517a7d">queue a task</span> <li><span class="dfn-paneled" id="e99bd18e">relevant global object</span> <li><span class="dfn-paneled" id="5991ccfb">relevant realm</span> <li><span class="dfn-paneled" id="6998ead7">rendering opportunity</span> <li><span class="dfn-paneled" id="e57197d8">requestAnimationFrame(callback)</span> <li><span class="dfn-paneled" id="7393da89">same origin</span> <li><span class="dfn-paneled" id="ae8b1cd4">same origin-domain</span> <li><span class="dfn-paneled" id="c3b2d08c">task source</span> <li><span class="dfn-paneled" id="47fe679e">transient activation</span> <li><span class="dfn-paneled" id="3cdef7e1">userAgent</span> <li><span class="dfn-paneled" id="3a6b9c7b">visibilitystate</span> </ul> <li> <a data-link-type="biblio">[INFRA]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="53275e46">append</span> <li><span class="dfn-paneled" id="ae8def21">contain</span> <li><span class="dfn-paneled" id="f937b7b6">continue</span> <li><span class="dfn-paneled" id="d8f8bd6e">extend</span> <li><span class="dfn-paneled" id="6b815fdd">is empty</span> <li><span class="dfn-paneled" id="649608b9">list</span> <li><span class="dfn-paneled" id="99c988d6">remove</span> <li><span class="dfn-paneled" id="15e48c39">set</span> <li><span class="dfn-paneled" id="0204d188">size</span> <li><span class="dfn-paneled" id="0698d556">string</span> <li><span class="dfn-paneled" id="0e8de730">tuple</span> </ul> <li> <a data-link-type="biblio">[ORIENTATION SENSOR]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="0c8dc052">AbsoluteOrientationSensor</span> <li><span class="dfn-paneled" id="64da46e8">RelativeOrientationSensor</span> </ul> <li> <a data-link-type="biblio">[PERMISSIONS]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="03efcfde">PermissionDescriptor</span> <li><span class="dfn-paneled" id="4036a132">PermissionStatus</span> <li><span class="dfn-paneled" id="a849381c">denied</span> <li><span class="dfn-paneled" id="b5775905">granted</span> <li><span class="dfn-paneled" id="3804f39d">name</span> <li><span class="dfn-paneled" id="d8705310">permission descriptor type</span> <li><span class="dfn-paneled" id="2d58565c">permission query algorithm</span> <li><span class="dfn-paneled" id="c9842981">permission result type</span> <li><span class="dfn-paneled" id="01082766">permission state</span> <li><span class="dfn-paneled" id="27daf463">powerful feature</span> <li><span class="dfn-paneled" id="85dc4077">prompt</span> <li><span class="dfn-paneled" id="756a432d">request permission to use</span> <li><span class="dfn-paneled" id="73533f9c">state</span> </ul> <li> <a data-link-type="biblio">[PERMISSIONS-POLICY-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="c88e6590">default allowlist</span> <li><span class="dfn-paneled" id="4ed2f1ff">policy-controlled feature</span> </ul> <li> <a data-link-type="biblio">[POINTEREVENTS]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="bc2ba137">primary pointer</span> </ul> <li> <a data-link-type="biblio">[REQUESTIDLECALLBACK]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="3cad9654">requestIdleCallback()</span> </ul> <li> <a data-link-type="biblio">[WEBGL 2.0]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="f9fd5528">SRGB8</span> <li><span class="dfn-paneled" id="60e993cd">SRGB8_ALPHA8</span> <li><span class="dfn-paneled" id="eb6a2780">WebGL2RenderingContext</span> </ul> <li> <a data-link-type="biblio">[WEBGL-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="32e2917b">FRAMEBUFFER_UNSUPPORTED</span> <li><span class="dfn-paneled" id="1ea6687d">INVALID_FRAMEBUFFER_OPERATION</span> <li><span class="dfn-paneled" id="cc56cc84">INVALID_OPERATION</span> <li><span class="dfn-paneled" id="c37054f1">RGB</span> <li><span class="dfn-paneled" id="1c1d06a6">RGBA</span> <li><span class="dfn-paneled" id="10ab0dcf">WebGLContextAttributes</span> <li><span class="dfn-paneled" id="4d3afed8">WebGLFramebuffer</span> <li><span class="dfn-paneled" id="95b96ac0">WebGLObject</span> <li><span class="dfn-paneled" id="6c06778d">WebGLRenderingContext</span> <li><span class="dfn-paneled" id="7f7e3772">WebGLRenderingContextBase</span> <li><span class="dfn-paneled" id="9eb20236">actual context parameters</span> <li><span class="dfn-paneled" id="69019726">canvas</span> <li><span class="dfn-paneled" id="ff0613ea">checkFramebufferStatus</span> <li><span class="dfn-paneled" id="e6e9ebc9">clear</span> <li><span class="dfn-paneled" id="1000528e">create a drawing buffer</span> <li><span class="dfn-paneled" id="901e18bb">create the webgl context</span> <li><span class="dfn-paneled" id="9ab7cb57">default framebuffer</span> <li><span class="dfn-paneled" id="e6031f8e">deleteFramebuffer</span> <li><span class="dfn-paneled" id="38a85ef5">drawArrays</span> <li><span class="dfn-paneled" id="387bce46">drawElements</span> <li><span class="dfn-paneled" id="1acb6d84">fire a webgl context event</span> <li><span class="dfn-paneled" id="5ab8d343">framebufferRenderbuffer</span> <li><span class="dfn-paneled" id="966b783c">framebufferTexture2D</span> <li><span class="dfn-paneled" id="ca0bebec">getFramebufferAttachmentParameter</span> <li><span class="dfn-paneled" id="8b76e0c1">handle the context loss</span> <li><span class="dfn-paneled" id="9a2add78">invalidated</span> <li><span class="dfn-paneled" id="ca8286d6">restore the context</span> <li><span class="dfn-paneled" id="20b818ec">statusMessage</span> <li><span class="dfn-paneled" id="6529f975">uniformMatrix4fv</span> <li><span class="dfn-paneled" id="a162c94f">webgl context lost flag</span> <li><span class="dfn-paneled" id="a162c94f①">webgl context lost flag <small>(for WebGLRenderingContext)</small></span> <li><span class="dfn-paneled" id="83bce337">webgl task source</span> <li><span class="dfn-paneled" id="17adb4fd">webgl viewport</span> </ul> <li> <a data-link-type="biblio">[WEBIDL]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="d25dfb2c">AbortError</span> <li><span class="dfn-paneled" id="dca2de17">DOMException</span> <li><span class="dfn-paneled" id="8855a9aa">DOMString</span> <li><span class="dfn-paneled" id="889e932f">Exposed</span> <li><span class="dfn-paneled" id="0a296dfe">Float32Array</span> <li><span class="dfn-paneled" id="dcf5fafa">FrozenArray</span> <li><span class="dfn-paneled" id="797018a7">InvalidStateError</span> <li><span class="dfn-paneled" id="c807e273">NewObject</span> <li><span class="dfn-paneled" id="3182eb71">NotSupportedError</span> <li><span class="dfn-paneled" id="34443090">OperationError</span> <li><span class="dfn-paneled" id="bdbd19d1">Promise</span> <li><span class="dfn-paneled" id="a5c91173">SameObject</span> <li><span class="dfn-paneled" id="b75bb3bd">SecureContext</span> <li><span class="dfn-paneled" id="c3e881ef">SecurityError</span> <li><span class="dfn-paneled" id="82ca3efc">TypeError</span> <li><span class="dfn-paneled" id="dacde8b5">a new promise</span> <li><span class="dfn-paneled" id="5372cca8">boolean</span> <li><span class="dfn-paneled" id="8c800cdf">double</span> <li><span class="dfn-paneled" id="eec1be2d">float</span> <li><span class="dfn-paneled" id="abbed741">frozen array type</span> <li><span class="dfn-paneled" id="57cf55df">indexed property getter</span> <li><span class="dfn-paneled" id="2bdfe871">invoke the web idl callback function</span> <li><span class="dfn-paneled" id="f8de33a3">long</span> <li><span class="dfn-paneled" id="56f81a8e">new</span> <li><span class="dfn-paneled" id="b262501e">reject</span> <li><span class="dfn-paneled" id="3b90bdcd">resolve</span> <li><span class="dfn-paneled" id="9cce47fd">sequence</span> <li><span class="dfn-paneled" id="4013a022">this</span> <li><span class="dfn-paneled" id="5f90bbfb">undefined</span> <li><span class="dfn-paneled" id="e97a9688">unsigned long</span> </ul> <li> <a data-link-type="biblio">[WEBXR-AR-MODULE-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="2b77e73c">first-person observer view</span> </ul> <li> <a data-link-type="biblio">[WEBXRLAYERS-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="2c275d68">colorFormat</span> <li><span class="dfn-paneled" id="c9c7b7d0">layers</span> </ul> </ul> <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2> <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3> <dl> <dt id="biblio-dom">[DOM] <dd>Anne van Kesteren. <a href="https://dom.spec.whatwg.org/"><cite>DOM Standard</cite></a>. Living Standard. URL: <a href="https://dom.spec.whatwg.org/">https://dom.spec.whatwg.org/</a> <dt id="biblio-ecmascript">[ECMASCRIPT] <dd><a href="https://tc39.es/ecma262/multipage/"><cite>ECMAScript Language Specification</cite></a>. URL: <a href="https://tc39.es/ecma262/multipage/">https://tc39.es/ecma262/multipage/</a> <dt id="biblio-geometry-1">[GEOMETRY-1] <dd>Simon Pieters; Chris Harrelson. <a href="https://www.w3.org/TR/geometry-1/"><cite>Geometry Interfaces Module Level 1</cite></a>. 4 December 2018. CR. URL: <a href="https://www.w3.org/TR/geometry-1/">https://www.w3.org/TR/geometry-1/</a> <dt id="biblio-hr-time-3">[HR-TIME-3] <dd>Yoav Weiss. <a href="https://www.w3.org/TR/hr-time-3/"><cite>High Resolution Time</cite></a>. 19 July 2023. WD. URL: <a href="https://www.w3.org/TR/hr-time-3/">https://www.w3.org/TR/hr-time-3/</a> <dt id="biblio-html">[HTML] <dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/"><cite>HTML Standard</cite></a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a> <dt id="biblio-infra">[INFRA] <dd>Anne van Kesteren; Domenic Denicola. <a href="https://infra.spec.whatwg.org/"><cite>Infra Standard</cite></a>. Living Standard. URL: <a href="https://infra.spec.whatwg.org/">https://infra.spec.whatwg.org/</a> <dt id="biblio-permissions">[PERMISSIONS] <dd>Marcos Caceres; Mike Taylor. <a href="https://www.w3.org/TR/permissions/"><cite>Permissions</cite></a>. 19 March 2024. WD. URL: <a href="https://www.w3.org/TR/permissions/">https://www.w3.org/TR/permissions/</a> <dt id="biblio-permissions-policy-1">[PERMISSIONS-POLICY-1] <dd>Ian Clelland. <a href="https://www.w3.org/TR/permissions-policy-1/"><cite>Permissions Policy</cite></a>. 25 September 2024. WD. URL: <a href="https://www.w3.org/TR/permissions-policy-1/">https://www.w3.org/TR/permissions-policy-1/</a> <dt id="biblio-pointerevents">[POINTEREVENTS] <dd>Jacob Rossi; Matt Brubeck. <a href="https://www.w3.org/TR/pointerevents/"><cite>Pointer Events</cite></a>. 4 April 2019. REC. URL: <a href="https://www.w3.org/TR/pointerevents/">https://www.w3.org/TR/pointerevents/</a> <dt id="biblio-pointerlock">[POINTERLOCK] <dd>Vincent Scheib. <a href="https://www.w3.org/TR/pointerlock/"><cite>Pointer Lock</cite></a>. 27 October 2016. REC. URL: <a href="https://www.w3.org/TR/pointerlock/">https://www.w3.org/TR/pointerlock/</a> <dt id="biblio-requestidlecallback">[REQUESTIDLECALLBACK] <dd>Ross McIlroy; Ilya Grigorik. <a href="https://www.w3.org/TR/requestidlecallback/"><cite>requestIdleCallback() Cooperative Scheduling of Background Tasks</cite></a>. 28 June 2022. WD. URL: <a href="https://www.w3.org/TR/requestidlecallback/">https://www.w3.org/TR/requestidlecallback/</a> <dt id="biblio-rfc2119">[RFC2119] <dd>S. Bradner. <a href="https://datatracker.ietf.org/doc/html/rfc2119"><cite>Key words for use in RFCs to Indicate Requirement Levels</cite></a>. March 1997. Best Current Practice. URL: <a href="https://datatracker.ietf.org/doc/html/rfc2119">https://datatracker.ietf.org/doc/html/rfc2119</a> <dt id="biblio-webgl-2">[WEBGL-2] <dd>Dean Jackson; Jeff Gilbert. <a href="https://www.khronos.org/registry/webgl/specs/latest/2.0/"><cite>WebGL 2.0 Specification</cite></a>. 12 August 2017. URL: <a href="https://www.khronos.org/registry/webgl/specs/latest/2.0/">https://www.khronos.org/registry/webgl/specs/latest/2.0/</a> <dt id="biblio-webidl">[WEBIDL] <dd>Edgar Chen; Timothy Gu. <a href="https://webidl.spec.whatwg.org/"><cite>Web IDL Standard</cite></a>. Living Standard. URL: <a href="https://webidl.spec.whatwg.org/">https://webidl.spec.whatwg.org/</a> <dt id="biblio-webxrlayers-1">[WEBXRLAYERS-1] <dd>Rik Cabanier. <a href="https://www.w3.org/TR/webxrlayers-1/"><cite>WebXR Layers API Level 1</cite></a>. 10 May 2024. WD. URL: <a href="https://www.w3.org/TR/webxrlayers-1/">https://www.w3.org/TR/webxrlayers-1/</a> </dl> <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3> <dl> <dt id="biblio-device-orientation">[DEVICE-ORIENTATION] <dd>Reilly Grant; Raphael Kubo da Costa; Marcos Caceres. <a href="https://www.w3.org/TR/orientation-event/"><cite>Device Orientation and Motion</cite></a>. 14 May 2024. WD. URL: <a href="https://www.w3.org/TR/orientation-event/">https://www.w3.org/TR/orientation-event/</a> <dt id="biblio-webxr-ar-module-1">[WEBXR-AR-MODULE-1] <dd>Brandon Jones; Manish Goregaokar; Rik Cabanier. <a href="https://www.w3.org/TR/webxr-ar-module-1/"><cite>WebXR Augmented Reality Module - Level 1</cite></a>. 2 November 2022. CR. URL: <a href="https://www.w3.org/TR/webxr-ar-module-1/">https://www.w3.org/TR/webxr-ar-module-1/</a> </dl> <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">IDL Index</span><a class="self-link" href="#idl-index"></a></h2> <pre class="idl highlight def"><c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/system-state.html#navigator"><c- g>Navigator</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrsystem"><c- n>XRSystem</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSystem" href="#dom-navigator-xr"><c- g>xr</c-></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrsystem"><code><c- g>XRSystem</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget"><c- n>EventTarget</c-></a> { // Methods <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise"><c- b>Promise</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsystem-issessionsupported"><c- g>isSessionSupported</c-></a>(<a data-link-type="idl-name" href="#enumdef-xrsessionmode"><c- n>XRSessionMode</c-></a> <a href="#dom-xrsystem-issessionsupported-mode-mode"><code><c- g>mode</c-></code></a>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject"><c- g>NewObject</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise"><c- b>Promise</c-></a><<a data-link-type="idl-name" href="#xrsession"><c- n>XRSession</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsystem-requestsession"><c- g>requestSession</c-></a>(<a data-link-type="idl-name" href="#enumdef-xrsessionmode"><c- n>XRSessionMode</c-></a> <a href="#dom-xrsystem-requestsession-mode-options-mode"><code><c- g>mode</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-xrsessioninit"><c- n>XRSessionInit</c-></a> <a href="#dom-xrsystem-requestsession-mode-options-options"><code><c- g>options</c-></code></a> = {}); // Events <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsystem-ondevicechange"><c- g>ondevicechange</c-></a>; }; <c- b>enum</c-> <a href="#enumdef-xrsessionmode"><code><c- g>XRSessionMode</c-></code></a> { <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-inline"><c- s>"inline"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-immersive-vr"><c- s>"immersive-vr"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrsessionmode-immersive-ar"><c- s>"immersive-ar"</c-></a> }; <c- b>dictionary</c-> <a href="#dictdef-xrsessioninit"><code><c- g>XRSessionInit</c-></code></a> { <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="dict-member" data-type="sequence<DOMString> " href="#dom-xrsessioninit-requiredfeatures"><c- g>requiredFeatures</c-></a>; <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="dict-member" data-type="sequence<DOMString> " href="#dom-xrsessioninit-optionalfeatures"><c- g>optionalFeatures</c-></a>; }; <c- b>enum</c-> <a href="#enumdef-xrvisibilitystate"><code><c- g>XRVisibilityState</c-></code></a> { <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-visible"><c- s>"visible"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-visible-blurred"><c- s>"visible-blurred"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrvisibilitystate-hidden"><c- s>"hidden"</c-></a>, }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrsession"><code><c- g>XRSession</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget"><c- n>EventTarget</c-></a> { // Attributes <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-xrvisibilitystate"><c- n>XRVisibilityState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRVisibilityState" href="#dom-xrsession-visibilitystate"><c- g>visibilityState</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-float"><c- b>float</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="float?" href="#dom-xrsession-framerate"><c- g>frameRate</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-Float32Array"><c- b>Float32Array</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array?" href="#dom-xrsession-supportedframerates"><c- g>supportedFrameRates</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrenderstate"><c- n>XRRenderState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRenderState" href="#dom-xrsession-renderstate"><c- g>renderState</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrinputsourcearray"><c- n>XRInputSourceArray</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSourceArray" href="#dom-xrsession-inputsources"><c- g>inputSources</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrinputsourcearray"><c- n>XRInputSourceArray</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSourceArray" href="#dom-xrsession-trackedsources"><c- g>trackedSources</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array"><c- b>FrozenArray</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMString>" href="#dom-xrsession-enabledfeatures"><c- g>enabledFeatures</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrsession-issystemkeyboardsupported"><c- g>isSystemKeyboardSupported</c-></a>; // Methods <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrsession-updaterenderstate"><c- g>updateRenderState</c-></a>(<c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-xrrenderstateinit"><c- n>XRRenderStateInit</c-></a> <a href="#dom-xrsession-updaterenderstate-state-state"><code><c- g>state</c-></code></a> = {}); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise"><c- b>Promise</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsession-updatetargetframerate"><c- g>updateTargetFrameRate</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-float"><c- b>float</c-></a> <a href="#dom-xrsession-updatetargetframerate-rate-rate"><code><c- g>rate</c-></code></a>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject"><c- g>NewObject</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise"><c- b>Promise</c-></a><<a data-link-type="idl-name" href="#xrreferencespace"><c- n>XRReferenceSpace</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsession-requestreferencespace"><c- g>requestReferenceSpace</c-></a>(<a data-link-type="idl-name" href="#enumdef-xrreferencespacetype"><c- n>XRReferenceSpaceType</c-></a> <a href="#dom-xrsession-requestreferencespace-type-type"><code><c- g>type</c-></code></a>); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrsession-requestanimationframe"><c- g>requestAnimationFrame</c-></a>(<a data-link-type="idl-name" href="#callbackdef-xrframerequestcallback"><c- n>XRFrameRequestCallback</c-></a> <a href="#dom-xrsession-requestanimationframe-callback-callback"><code><c- g>callback</c-></code></a>); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrsession-cancelanimationframe"><c- g>cancelAnimationFrame</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-xrsession-cancelanimationframe-handle-handle"><code><c- g>handle</c-></code></a>); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise"><c- b>Promise</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrsession-end"><c- g>end</c-></a>(); // Events <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onend"><c- g>onend</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-oninputsourceschange"><c- g>oninputsourceschange</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselect"><c- g>onselect</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselectstart"><c- g>onselectstart</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onselectend"><c- g>onselectend</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueeze"><c- g>onsqueeze</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueezestart"><c- g>onsqueezestart</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onsqueezeend"><c- g>onsqueezeend</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onvisibilitychange"><c- g>onvisibilitychange</c-></a>; <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrsession-onframeratechange"><c- g>onframeratechange</c-></a>; }; <c- b>dictionary</c-> <a href="#dictdef-xrrenderstateinit"><code><c- g>XRRenderStateInit</c-></code></a> { <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a data-type="double " href="#dom-xrrenderstateinit-depthnear"><code><c- g>depthNear</c-></code></a>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a data-type="double " href="#dom-xrrenderstateinit-depthfar"><code><c- g>depthFar</c-></code></a>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a data-type="double " href="#dom-xrrenderstateinit-inlineverticalfieldofview"><code><c- g>inlineVerticalFieldOfView</c-></code></a>; <a data-link-type="idl-name" href="#xrwebgllayer"><c- n>XRWebGLLayer</c-></a>? <a data-type="XRWebGLLayer? " href="#dom-xrrenderstateinit-baselayer"><code><c- g>baseLayer</c-></code></a>; <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a><<a data-link-type="idl-name" href="#xrlayer"><c- n>XRLayer</c-></a>>? <a data-type="sequence<XRLayer>? " href="#dom-xrrenderstateinit-layers"><code><c- g>layers</c-></code></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrrenderstate"><code><c- g>XRRenderState</c-></code></a> { <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="double" href="#dom-xrrenderstate-depthnear"><c- g>depthNear</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="double" href="#dom-xrrenderstate-depthfar"><c- g>depthFar</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="double?" href="#dom-xrrenderstate-inlineverticalfieldofview"><c- g>inlineVerticalFieldOfView</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrwebgllayer"><c- n>XRWebGLLayer</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRWebGLLayer?" href="#dom-xrrenderstate-baselayer"><c- g>baseLayer</c-></a>; }; <c- b>callback</c-> <a href="#callbackdef-xrframerequestcallback"><code><c- g>XRFrameRequestCallback</c-></code></a> = <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a> (<a data-link-type="idl-name" href="https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp"><c- n>DOMHighResTimeStamp</c-></a> <a href="#dom-xrframerequestcallback-time"><code><c- g>time</c-></code></a>, <a data-link-type="idl-name" href="#xrframe"><c- n>XRFrame</c-></a> <a href="#dom-xrframerequestcallback-frame"><code><c- g>frame</c-></code></a>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrframe"><code><c- g>XRFrame</c-></code></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrsession"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrframe-session"><c- g>session</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp"><c- n>DOMHighResTimeStamp</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMHighResTimeStamp" href="#dom-xrframe-predicteddisplaytime"><c- g>predictedDisplayTime</c-></a>; <a data-link-type="idl-name" href="#xrviewerpose"><c- n>XRViewerPose</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrframe-getviewerpose"><c- g>getViewerPose</c-></a>(<a data-link-type="idl-name" href="#xrreferencespace"><c- n>XRReferenceSpace</c-></a> <a href="#dom-xrframe-getviewerpose-referencespace-referencespace"><code><c- g>referenceSpace</c-></code></a>); <a data-link-type="idl-name" href="#xrpose"><c- n>XRPose</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrframe-getpose"><c- g>getPose</c-></a>(<a data-link-type="idl-name" href="#xrspace"><c- n>XRSpace</c-></a> <a href="#dom-xrframe-getpose-space-basespace-space"><code><c- g>space</c-></code></a>, <a data-link-type="idl-name" href="#xrspace"><c- n>XRSpace</c-></a> <a href="#dom-xrframe-getpose-space-basespace-basespace"><code><c- g>baseSpace</c-></code></a>); }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrspace"><code><c- g>XRSpace</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget"><c- n>EventTarget</c-></a> { }; <c- b>enum</c-> <a href="#enumdef-xrreferencespacetype"><code><c- g>XRReferenceSpaceType</c-></code></a> { <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-viewer"><c- s>"viewer"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-local"><c- s>"local"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-local-floor"><c- s>"local-floor"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-bounded-floor"><c- s>"bounded-floor"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrreferencespacetype-unbounded"><c- s>"unbounded"</c-></a> }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrreferencespace"><code><c- g>XRReferenceSpace</c-></code></a> : <a data-link-type="idl-name" href="#xrspace"><c- n>XRSpace</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject"><c- g>NewObject</c-></a>] <a data-link-type="idl-name" href="#xrreferencespace"><c- n>XRReferenceSpace</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrreferencespace-getoffsetreferencespace"><c- g>getOffsetReferenceSpace</c-></a>(<a data-link-type="idl-name" href="#xrrigidtransform"><c- n>XRRigidTransform</c-></a> <a href="#dom-xrreferencespace-getoffsetreferencespace-originoffset-originoffset"><code><c- g>originOffset</c-></code></a>); <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"><c- n>EventHandler</c-></a> <a class="idl-code" data-link-type="attribute" data-type="EventHandler" href="#dom-xrreferencespace-onreset"><c- g>onreset</c-></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrboundedreferencespace"><code><c- g>XRBoundedReferenceSpace</c-></code></a> : <a data-link-type="idl-name" href="#xrreferencespace"><c- n>XRReferenceSpace</c-></a> { <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array"><c- b>FrozenArray</c-></a><<a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly"><c- n>DOMPointReadOnly</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMPointReadOnly>" href="#dom-xrboundedreferencespace-boundsgeometry"><c- g>boundsGeometry</c-></a>; }; <c- b>enum</c-> <a href="#enumdef-xreye"><code><c- g>XREye</c-></code></a> { <a href="#dom-xreye-none"><code><c- s>"none"</c-></code></a>, <a href="#dom-xreye-left"><code><c- s>"left"</c-></code></a>, <a href="#dom-xreye-right"><code><c- s>"right"</c-></code></a> }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrview"><code><c- g>XRView</c-></code></a> { <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-xreye"><c- n>XREye</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XREye" href="#dom-xrview-eye"><c- g>eye</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-Float32Array"><c- b>Float32Array</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array" href="#dom-xrview-projectionmatrix"><c- g>projectionMatrix</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrigidtransform"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrview-transform"><c- g>transform</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="double?" href="#dom-xrview-recommendedviewportscale"><c- g>recommendedViewportScale</c-></a>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrview-requestviewportscale"><c- g>requestViewportScale</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a>? <a href="#dom-xrview-requestviewportscale-scale-scale"><code><c- g>scale</c-></code></a>); }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrviewport"><code><c- g>XRViewport</c-></code></a> { <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-long"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-x"><c- g>x</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-long"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-y"><c- g>y</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-long"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-width"><c- g>width</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-long"><c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="long" href="#dom-xrviewport-height"><c- g>height</c-></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrrigidtransform"><code><c- g>XRRigidTransform</c-></code></a> { <a class="idl-code" data-link-type="constructor" href="#dom-xrrigidtransform-xrrigidtransform"><c- g>constructor</c-></a>(<c- b>optional</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dictdef-dompointinit"><c- n>DOMPointInit</c-></a> <a href="#dom-xrrigidtransform-xrrigidtransform-position-orientation-position"><code><c- g>position</c-></code></a> = {}, <c- b>optional</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dictdef-dompointinit"><c- n>DOMPointInit</c-></a> <a href="#dom-xrrigidtransform-xrrigidtransform-position-orientation-orientation"><code><c- g>orientation</c-></code></a> = {}); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly"><c- n>DOMPointReadOnly</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly" href="#dom-xrrigidtransform-position"><c- g>position</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly"><c- n>DOMPointReadOnly</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly" href="#dom-xrrigidtransform-orientation"><c- g>orientation</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-Float32Array"><c- b>Float32Array</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="Float32Array" href="#dom-xrrigidtransform-matrix"><c- g>matrix</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrigidtransform"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrrigidtransform-inverse"><c- g>inverse</c-></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrpose"><code><c- g>XRPose</c-></code></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrigidtransform"><c- n>XRRigidTransform</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform" href="#dom-xrpose-transform"><c- g>transform</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly"><c- n>DOMPointReadOnly</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly?" href="#dom-xrpose-linearvelocity"><c- g>linearVelocity</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.w3.org/TR/geometry-1/#dompointreadonly"><c- n>DOMPointReadOnly</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMPointReadOnly?" href="#dom-xrpose-angularvelocity"><c- g>angularVelocity</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrpose-emulatedposition"><c- g>emulatedPosition</c-></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrviewerpose"><code><c- g>XRViewerPose</c-></code></a> : <a data-link-type="idl-name" href="#xrpose"><c- n>XRPose</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array"><c- b>FrozenArray</c-></a><<a data-link-type="idl-name" href="#xrview"><c- n>XRView</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRView>" href="#dom-xrviewerpose-views"><c- g>views</c-></a>; }; <c- b>enum</c-> <a href="#enumdef-xrhandedness"><code><c- g>XRHandedness</c-></code></a> { <a href="#dom-xrhandedness-none"><code><c- s>"none"</c-></code></a>, <a href="#dom-xrhandedness-left"><code><c- s>"left"</c-></code></a>, <a href="#dom-xrhandedness-right"><code><c- s>"right"</c-></code></a> }; <c- b>enum</c-> <a href="#enumdef-xrtargetraymode"><code><c- g>XRTargetRayMode</c-></code></a> { <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-gaze"><c- s>"gaze"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-tracked-pointer"><c- s>"tracked-pointer"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-screen"><c- s>"screen"</c-></a>, <a class="idl-code" data-link-type="enum-value" href="#dom-xrtargetraymode-transient-pointer"><c- s>"transient-pointer"</c-></a> }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrinputsource"><code><c- g>XRInputSource</c-></code></a> { <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-xrhandedness"><c- n>XRHandedness</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRHandedness" href="#dom-xrinputsource-handedness"><c- g>handedness</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-xrtargetraymode"><c- n>XRTargetRayMode</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRTargetRayMode" href="#dom-xrinputsource-targetraymode"><c- g>targetRayMode</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrspace"><c- n>XRSpace</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSpace" href="#dom-xrinputsource-targetrayspace"><c- g>targetRaySpace</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrspace"><c- n>XRSpace</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSpace?" href="#dom-xrinputsource-gripspace"><c- g>gripSpace</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array"><c- b>FrozenArray</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<DOMString>" href="#dom-xrinputsource-profiles"><c- g>profiles</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrinputsource-skiprendering"><c- g>skipRendering</c-></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrinputsourcearray"><code><c- g>XRInputSourceArray</c-></code></a> { <c- b>iterable</c-><<a data-link-type="idl-name" href="#xrinputsource"><c- n>XRInputSource</c-></a>>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrinputsourcearray-length"><c- g>length</c-></a>; <c- b>getter</c-> <a data-link-type="idl-name" href="#xrinputsource"><c- n>XRInputSource</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-xrinputsourcearray-__getter__-index-index"><code><c- g>index</c-></code></a>); }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrlayer"><code><c- g>XRLayer</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget"><c- n>EventTarget</c-></a> {}; <c- b>typedef</c-> (<a data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext"><c- n>WebGLRenderingContext</c-></a> <c- b>or</c-> <a data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/2.0/#WebGL2RenderingContext"><c- n>WebGL2RenderingContext</c-></a>) <a href="#typedefdef-xrwebglrenderingcontext"><code><c- g>XRWebGLRenderingContext</c-></code></a>; <c- b>dictionary</c-> <a href="#dictdef-xrwebgllayerinit"><code><c- g>XRWebGLLayerInit</c-></code></a> { <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a data-default="true" data-type="boolean " href="#dom-xrwebgllayerinit-antialias"><code><c- g>antialias</c-></code></a> = <c- b>true</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a data-default="true" data-type="boolean " href="#dom-xrwebgllayerinit-depth"><code><c- g>depth</c-></code></a> = <c- b>true</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean " href="#dom-xrwebgllayerinit-stencil"><code><c- g>stencil</c-></code></a> = <c- b>false</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a data-default="true" data-type="boolean " href="#dom-xrwebgllayerinit-alpha"><code><c- g>alpha</c-></code></a> = <c- b>true</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean " href="#dom-xrwebgllayerinit-ignoredepthvalues"><code><c- g>ignoreDepthValues</c-></code></a> = <c- b>false</c->; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a data-default="1.0" data-type="double " href="#dom-xrwebgllayerinit-framebufferscalefactor"><code><c- g>framebufferScaleFactor</c-></code></a> = 1.0; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrwebgllayer"><code><c- g>XRWebGLLayer</c-></code></a>: <a data-link-type="idl-name" href="#xrlayer"><c- n>XRLayer</c-></a> { <a class="idl-code" data-link-type="constructor" href="#dom-xrwebgllayer-xrwebgllayer"><c- g>constructor</c-></a>(<a data-link-type="idl-name" href="#xrsession"><c- n>XRSession</c-></a> <a href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-session"><code><c- g>session</c-></code></a>, <a data-link-type="idl-name" href="#typedefdef-xrwebglrenderingcontext"><c- n>XRWebGLRenderingContext</c-></a> <a href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-context"><code><c- g>context</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-xrwebgllayerinit"><c- n>XRWebGLLayerInit</c-></a> <a href="#dom-xrwebgllayer-xrwebgllayer-session-context-layerinit-layerinit"><code><c- g>layerInit</c-></code></a> = {}); // Attributes <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrwebgllayer-antialias"><c- g>antialias</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="boolean" href="#dom-xrwebgllayer-ignoredepthvalues"><c- g>ignoreDepthValues</c-></a>; <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-float"><c- b>float</c-></a>? <a class="idl-code" data-link-type="attribute" data-type="float?" href="#dom-xrwebgllayer-fixedfoveation"><c- g>fixedFoveation</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer"><c- n>WebGLFramebuffer</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="WebGLFramebuffer?" href="#dom-xrwebgllayer-framebuffer"><c- g>framebuffer</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrwebgllayer-framebufferwidth"><c- g>framebufferWidth</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long" href="#dom-xrwebgllayer-framebufferheight"><c- g>framebufferHeight</c-></a>; // Methods <a data-link-type="idl-name" href="#xrviewport"><c- n>XRViewport</c-></a>? <a class="idl-code" data-link-type="method" href="#dom-xrwebgllayer-getviewport"><c- g>getViewport</c-></a>(<a data-link-type="idl-name" href="#xrview"><c- n>XRView</c-></a> <a href="#dom-xrwebgllayer-getviewport-view-view"><code><c- g>view</c-></code></a>); // Static Methods <c- b>static</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="method" href="#dom-xrwebgllayer-getnativeframebufferscalefactor"><c- g>getNativeFramebufferScaleFactor</c-></a>(<a data-link-type="idl-name" href="#xrsession"><c- n>XRSession</c-></a> <a href="#dom-xrwebgllayer-getnativeframebufferscalefactor-session-session"><code><c- g>session</c-></code></a>); }; <c- b>partial</c-> <c- b>dictionary</c-> <a class="idl-code" data-link-type="dictionary" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes"><c- g>WebGLContextAttributes</c-></a> { <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean " href="#dom-webglcontextattributes-xrcompatible"><code><c- g>xrCompatible</c-></code></a> = <c- b>false</c->; }; <c- b>partial</c-> <c- b>interface</c-> <c- b>mixin</c-> <a class="idl-code" data-link-type="interface" href="https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase"><c- g>WebGLRenderingContextBase</c-></a> { [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject"><c- g>NewObject</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-promise"><c- b>Promise</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-undefined"><c- b>undefined</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-webglrenderingcontextbase-makexrcompatible"><c- g>makeXRCompatible</c-></a>(); }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrsessionevent"><code><c- g>XRSessionEvent</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event"><c- n>Event</c-></a> { <a href="#dom-xrsessionevent-xrsessionevent"><code><c- g>constructor</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a> <a href="#dom-xrsessionevent-xrsessionevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <a data-link-type="idl-name" href="#dictdef-xrsessioneventinit"><c- n>XRSessionEventInit</c-></a> <a href="#dom-xrsessionevent-xrsessionevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code></a>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrsession"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrsessionevent-session"><c- g>session</c-></a>; }; <c- b>dictionary</c-> <a href="#dictdef-xrsessioneventinit"><code><c- g>XRSessionEventInit</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit"><c- n>EventInit</c-></a> { <c- b>required</c-> <a data-link-type="idl-name" href="#xrsession"><c- n>XRSession</c-></a> <a data-type="XRSession " href="#dom-xrsessioneventinit-session"><code><c- g>session</c-></code></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrinputsourceevent"><code><c- g>XRInputSourceEvent</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event"><c- n>Event</c-></a> { <a href="#dom-xrinputsourceevent-xrinputsourceevent"><code><c- g>constructor</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a> <a href="#dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <a data-link-type="idl-name" href="#dictdef-xrinputsourceeventinit"><c- n>XRInputSourceEventInit</c-></a> <a href="#dom-xrinputsourceevent-xrinputsourceevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code></a>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrframe"><c- n>XRFrame</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRFrame" href="#dom-xrinputsourceevent-frame"><c- g>frame</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrinputsource"><c- n>XRInputSource</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRInputSource" href="#dom-xrinputsourceevent-inputsource"><c- g>inputSource</c-></a>; }; <c- b>dictionary</c-> <a href="#dictdef-xrinputsourceeventinit"><code><c- g>XRInputSourceEventInit</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit"><c- n>EventInit</c-></a> { <c- b>required</c-> <a data-link-type="idl-name" href="#xrframe"><c- n>XRFrame</c-></a> <a data-type="XRFrame " href="#dom-xrinputsourceeventinit-frame"><code><c- g>frame</c-></code></a>; <c- b>required</c-> <a data-link-type="idl-name" href="#xrinputsource"><c- n>XRInputSource</c-></a> <a data-type="XRInputSource " href="#dom-xrinputsourceeventinit-inputsource"><code><c- g>inputSource</c-></code></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrinputsourceschangeevent"><code><c- g>XRInputSourcesChangeEvent</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event"><c- n>Event</c-></a> { <a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent"><code><c- g>constructor</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a> <a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <a data-link-type="idl-name" href="#dictdef-xrinputsourceschangeeventinit"><c- n>XRInputSourcesChangeEventInit</c-></a> <a href="#dom-xrinputsourceschangeevent-xrinputsourceschangeevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code></a>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrsession"><c- n>XRSession</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRSession" href="#dom-xrinputsourceschangeevent-session"><c- g>session</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array"><c- b>FrozenArray</c-></a><<a data-link-type="idl-name" href="#xrinputsource"><c- n>XRInputSource</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRInputSource>" href="#dom-xrinputsourceschangeevent-added"><c- g>added</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array"><c- b>FrozenArray</c-></a><<a data-link-type="idl-name" href="#xrinputsource"><c- n>XRInputSource</c-></a>> <a class="idl-code" data-link-type="attribute" data-readonly data-type="FrozenArray<XRInputSource>" href="#dom-xrinputsourceschangeevent-removed"><c- g>removed</c-></a>; }; <c- b>dictionary</c-> <a href="#dictdef-xrinputsourceschangeeventinit"><code><c- g>XRInputSourcesChangeEventInit</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit"><c- n>EventInit</c-></a> { <c- b>required</c-> <a data-link-type="idl-name" href="#xrsession"><c- n>XRSession</c-></a> <a data-type="XRSession " href="#dom-xrinputsourceschangeeventinit-session"><code><c- g>session</c-></code></a>; <c- b>required</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a><<a data-link-type="idl-name" href="#xrinputsource"><c- n>XRInputSource</c-></a>> <a data-type="sequence<XRInputSource> " href="#dom-xrinputsourceschangeeventinit-added"><code><c- g>added</c-></code></a>; <c- b>required</c-> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a><<a data-link-type="idl-name" href="#xrinputsource"><c- n>XRInputSource</c-></a>> <a data-type="sequence<XRInputSource> " href="#dom-xrinputsourceschangeeventinit-removed"><code><c- g>removed</c-></code></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SecureContext"><c- g>SecureContext</c-></a>, <a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrreferencespaceevent"><code><c- g>XRReferenceSpaceEvent</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event"><c- n>Event</c-></a> { <a href="#dom-xrreferencespaceevent-xrreferencespaceevent"><code><c- g>constructor</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a> <a href="#dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <a data-link-type="idl-name" href="#dictdef-xrreferencespaceeventinit"><c- n>XRReferenceSpaceEventInit</c-></a> <a href="#dom-xrreferencespaceevent-xrreferencespaceevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code></a>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrreferencespace"><c- n>XRReferenceSpace</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRReferenceSpace" href="#dom-xrreferencespaceevent-referencespace"><c- g>referenceSpace</c-></a>; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#xrrigidtransform"><c- n>XRRigidTransform</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRRigidTransform?" href="#dom-xrreferencespaceevent-transform"><c- g>transform</c-></a>; }; <c- b>dictionary</c-> <a href="#dictdef-xrreferencespaceeventinit"><code><c- g>XRReferenceSpaceEventInit</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit"><c- n>EventInit</c-></a> { <c- b>required</c-> <a data-link-type="idl-name" href="#xrreferencespace"><c- n>XRReferenceSpace</c-></a> <a data-type="XRReferenceSpace " href="#dom-xrreferencespaceeventinit-referencespace"><code><c- g>referenceSpace</c-></code></a>; <a data-link-type="idl-name" href="#xrrigidtransform"><c- n>XRRigidTransform</c-></a>? <a data-default="null" data-type="XRRigidTransform? " href="#dom-xrreferencespaceeventinit-transform"><code><c- g>transform</c-></code></a> = <c- b>null</c->; }; <c- b>dictionary</c-> <a href="#dictdef-xrsessionsupportedpermissiondescriptor"><code><c- g>XRSessionSupportedPermissionDescriptor</c-></code></a>: <a data-link-type="idl-name" href="https://www.w3.org/TR/permissions/#dom-permissiondescriptor"><c- n>PermissionDescriptor</c-></a> { <a data-link-type="idl-name" href="#enumdef-xrsessionmode"><c- n>XRSessionMode</c-></a> <a data-type="XRSessionMode " href="#dom-xrsessionsupportedpermissiondescriptor-mode"><code><c- g>mode</c-></code></a>; }; <c- b>dictionary</c-> <a href="#dictdef-xrpermissiondescriptor"><code><c- g>XRPermissionDescriptor</c-></code></a>: <a data-link-type="idl-name" href="https://www.w3.org/TR/permissions/#dom-permissiondescriptor"><c- n>PermissionDescriptor</c-></a> { <a data-link-type="idl-name" href="#enumdef-xrsessionmode"><c- n>XRSessionMode</c-></a> <a data-type="XRSessionMode " href="#dom-xrpermissiondescriptor-mode"><code><c- g>mode</c-></code></a>; <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a>> <a data-type="sequence<DOMString> " href="#dom-xrpermissiondescriptor-requiredfeatures"><code><c- g>requiredFeatures</c-></code></a>; <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a>> <a data-type="sequence<DOMString> " href="#dom-xrpermissiondescriptor-optionalfeatures"><code><c- g>optionalFeatures</c-></code></a>; }; [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#Exposed"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>interface</c-> <a href="#xrpermissionstatus"><code><c- g>XRPermissionStatus</c-></code></a>: <a data-link-type="idl-name" href="https://www.w3.org/TR/permissions/#dom-permissionstatus"><c- n>PermissionStatus</c-></a> { <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-frozen-array"><c- b>FrozenArray</c-></a><<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a>> <a data-type="FrozenArray<DOMString>" href="#dom-xrpermissionstatus-granted"><code><c- g>granted</c-></code></a>; }; </pre> <details class="mdn-anno unpositioned" data-anno-for="navigator-xr-attribute"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Navigator/xr" title="The read-only xr property provided by the Navigator interface returns an XRSystem object which can be used to access the WebXR Device API.">Navigator/xr</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-webglrenderingcontextbase-makexrcompatible"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/makeXRCompatible" title="The WebGLRenderingContext method makeXRCompatible() ensures that the rendering context described by the WebGLRenderingContext is ready to render the scene for the immersive WebXR device on which it will be displayed. If necessary, the WebGL layer may reconfigure the context to be ready to render to a different device than it originally was.">WebGLRenderingContext/makeXRCompatible</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/makeXRCompatible" title="The WebGLRenderingContext method makeXRCompatible() ensures that the rendering context described by the WebGLRenderingContext is ready to render the scene for the immersive WebXR device on which it will be displayed. If necessary, the WebGL layer may reconfigure the context to be ready to render to a different device than it originally was.">WebGLRenderingContext/makeXRCompatible</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>None</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>None</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrboundedreferencespace-boundsgeometry"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRBoundedReferenceSpace/boundsGeometry" title="The read-only XRBoundedReferenceSpace property boundsGeometry is an array of DOMPointReadOnly objects which specifies the points making up a polygon inside which the viewer is allowed to move. Each point is treated as a two-dimensional point, and must be located at ground level (that is, its y coordinate must be 0).">XRBoundedReferenceSpace/boundsGeometry</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrboundedreferencespace-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRBoundedReferenceSpace" title="The WebXR Device API's XRBoundedReferenceSpace interface describes a virtual world reference space which has preset boundaries. This extends XRReferenceSpace, which describes an essentially unrestricted space around the viewer's position. These bounds are defined using an array of points, each of which defines a vertex in a polygon inside which the user is allowed to move.">XRBoundedReferenceSpace</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrframe-getpose"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/getPose" title="The XRFrame method getPose() returns the relative position and orientation—the pose—of one XRSpace to that of another space. With this, you can observe the motion of objects relative to each other and to fixed locations throughout the scene.">XRFrame/getPose</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrframe-getviewerpose"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/getViewerPose" title="The getViewerPose() method, a member of the XRFrame interface, returns a XRViewerPose object which describes the viewer's pose (position and orientation) relative to the specified reference space.">XRFrame/getViewerPose</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrframe-session"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/session" title="An XRFrame object's read-only session property returns the XRSession object that generated the frame.">XRFrame/session</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrframe-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRFrame" title="A WebXR Device API XRFrame object is passed into the requestAnimationFrame() callback function and provides access to the information needed in order to render a single frame of animation for an XRSession describing a VR or AR scene. Events which communicate the tracking state of objects also provide an XRFrame reference as part of their structure.">XRFrame</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsource-gripspace"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSource/gripSpace" title="The read-only XRInputSource property gripSpace returns an XRSpace whose native origin tracks the pose used to render virtual objects so they appear to be held in (or part of) the user's hand. For example, if a user were holding a virtual straight rod, the native origin of this XRSpace would be located at the approximate center of mass of the user's fist.">XRInputSource/gripSpace</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsource-handedness"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSource/handedness" title="The read-only XRInputSource property handedness indicates which of the user's hands the WebXR input source is associated with, or if it's not associated with a hand at all.">XRInputSource/handedness</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsource-profiles"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSource/profiles" title="The read-only XRInputSource property profiles returns an array of strings, each describing a configuration profile for the input source. The profile strings are listed in order of specificity, with the most specific profile listed first.">XRInputSource/profiles</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsource-targetraymode"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSource/targetRayMode" title="The read-only XRInputSource property targetRayMode indicates the method by which the target ray for the input source should be generated and how it should be presented to the user.">XRInputSource/targetRayMode</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsource-targetrayspace"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSource/targetRaySpace" title="The read-only XRInputSource property targetRaySpace returns an XRSpace (typically an XRReferenceSpace) representing the position and orientation of the target ray in the virtual space. Its native origin tracks the position of the origin point of the target ray, and its orientation indicates the orientation of the controller device itself. These values, interpreted in the context of the input source's targetRayMode, can be used both to fully interpret the device as an input source.">XRInputSource/targetRaySpace</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrinputsource-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSource" title="The WebXR Device API's XRInputSource interface describes a single source of control input which is part of the user's WebXR-compatible virtual or augmented reality system. The device is specific to the platform being used, but provides the direction in which it is being aimed and optionally may generate events if the user triggers performs actions using the device.">XRInputSource</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsourcearray-length"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceArray/length" title="The read-only length property returns an integer value indicating the number of items in the input source list represented by the XRInputSourceArray object.">XRInputSourceArray/length</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrinputsourcearray-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceArray" title="The interface XRInputSourceArray represents a live list of WebXR input sources, and is used as the return value of the XRSession property inputSources. Each entry is an XRInputSource representing one input device connected to the WebXR system.">XRInputSourceArray</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsourceevent-xrinputsourceevent"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceEvent/XRInputSourceEvent" title="The XRInputSourceEvent() constructor creates and returns a new XRInputSourceEvent object describing an event (state change) which has occurred on a WebXR user input device represented by an XRInputSource.">XRInputSourceEvent/XRInputSourceEvent</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsourceevent-frame"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceEvent/frame" title="The read-only XRInputSourceEvent property frame specifies an XRFrame object representing the event frame during which a WebXR user input occurred. This may thus be an event which occurred in the past rather than a current or impending event.">XRInputSourceEvent/frame</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsourceevent-inputsource"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceEvent/inputSource" title="The XRInputSourceEvent interface's read-only inputSource property specifies the XRInputSource which generated the input event. This information lets you handle the event appropriately given the particulars of the user input device being manipulated.">XRInputSourceEvent/inputSource</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrinputsourceevent-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceEvent" title="The WebXR Device API's XRInputSourceEvent interface describes an event which has occurred on a WebXR user input device such as a hand controller, gaze tracking system, or motion tracking system. More specifically, they represent a change in the state of an XRInputSource.">XRInputSourceEvent</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsourceschangeevent-xrinputsourceschangeevent"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent/XRInputSourcesChangeEvent" title="The XRInputSourcesChangeEvent() constructor creates and returns a new XRInputSourcesChangeEvent object, representing an update to the list of available WebXR input devices. You won't typically call this constructor yourself, as these events are created and sent to you by the WebXR system.">XRInputSourcesChangeEvent/XRInputSourcesChangeEvent</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsourceschangeevent-added"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent/added" title="The read-only XRInputSourcesChangeEvent property added is a list of zero or more input sources, each identified using an XRInputSource object, which have been newly made available for use.">XRInputSourcesChangeEvent/added</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsourceschangeevent-removed"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent/removed" title="The read-only XRInputSourcesChangeEvent property removed is an array of zero or more XRInputSource objects representing the input sources that have been removed from the XRSession.">XRInputSourcesChangeEvent/removed</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrinputsourceschangeevent-session"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent/session" title="The XRInputSourcesChangeEvent property session specifies the XRSession to which the input source list change event applies.">XRInputSourcesChangeEvent/session</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrinputsourceschangeevent-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourcesChangeEvent" title="The WebXR Device API interface XRInputSourcesChangeEvent is used to represent the inputsourceschange event sent to an XRSession when the set of available WebXR input controllers changes.">XRInputSourcesChangeEvent</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrlayer-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRLayer" title="The XRLayer interface of the WebXR Device API is the base class for WebXR layer types. It inherits methods from EventTarget.">XRLayer</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>84+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>84+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrpose-angularvelocity"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRPose/angularVelocity" title="The angularVelocity read-only property of the XRPose interface is a DOMPointReadOnly describing the angular velocity in radians per second relative to the base XRSpace.">XRPose/angularVelocity</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrpose-emulatedposition"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRPose/emulatedPosition" title="The emulatedPosition read-only attribute of the XRPose interface is a Boolean value indicating whether or not both the position component of the pose's transform is directly taken from the XR device, or it's simulated or computed based on other sources.">XRPose/emulatedPosition</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrpose-linearvelocity"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRPose/linearVelocity" title="The linearVelocity read-only property of the XRPose interface is a DOMPointReadOnly describing the linear velocity in meters per second relative to the base XRSpace.">XRPose/linearVelocity</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrpose-transform"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRPose/transform" title="The transform read-only attribute of the XRPose interface is a XRRigidTransform object providing the position and orientation of the pose relative to the base XRSpace as specified when the pose was obtained by calling XRFrame.getPose().">XRPose/transform</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrpose-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRPose" title="XRPose is a WebXR API interface representing a position and orientation in the 3D space, relative to the XRSpace within which it resides. The XRSpace—which is either an XRReferenceSpace or an XRBoundedReferenceSpace—defines the coordinate system used for the pose and, in the case of an XRViewerPose, its underlying views.">XRPose</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrreferencespace-getoffsetreferencespace"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace/getOffsetReferenceSpace" title="The XRReferenceSpace interface's getOffsetReferenceSpace() method returns a new reference space object which describes the relative difference in position between the object on which the method is called and a given point in 3D space. The object returned by getOffsetReferenceSpace() is an XRReferenceSpace if called on an XRReferenceSpace, or an XRBoundedReferenceSpace if called on an object of that type.">XRReferenceSpace/getOffsetReferenceSpace</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrreferencespace-reset"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace/reset_event" title="The reset event is sent to an XRReferenceSpace object when a discontinuity is detected in either the native origin or the effective origin, causing a jump in the position or orientation of objects oriented using the reference space. This is common when the user calibrates or recalibrates an XR device, or if the device automatically changes its origin after losing tracking of the user, then re-gaining it.">XRReferenceSpace/reset_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrreferencespace-onreset"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace/reset_event" title="The reset event is sent to an XRReferenceSpace object when a discontinuity is detected in either the native origin or the effective origin, causing a jump in the position or orientation of objects oriented using the reference space. This is common when the user calibrates or recalibrates an XR device, or if the device automatically changes its origin after losing tracking of the user, then re-gaining it.">XRReferenceSpace/reset_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrreferencespace-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace" title="The WebXR Device API's XRReferenceSpace interface describes the coordinate system for a specific tracked entity or object within the virtual world using a specified tracking behavior. The tracking behavior is defined by the selected reference space type. It expands upon the base class, XRSpace, by adding support for several different tracking behaviors as well as to request a new reference space which describes the offset transform between the tracked object and another location in the world.">XRReferenceSpace</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrreferencespaceevent-xrreferencespaceevent"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceEvent/XRReferenceSpaceEvent" title="The XRReferenceSpaceEvent() constructor is used to create a new XRReferenceSpaceEvent object, which represents an event regarding the state of a WebXR reference space object, XRReferenceSpace.">XRReferenceSpaceEvent/XRReferenceSpaceEvent</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrreferencespaceevent-referencespace"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceEvent/referenceSpace" title="The read-only XRReferenceSpaceEvent property referenceSpace specifies the reference space which is the originator of the event.">XRReferenceSpaceEvent/referenceSpace</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrreferencespaceevent-transform"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceEvent/transform" title="The read-only XRReferenceSpaceEvent property transform indicates the position and orientation of the affected referenceSpace's native origin after the changes the event represents are applied. The transform is defined using the old coordinate system, which allows it to be used to convert coordinates from the pre-event coordinate system to the post-event coordinate system.">XRReferenceSpaceEvent/transform</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrreferencespaceevent-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceEvent" title="The WebXR Device API interface XRReferenceSpaceEvent represents an event sent to an XRReferenceSpace. Currently, the only event that uses this type is the reset event.">XRReferenceSpaceEvent</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrrenderstate-baselayer"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRenderState/baseLayer" title="The read-only baseLayer property of the XRRenderState interface returns the XRWebGLLayer instance that is the source of bitmap images and a description of how the image is to be rendered in the device.">XRRenderState/baseLayer</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrrenderstate-depthfar"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRenderState/depthFar" title="The depthFar read-only property of the XRRenderState interface returns the distance in meters of the far clip plane from the viewer.">XRRenderState/depthFar</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrrenderstate-depthnear"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRenderState/depthNear" title="The depthNear read-only property of the XRRenderState interface returns the distance in meters of the near clip plane from the viewer.">XRRenderState/depthNear</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrrenderstate-inlineverticalfieldofview"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRenderState/inlineVerticalFieldOfView" title="The read-only inlineVerticalFieldOfView property of the XRRenderState interface returns the default vertical field of view for "inline" sessions and null for all immersive sessions.">XRRenderState/inlineVerticalFieldOfView</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrrenderstate-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRenderState" title="The XRRenderState interface of the WebXR Device API contains configurable values which affect how the imagery generated by an XRSession gets composited. These properties include the range of distances from the viewer within which content should be rendered, the vertical field of view (for inline presentations), and a reference to the XRWebGLLayer being used as the target for rendering the scene prior to it being presented on the XR device's display or displays.">XRRenderState</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrrigidtransform-xrrigidtransform"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRigidTransform/XRRigidTransform" title="The XRRigidTransform() constructor creates a new XRRigidTransform object, representing the position and orientation of a point or object. Among other things, XRRigidTransform is used when providing a transform to translate between coordinate systems across spaces.">XRRigidTransform/XRRigidTransform</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrrigidtransform-inverse"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRigidTransform/inverse" title="The read-only inverse property of the XRRigidTransform interface returns another XRRigidTransform object which is the inverse of its owning transform. That is, you can always get the inverse of any XRRigidTransform using its inverse property, instead of having to explicitly generate it.">XRRigidTransform/inverse</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrrigidtransform-matrix"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRigidTransform/matrix" title="The read-only XRRigidTransform property matrix returns the transform matrix represented by the object. The returned matrix can then be premultiplied with a column vector to rotate the vector by the 3D rotation specified by the orientation, then translate it by the position.">XRRigidTransform/matrix</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrrigidtransform-orientation"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRigidTransform/orientation" title="The read-only XRRigidTransform property orientation is a DOMPointReadOnly containing a normalized quaternion (also called a unit quaternion or versor) specifying the rotational component of the transform represented by the object. If you specify a quaternion whose length is not exactly 1.0 meters, it will be normalized for you.">XRRigidTransform/orientation</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrrigidtransform-position"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRigidTransform/position" title="The read-only XRRigidTransform property position is a DOMPointReadOnly object which provides the 3D point, specified in meters, describing the translation component of the transform.">XRRigidTransform/position</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrrigidtransform-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRRigidTransform" title="The XRRigidTransform is a WebXR API interface that represents the 3D geometric transform described by a position and orientation.">XRRigidTransform</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-cancelanimationframe"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/cancelAnimationFrame" title="The cancelAnimationFrame() method of the XRSession interface cancels an animation frame which was previously requested by calling requestAnimationFrame.">XRSession/cancelAnimationFrame</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-end"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/end" title="The end() method shuts down the XRSession on which it's called, returning a promise which resolves once the session has fully shut down.">XRSession/end</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsession-end"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/end_event" title="An end event is fired at an XRSession object when the WebXR session has ended, either because the web application has chosen to stop the session, or because the user agent terminated the session.">XRSession/end_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-onend"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/end_event" title="An end event is fired at an XRSession object when the WebXR session has ended, either because the web application has chosen to stop the session, or because the user agent terminated the session.">XRSession/end_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-inputsources"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/inputSources" title="The read-only inputSources property of the XRSession interface returns an XRInputSourceArray object which lists all controllers and input devices which are expressly associated with the XR device and are currently available. These controllers may include handheld controllers, XR-equipped gloves, optically tracked hands, and gaze-based input methods. Keyboards, gamepads, and mice are not considered WebXR input sources.">XRSession/inputSources</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsession-inputsourceschange"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/inputsourceschange_event" title="The inputsourceschange event is sent to an XRSession when the set of available WebXR input devices changes.">XRSession/inputsourceschange_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-oninputsourceschange"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/inputsourceschange_event" title="The inputsourceschange event is sent to an XRSession when the set of available WebXR input devices changes.">XRSession/inputsourceschange_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-renderstate"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/renderState" title="The read-only renderState property of an XRSession object indicates the returns a XRRenderState object describing how the user's environment which should be rendered. The information provided covers the minimum and maximum distance at which to render objects, the vertical field of view to use when rendering the in the inline session mode, and the XRWebGLLayer to render into for inline composition.">XRSession/renderState</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-requestanimationframe"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/requestAnimationFrame" title="The XRSession method requestAnimationFrame(), much like the Window method of the same name, schedules a callback to be executed the next time the browser is ready to paint the session's virtual environment to the XR display. The specified callback is executed once before the next repaint; if you wish for it to be executed for the following repaint, you must call requestAnimationFrame() again. This can be done from within the callback itself.">XRSession/requestAnimationFrame</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-requestreferencespace"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/requestReferenceSpace" title="The requestReferenceSpace() method of the XRSession interface returns a promise that resolves with an instance of either XRReferenceSpace or XRBoundedReferenceSpace as appropriate given the type of reference space requested.">XRSession/requestReferenceSpace</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsession-select"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/select_event" title="The WebXR select event is sent to an XRSession when one of the session's input sources has completed a primary action.">XRSession/select_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-onselect"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/select_event" title="The WebXR select event is sent to an XRSession when one of the session's input sources has completed a primary action.">XRSession/select_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsession-selectend"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/selectend_event" title="The WebXR event selectend is sent to an XRSession when one of its input sources ends its primary action or when an input source that's in the process of handling an ongoing primary action is disconnected without successfully completing the action.">XRSession/selectend_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-onselectend"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/selectend_event" title="The WebXR event selectend is sent to an XRSession when one of its input sources ends its primary action or when an input source that's in the process of handling an ongoing primary action is disconnected without successfully completing the action.">XRSession/selectend_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsession-selectstart"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/selectstart_event" title="The WebXR selectstart event is sent to an XRSession when the user begins a primary action on one of its input sources.">XRSession/selectstart_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-onselectstart"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/selectstart_event" title="The WebXR selectstart event is sent to an XRSession when the user begins a primary action on one of its input sources.">XRSession/selectstart_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsession-squeeze"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/squeeze_event" title="The WebXR squeeze event is sent to an XRSession when one of the session's input sources has completed a primary squeeze action. Examples of common kinds of primary action are users pressing triggers or buttons, tapping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.">XRSession/squeeze_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>83+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>83+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-onsqueeze"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/squeeze_event" title="The WebXR squeeze event is sent to an XRSession when one of the session's input sources has completed a primary squeeze action. Examples of common kinds of primary action are users pressing triggers or buttons, tapping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.">XRSession/squeeze_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>83+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>83+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsession-squeezeend"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/squeezeend_event" title="The WebXR event squeezeend is sent to an XRSession when one of its input sources ends its primary action or when an input source that's in the process of handling an ongoing primary action is disconnected without successfully completing the action.">XRSession/squeezeend_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>83+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>83+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-onsqueezeend"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/squeezeend_event" title="The WebXR event squeezeend is sent to an XRSession when one of its input sources ends its primary action or when an input source that's in the process of handling an ongoing primary action is disconnected without successfully completing the action.">XRSession/squeezeend_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>83+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>83+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsession-squeezestart"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/squeezestart_event" title="The WebXR event squeezestart is sent to an XRSession when the user begins a primary squeeze action on one of its input sources.">XRSession/squeezestart_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>83+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>83+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-onsqueezestart"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/squeezestart_event" title="The WebXR event squeezestart is sent to an XRSession when the user begins a primary squeeze action on one of its input sources.">XRSession/squeezestart_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>83+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>83+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-updaterenderstate"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/updateRenderState" title="The updateRenderState() method of the XRSession interface of the WebXR API schedules changes to be applied to the active render state (XRRenderState) prior to rendering of the next frame.">XRSession/updateRenderState</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsession-visibilitychange"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/visibilitychange_event" title="The visibilitychange event is sent to an XRSession to inform it when it becomes visible or hidden, or when it becomes visible but not currently focused. Upon receiving the event, you can check the value of the session's visibilityState property to determine the new visibility state.">XRSession/visibilitychange_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-onvisibilitychange"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/visibilitychange_event" title="The visibilitychange event is sent to an XRSession to inform it when it becomes visible or hidden, or when it becomes visible but not currently focused. Upon receiving the event, you can check the value of the session's visibilityState property to determine the new visibility state.">XRSession/visibilitychange_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsession-visibilitystate"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession/visibilityState" title="The read-only visibilityState property of the XRSession interface is a string indicating whether the WebXR content is currently visible to the user, and if it is, whether it's the primary focus.">XRSession/visibilityState</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrsession-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSession" title="The WebXR Device API's XRSession interface represents an ongoing XR session, providing methods and properties used to interact with and control the session. To open a WebXR session, use the XRSystem interface's requestSession() method.">XRSession</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsessionevent-xrsessionevent"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSessionEvent/XRSessionEvent" title="The WebXR Device API's XRSessionEvent() constructor creates and returns a new XRSessionEvent object. These objects represent events announcing state changes in an XRSession representing an augmented or virtual reality session.">XRSessionEvent/XRSessionEvent</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsessionevent-session"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSessionEvent/session" title="The read-only XRSessionEvent interface's session property indicates which XRSession the event is about.">XRSessionEvent/session</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrsessionevent-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSessionEvent" title="The WebXR Device API's XRSessionEvent interface describes an event which indicates the change of the state of an XRSession. These events occur, for example, when the session ends or the visibility of its context changes.">XRSessionEvent</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrspace-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSpace" title="The XRSpace interface of the WebXR Device API is an abstract interface providing a common basis for every class which represents a virtual coordinate system within the virtual world, in which its origin corresponds to a physical location. Spatial data in WebXR is always expressed relative to an object based upon one of the descendant interfaces of XRSpace, at the time at which a given XRFrame takes place.">XRSpace</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-xrsystem-devicechange"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/devicechange_event" title="A devicechange event is fired on an XRSystem object whenever the availability of immersive XR devices has changed; for example, a VR headset or AR goggles have been connected or disconnected. It's a generic Event with no added properties.">XRSystem/devicechange_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsystem-ondevicechange"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/devicechange_event" title="A devicechange event is fired on an XRSystem object whenever the availability of immersive XR devices has changed; for example, a VR headset or AR goggles have been connected or disconnected. It's a generic Event with no added properties.">XRSystem/devicechange_event</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsystem-issessionsupported"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/isSessionSupported" title="The XRSystem method isSessionSupported() returns a promise which resolves to true if the specified WebXR session mode is supported by the user's WebXR device. Otherwise, the promise resolves with false.">XRSystem/isSessionSupported</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrsystem-requestsession"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/requestSession" title="The XRSystem interface's requestSession() method returns a promise which resolves to an XRSession object through which you can manage the requested type of WebXR session.">XRSystem/requestSession</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrsystem-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRSystem" title="The WebXR Device API interface XRSystem provides methods which let you get access to an XRSession object representing a WebXR session. With that XRSession in hand, you can use it to interact with the Augmented Reality (AR) or Virtual Reality (VR) device.">XRSystem</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrview-eye"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRView/eye" title="The XRView interface's read-only eye property is a string indicating which eye's viewpoint the XRView represents: left or right. For views which represent neither eye, such as monoscopic views, this property's value is none.">XRView/eye</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrview-projectionmatrix"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRView/projectionMatrix" title="The XRView interface's read-only projectionMatrix property specifies the projection matrix to apply to the underlying view. This should be used to integrate perspective to everything in the scene, in order to ensure the result is consistent with what the eye expects to see.">XRView/projectionMatrix</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrview-recommendedviewportscale"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRView/recommendedViewportScale" title="The read-only recommendedViewportScale property of the XRView interface is the recommended viewport scale value that you can use for XRView.requestViewportScale() if the user agent has such a recommendation; null otherwise.">XRView/recommendedViewportScale</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>90+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>90+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrview-requestviewportscale"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRView/requestViewportScale" title="The requestViewportScale() method of the XRView interface requests that the user agent sets the requested viewport scale for this viewport to the given value. This is used for dynamic viewport scaling which allows rendering to a subset of the WebXR viewport using a scale factor that can be changed every animation frame.">XRView/requestViewportScale</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>90+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>90+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrview-transform"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRView/transform" title="The read-only transform property of the XRView interface is an XRRigidTransform object which provides the position and orientation of the viewpoint relative to the XRReferenceSpace specified when the XRFrame.getViewerPose() method was called to obtain the view object.">XRView/transform</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrview-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRView" title="The WebXR Device API's XRView interface describes a single view into the XR scene for a specific frame, providing orientation and position information for the viewpoint. You can think of it as a description of a specific eye or camera and how it views the world. A 3D frame will involve two views, one for each eye, separated by an appropriate distance which approximates the distance between the viewer's eyes. This allows the two views, when projected in isolation into the appropriate eyes, to simulate a 3D world.">XRView</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrviewerpose-views"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRViewerPose/views" title="The read-only XRViewerPose property views returns an array which contains every XRView which must be rendered in order to fully represent the scene from the viewpoint defined by the viewer pose. For monoscopic devices, this array contains a single view.">XRViewerPose/views</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrviewerpose-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRViewerPose" title="The WebXR Device API interface XRViewerPose represents the pose (the position and orientation) of a viewer's point of view on the scene. Each XRViewerPose can have multiple views to represent, for example, the slight separation between the left and right eye.">XRViewerPose</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrviewport-height"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRViewport/height" title="The read-only XRViewport property height specifies the height, in pixels, of the viewport onto the drawing surface within which the WebXR view is to be rendered. Along with width and the origin point given by x and y, this defines the area within which rendered content will be drawn.">XRViewport/height</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrviewport-width"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRViewport/width" title="The read-only XRViewport property width specifies the width of the viewport, in pixels, onto the drawing surface the 3D scene is to be rendered into. This is defined using this property along with the viewport's height and its origin given by its properties x and y.">XRViewport/width</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrviewport-x"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRViewport/x" title="The read-only XRViewport interface's x property indicates the offset from the left edge of the destination surface (typically a XRWebGLLayer to the left edge of the viewport within the surface into which WebXR content is to be rendered. The viewport's y property identifies the y component of the origin, and its is given by the width and height properties.">XRViewport/x</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrviewport-y"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRViewport/y" title="The read-only XRViewport interface's y property indicates the offset from the bottom edge of the destination surface (typically a XRWebGLLayer to the bottom edge of the viewport within the surface into which WebXR content is to be rendered. The viewport's x property identifies the x component of the origin, and its is given by the width and height properties.">XRViewport/y</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrviewport-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRViewport" title="The WebXR Device API's XRViewport interface provides properties used to describe the size and position of the current viewport within the XRWebGLLayer being used to render the 3D scene.">XRViewport</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrwebgllayer-xrwebgllayer"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/XRWebGLLayer" title="The WebXR Device API XRWebGLLayer() constructor creates and returns a new XRWebGLLayer object, providing the linkage between the WebXR device and the WebGL graphics layer used to render the 3D scene.">XRWebGLLayer/XRWebGLLayer</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrwebgllayer-antialias"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/antialias" title="The read-only XRWebGLLayer property antialias is a Boolean value which is true if the rendering layer's frame buffer supports anti-aliasing. Otherwise, this property's value is false. The specific anti-aliasing technique used is left to the user agent's discretion and cannot be specified by the website or web app.">XRWebGLLayer/antialias</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrwebgllayer-fixedfoveation"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/fixedFoveation" title="The fixedFoveation property of the XRWebGLLayer interface is a number indicating the amount of foveation used by the XR compositor. Fixed Foveated Rendering (FFR) renders the edges of the eye textures at a lower resolution than the center and reduces the GPU load.">XRWebGLLayer/fixedFoveation</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrwebgllayer-framebuffer"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/framebuffer" title="The read-only XRWebGLLayer property framebuffer is an opaque WebGLFramebuffer which is used to buffer the rendered image if the XR compositor is being used. Otherwise, this property's value is null. The opaque framebuffer is functionally nearly the same as a standard WebGL framebuffer, except for the differences covered in the section How opaque framebuffers are special below.">XRWebGLLayer/framebuffer</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrwebgllayer-framebufferheight"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/framebufferHeight" title="The read-only XRWebGLLayer property framebufferHeight indicates the height of the framebuffer, in pixels.">XRWebGLLayer/framebufferHeight</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrwebgllayer-framebufferwidth"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/framebufferWidth" title="The read-only XRWebGLLayer property framebufferWidth specifies the width of the framebuffer, in pixels.">XRWebGLLayer/framebufferWidth</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrwebgllayer-getnativeframebufferscalefactor"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/getNativeFramebufferScaleFactor_static" title="The static method XRWebGLLayer.getNativeFramebufferScaleFactor() returns a floating-point scaling factor by which one can multiply the specified XRSession's resolution to get the native resolution of the WebXR device's frame buffer.">XRWebGLLayer/getNativeFramebufferScaleFactor_static</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrwebgllayer-getviewport"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/getViewport" title="The XRWebGLLayer interface's getViewport() method returns the XRViewport that should be used to render the specified XRView into the WebGL layer. For WebXR devices which use a single framebuffer for both the left and right eyes, the returned viewport represents the region of the framebuffer into which the scene should be rendered for the eye represented by the view.">XRWebGLLayer/getViewport</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-xrwebgllayer-ignoredepthvalues"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/ignoreDepthValues" title="The read-only XRWebGLLayer property ignoreDepthValues is a Boolean value which is true if the session has been configured to ignore the values in the depth buffer while rendering the scene. If the depth buffer is being used to determine the position of vertices, this property is false.">XRWebGLLayer/ignoreDepthValues</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="xrwebgllayer-interface"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer" title="The XRWebGLLayer interface of the WebXR Device API provides a linkage between the WebXR device (or simulated XR device, in the case of an inline session) and a WebGL context used to render the scene for display on the device. In particular, it provides access to the WebGL framebuffer and viewport to ease access to the context.">XRWebGLLayer</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android yes"><span>Samsung Internet</span><span>11.2+</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="permissions-policy"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy/xr-spatial-tracking" title="The HTTP Permissions-Policy header xr-spatial-tracking directive controls whether the current document is allowed to use the WebXR Device API.">Headers/Feature-Policy/xr-spatial-tracking</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>None</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/xr-spatial-tracking" title="The HTTP Permissions-Policy header xr-spatial-tracking directive controls whether the current document is allowed to use the WebXR Device API.">Headers/Permissions-Policy/xr-spatial-tracking</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>88+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>88+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>None</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>None</span></span> </div> </div> </details> <script>/* Boilerplate: script-dfn-panel */ "use strict"; { const dfnsJson = window.dfnsJson || {}; function genDfnPanel({dfnID, url, dfnText, refSections, external}) { return mk.aside({ class: "dfn-panel", id: `infopanel-for-${dfnID}`, "data-for": dfnID, "aria-labelled-by":`infopaneltitle-for-${dfnID}`, }, mk.span({id:`infopaneltitle-for-${dfnID}`, style:"display:none"}, `Info about the '${dfnText}' ${external?"external":""} reference.`), mk.a({href:url}, url), mk.b({}, "Referenced in:"), mk.ul({}, ...refSections.map(section=> mk.li({}, ...section.refs.map((ref, refI)=> [ mk.a({ href: `#${ref.id}` }, (refI == 0) ? section.title : `(${refI + 1})` ), " ", ] ), ), ), ), ); } function genAllDfnPanels() { for(const panelData of Object.values(window.dfnpanelData)) { const dfnID = panelData.dfnID; const dfn = document.getElementById(dfnID); if(!dfn) { console.log(`Can't find dfn#${dfnID}.`, panelData); } else { const panel = genDfnPanel(panelData); append(document.body, panel); insertDfnPopupAction(dfn, panel) } } } document.addEventListener("DOMContentLoaded", ()=>{ genAllDfnPanels(); // Add popup behavior to all dfns to show the corresponding dfn-panel. var dfns = queryAll('.dfn-paneled'); for(let dfn of dfns) { ; } document.body.addEventListener("click", (e) => { // If not handled already, just hide all dfn panels. hideAllDfnPanels(); }); }) function hideAllDfnPanels() { // Turn off any currently "on" or "activated" panels. queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(el=>hideDfnPanel(el)); } function showDfnPanel(dfnPanel, dfn) { hideAllDfnPanels(); // Only display one at this time. dfn.setAttribute("aria-expanded", "true"); dfnPanel.classList.add("on"); dfnPanel.style.left = "5px"; dfnPanel.style.top = "0px"; const panelRect = dfnPanel.getBoundingClientRect(); const panelWidth = panelRect.right - panelRect.left; if (panelRect.right > document.body.scrollWidth) { // Panel's overflowing the screen. // Just drop it below the dfn and flip it rightward instead. // This still wont' fix things if the screen is *really* wide, // but fixing that's a lot harder without 'anchor()'. dfnPanel.style.top = "1.5em"; dfnPanel.style.left = "auto"; dfnPanel.style.right = "0px"; } } function pinDfnPanel(dfnPanel) { // Switch it to "activated" state, which pins it. dfnPanel.classList.add("activated"); dfnPanel.style.left = null; dfnPanel.style.top = null; } function hideDfnPanel(dfnPanel, dfn) { if(!dfn) { dfn = document.getElementById(dfnPanel.getAttribute("data-for")); } dfn.setAttribute("aria-expanded", "false") dfnPanel.classList.remove("on"); dfnPanel.classList.remove("activated"); } function toggleDfnPanel(dfnPanel, dfn) { if(dfnPanel.classList.contains("on")) { hideDfnPanel(dfnPanel, dfn); } else { showDfnPanel(dfnPanel, dfn); } } function insertDfnPopupAction(dfn, dfnPanel) { // Find dfn panel const panelWrapper = document.createElement('span'); panelWrapper.appendChild(dfnPanel); panelWrapper.style.position = "relative"; panelWrapper.style.height = "0px"; dfn.insertAdjacentElement("afterend", panelWrapper); dfn.setAttribute('role', 'button'); dfn.setAttribute('aria-expanded', 'false') dfn.tabIndex = 0; dfn.classList.add('has-dfn-panel'); dfn.addEventListener('click', (event) => { showDfnPanel(dfnPanel, dfn); event.stopPropagation(); }); dfn.addEventListener('keypress', (event) => { const kc = event.keyCode; // 32->Space, 13->Enter if(kc == 32 || kc == 13) { toggleDfnPanel(dfnPanel, dfn); event.stopPropagation(); event.preventDefault(); } }); dfnPanel.addEventListener('click', (event) => { if (event.target.nodeName == 'A') { pinDfnPanel(dfnPanel); } event.stopPropagation(); }); dfnPanel.addEventListener('keydown', (event) => { if(event.keyCode == 27) { // Escape key hideDfnPanel(dfnPanel, dfn); event.stopPropagation(); event.preventDefault(); } }) } } </script> <script>/* Boilerplate: script-dfn-panel */ "use strict"; { const dfnsJson = window.dfnsJson || {}; function genDfnPanel({dfnID, url, dfnText, refSections, external}) { return mk.aside({ class: "dfn-panel", id: `infopanel-for-${dfnID}`, "data-for": dfnID, "aria-labelled-by":`infopaneltitle-for-${dfnID}`, }, mk.span({id:`infopaneltitle-for-${dfnID}`, style:"display:none"}, `Info about the '${dfnText}' ${external?"external":""} reference.`), mk.a({href:url}, url), mk.b({}, "Referenced in:"), mk.ul({}, ...refSections.map(section=> mk.li({}, ...section.refs.map((ref, refI)=> [ mk.a({ href: `#${ref.id}` }, (refI == 0) ? section.title : `(${refI + 1})` ), " ", ] ), ), ), ), ); } function genAllDfnPanels() { for(const panelData of Object.values(window.dfnpanelData)) { const dfnID = panelData.dfnID; const dfn = document.getElementById(dfnID); if(!dfn) { console.log(`Can't find dfn#${dfnID}.`, panelData); } else { const panel = genDfnPanel(panelData); append(document.body, panel); insertDfnPopupAction(dfn, panel) } } } document.addEventListener("DOMContentLoaded", ()=>{ genAllDfnPanels(); // Add popup behavior to all dfns to show the corresponding dfn-panel. var dfns = queryAll('.dfn-paneled'); for(let dfn of dfns) { ; } document.body.addEventListener("click", (e) => { // If not handled already, just hide all dfn panels. hideAllDfnPanels(); }); }) function hideAllDfnPanels() { // Turn off any currently "on" or "activated" panels. queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(el=>hideDfnPanel(el)); } function showDfnPanel(dfnPanel, dfn) { hideAllDfnPanels(); // Only display one at this time. dfn.setAttribute("aria-expanded", "true"); dfnPanel.classList.add("on"); dfnPanel.style.left = "5px"; dfnPanel.style.top = "0px"; const panelRect = dfnPanel.getBoundingClientRect(); const panelWidth = panelRect.right - panelRect.left; if (panelRect.right > document.body.scrollWidth) { // Panel's overflowing the screen. // Just drop it below the dfn and flip it rightward instead. // This still wont' fix things if the screen is *really* wide, // but fixing that's a lot harder without 'anchor()'. dfnPanel.style.top = "1.5em"; dfnPanel.style.left = "auto"; dfnPanel.style.right = "0px"; } } function pinDfnPanel(dfnPanel) { // Switch it to "activated" state, which pins it. dfnPanel.classList.add("activated"); dfnPanel.style.left = null; dfnPanel.style.top = null; } function hideDfnPanel(dfnPanel, dfn) { if(!dfn) { dfn = document.getElementById(dfnPanel.getAttribute("data-for")); } dfn.setAttribute("aria-expanded", "false") dfnPanel.classList.remove("on"); dfnPanel.classList.remove("activated"); } function toggleDfnPanel(dfnPanel, dfn) { if(dfnPanel.classList.contains("on")) { hideDfnPanel(dfnPanel, dfn); } else { showDfnPanel(dfnPanel, dfn); } } function insertDfnPopupAction(dfn, dfnPanel) { // Find dfn panel const panelWrapper = document.createElement('span'); panelWrapper.appendChild(dfnPanel); panelWrapper.style.position = "relative"; panelWrapper.style.height = "0px"; dfn.insertAdjacentElement("afterend", panelWrapper); dfn.setAttribute('role', 'button'); dfn.setAttribute('aria-expanded', 'false') dfn.tabIndex = 0; dfn.classList.add('has-dfn-panel'); dfn.addEventListener('click', (event) => { showDfnPanel(dfnPanel, dfn); event.stopPropagation(); }); dfn.addEventListener('keypress', (event) => { const kc = event.keyCode; // 32->Space, 13->Enter if(kc == 32 || kc == 13) { toggleDfnPanel(dfnPanel, dfn); event.stopPropagation(); event.preventDefault(); } }); dfnPanel.addEventListener('click', (event) => { if (event.target.nodeName == 'A') { pinDfnPanel(dfnPanel); } event.stopPropagation(); }); dfnPanel.addEventListener('keydown', (event) => { if(event.keyCode == 27) { // Escape key hideDfnPanel(dfnPanel, dfn); event.stopPropagation(); event.preventDefault(); } }) } } </script> <script>/* Boilerplate: script-dfn-panel-json */ window.dfnpanelData = {}; window.dfnpanelData['85394472'] = {"dfnID": "85394472", "url": "https://dom.spec.whatwg.org/#document", "dfnText": "Document", "refSections": [{"refs": [{"id": "ref-for-document"}], "title": "4.1. XRSession"}], "external": true}; window.dfnpanelData['129bdae8'] = {"dfnID": "129bdae8", "url": "https://dom.spec.whatwg.org/#event", "dfnText": "Event", "refSections": [{"refs": [{"id": "ref-for-event"}], "title": "12.1. XRSessionEvent"}, {"refs": [{"id": "ref-for-event\u2460"}], "title": "12.2. XRInputSourceEvent"}, {"refs": [{"id": "ref-for-event\u2461"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-event\u2462"}], "title": "12.4. XRReferenceSpaceEvent"}], "external": true}; window.dfnpanelData['44a7708c'] = {"dfnID": "44a7708c", "url": "https://dom.spec.whatwg.org/#dictdef-eventinit", "dfnText": "EventInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-eventinit"}], "title": "12.1. XRSessionEvent"}, {"refs": [{"id": "ref-for-dictdef-eventinit\u2460"}], "title": "12.2. XRInputSourceEvent"}, {"refs": [{"id": "ref-for-dictdef-eventinit\u2461"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-dictdef-eventinit\u2462"}], "title": "12.4. XRReferenceSpaceEvent"}], "external": true}; window.dfnpanelData['2bc0cdf4'] = {"dfnID": "2bc0cdf4", "url": "https://dom.spec.whatwg.org/#eventtarget", "dfnText": "EventTarget", "refSections": [{"refs": [{"id": "ref-for-eventtarget"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-eventtarget\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-eventtarget\u2461"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-eventtarget\u2462"}], "title": "11.1. XRLayer"}], "external": true}; window.dfnpanelData['80159636'] = {"dfnID": "80159636", "url": "https://dom.spec.whatwg.org/#concept-tree-ancestor", "dfnText": "ancestor", "refSections": [{"refs": [{"id": "ref-for-concept-tree-ancestor"}], "title": "13.2. User intention"}], "external": true}; window.dfnpanelData['2e9f6464'] = {"dfnID": "2e9f6464", "url": "https://dom.spec.whatwg.org/#canceled-flag", "dfnText": "canceled flag", "refSections": [{"refs": [{"id": "ref-for-canceled-flag"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['da8b8e0e'] = {"dfnID": "da8b8e0e", "url": "https://dom.spec.whatwg.org/#concept-tree-descendant", "dfnText": "descendant", "refSections": [{"refs": [{"id": "ref-for-concept-tree-descendant"}], "title": "13.2. User intention"}], "external": true}; window.dfnpanelData['1372f92a'] = {"dfnID": "1372f92a", "url": "https://dom.spec.whatwg.org/#concept-event-dispatch", "dfnText": "dispatch", "refSections": [{"refs": [{"id": "ref-for-concept-event-dispatch"}], "title": "12.2. XRInputSourceEvent"}], "external": true}; window.dfnpanelData['5fd23811'] = {"dfnID": "5fd23811", "url": "https://dom.spec.whatwg.org/#concept-event-fire", "dfnText": "fire an event", "refSections": [{"refs": [{"id": "ref-for-concept-event-fire"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-concept-event-fire\u2460"}, {"id": "ref-for-concept-event-fire\u2461"}, {"id": "ref-for-concept-event-fire\u2462"}, {"id": "ref-for-concept-event-fire\u2463"}, {"id": "ref-for-concept-event-fire\u2464"}, {"id": "ref-for-concept-event-fire\u2465"}, {"id": "ref-for-concept-event-fire\u2466"}, {"id": "ref-for-concept-event-fire\u2467"}, {"id": "ref-for-concept-event-fire\u2468"}, {"id": "ref-for-concept-event-fire\u2460\u24ea"}, {"id": "ref-for-concept-event-fire\u2460\u2460"}, {"id": "ref-for-concept-event-fire\u2460\u2461"}, {"id": "ref-for-concept-event-fire\u2460\u2462"}], "title": "12.5. Event Types"}], "external": true}; window.dfnpanelData['9d09d04c'] = {"dfnID": "9d09d04c", "url": "https://dom.spec.whatwg.org/#dom-event-type", "dfnText": "type", "refSections": [{"refs": [{"id": "ref-for-dom-event-type"}], "title": "12.2. XRInputSourceEvent"}], "external": true}; window.dfnpanelData['acab177a'] = {"dfnID": "acab177a", "url": "https://tc39.es/ecma262/#sec-isdetachedbuffer", "dfnText": "IsDetachedBuffer", "refSections": [{"refs": [{"id": "ref-for-sec-isdetachedbuffer"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-sec-isdetachedbuffer\u2460"}], "title": "8.3. XRRigidTransform"}], "external": true}; window.dfnpanelData['32132694'] = {"dfnID": "32132694", "url": "https://tc39.es/ecma262/#realm", "dfnText": "realm", "refSections": [{"refs": [{"id": "ref-for-realm"}], "title": "8.3. XRRigidTransform"}, {"refs": [{"id": "ref-for-realm\u2460"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['fc6d6516'] = {"dfnID": "fc6d6516", "url": "https://www.w3.org/TR/geometry-1/#dommatrix", "dfnText": "DOMMatrix", "refSections": [{"refs": [{"id": "ref-for-dommatrix"}], "title": "8.1. Matrices"}], "external": true}; window.dfnpanelData['09dd3a01'] = {"dfnID": "09dd3a01", "url": "https://www.w3.org/TR/geometry-1/#dictdef-dompointinit", "dfnText": "DOMPointInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-dompointinit"}, {"id": "ref-for-dictdef-dompointinit\u2460"}], "title": "8.3. XRRigidTransform"}], "external": true}; window.dfnpanelData['463fdafc'] = {"dfnID": "463fdafc", "url": "https://www.w3.org/TR/geometry-1/#dompointreadonly", "dfnText": "DOMPointReadOnly", "refSections": [{"refs": [{"id": "ref-for-dompointreadonly"}, {"id": "ref-for-dompointreadonly\u2460"}, {"id": "ref-for-dompointreadonly\u2461"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-dompointreadonly\u2462"}], "title": "8.1. Matrices"}, {"refs": [{"id": "ref-for-dompointreadonly\u2463"}, {"id": "ref-for-dompointreadonly\u2464"}, {"id": "ref-for-dompointreadonly\u2465"}, {"id": "ref-for-dompointreadonly\u2466"}, {"id": "ref-for-dompointreadonly\u2467"}, {"id": "ref-for-dompointreadonly\u2468"}], "title": "8.3. XRRigidTransform"}, {"refs": [{"id": "ref-for-dompointreadonly\u2460\u24ea"}, {"id": "ref-for-dompointreadonly\u2460\u2460"}], "title": "9.1. XRPose"}], "external": true}; window.dfnpanelData['013cfbcc'] = {"dfnID": "013cfbcc", "url": "https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-w", "dfnText": "w", "refSections": [{"refs": [{"id": "ref-for-dom-dompointreadonly-w"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-dom-dompointreadonly-w\u2460"}, {"id": "ref-for-dom-dompointreadonly-w\u2461"}, {"id": "ref-for-dom-dompointreadonly-w\u2462"}, {"id": "ref-for-dom-dompointreadonly-w\u2463"}, {"id": "ref-for-dom-dompointreadonly-w\u2464"}], "title": "8.3. XRRigidTransform"}], "external": true}; window.dfnpanelData['c56bac1e'] = {"dfnID": "c56bac1e", "url": "https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-x", "dfnText": "x", "refSections": [{"refs": [{"id": "ref-for-dom-dompointreadonly-x"}, {"id": "ref-for-dom-dompointreadonly-x\u2460"}, {"id": "ref-for-dom-dompointreadonly-x\u2461"}], "title": "8.3. XRRigidTransform"}], "external": true}; window.dfnpanelData['00b07258'] = {"dfnID": "00b07258", "url": "https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-y", "dfnText": "y", "refSections": [{"refs": [{"id": "ref-for-dom-dompointreadonly-y"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-dom-dompointreadonly-y\u2460"}, {"id": "ref-for-dom-dompointreadonly-y\u2461"}, {"id": "ref-for-dom-dompointreadonly-y\u2462"}], "title": "8.3. XRRigidTransform"}], "external": true}; window.dfnpanelData['7cb6dca4'] = {"dfnID": "7cb6dca4", "url": "https://www.w3.org/TR/geometry-1/#dom-dompointreadonly-z", "dfnText": "z", "refSections": [{"refs": [{"id": "ref-for-dom-dompointreadonly-z"}, {"id": "ref-for-dom-dompointreadonly-z\u2460"}, {"id": "ref-for-dom-dompointreadonly-z\u2461"}], "title": "8.3. XRRigidTransform"}], "external": true}; window.dfnpanelData['a0c6f7f7'] = {"dfnID": "a0c6f7f7", "url": "https://www.w3.org/TR/hr-time/#dom-domhighrestimestamp", "dfnText": "DOMHighResTimeStamp", "refSections": [{"refs": [{"id": "ref-for-dom-domhighrestimestamp"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-dom-domhighrestimestamp\u2460"}, {"id": "ref-for-dom-domhighrestimestamp\u2461"}], "title": "5.1. XRFrame"}], "external": true}; window.dfnpanelData['a18023da'] = {"dfnID": "a18023da", "url": "https://www.w3.org/TR/hr-time-3/#dfn-current-high-resolution-time", "dfnText": "current high resolution time", "refSections": [{"refs": [{"id": "ref-for-dfn-current-high-resolution-time"}], "title": "4.3. Animation Frames"}], "external": true}; window.dfnpanelData['f0951476'] = {"dfnID": "f0951476", "url": "https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler", "dfnText": "EventHandler", "refSections": [{"refs": [{"id": "ref-for-eventhandler"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-eventhandler\u2460"}, {"id": "ref-for-eventhandler\u2461"}, {"id": "ref-for-eventhandler\u2462"}, {"id": "ref-for-eventhandler\u2463"}, {"id": "ref-for-eventhandler\u2464"}, {"id": "ref-for-eventhandler\u2465"}, {"id": "ref-for-eventhandler\u2466"}, {"id": "ref-for-eventhandler\u2467"}, {"id": "ref-for-eventhandler\u2468"}, {"id": "ref-for-eventhandler\u2460\u24ea"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-eventhandler\u2460\u2460"}], "title": "6.2. XRReferenceSpace"}], "external": true}; window.dfnpanelData['5b13c537'] = {"dfnID": "5b13c537", "url": "https://html.spec.whatwg.org/multipage/canvas.html#htmlcanvaselement", "dfnText": "HTMLCanvasElement", "refSections": [{"refs": [{"id": "ref-for-htmlcanvaselement"}], "title": "4.2. XRRenderState"}], "external": true}; window.dfnpanelData['be0c27b2'] = {"dfnID": "be0c27b2", "url": "https://html.spec.whatwg.org/multipage/system-state.html#navigator", "dfnText": "Navigator", "refSections": [{"refs": [{"id": "ref-for-navigator"}], "title": "3.1. navigator.xr"}, {"refs": [{"id": "ref-for-navigator\u2460"}], "title": "3.2. XRSystem"}], "external": true}; window.dfnpanelData['5d7209e9'] = {"dfnID": "5d7209e9", "url": "https://html.spec.whatwg.org/multipage/nav-history-apis.html#window", "dfnText": "Window", "refSections": [{"refs": [{"id": "ref-for-window"}, {"id": "ref-for-window\u2460"}, {"id": "ref-for-window\u2461"}, {"id": "ref-for-window\u2462"}, {"id": "ref-for-window\u2463"}, {"id": "ref-for-window\u2464"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-window\u2465"}], "title": "13.5.1. Immersiveness"}], "external": true}; window.dfnpanelData['35972864'] = {"dfnID": "35972864", "url": "https://html.spec.whatwg.org/multipage/document-sequences.html#nav-document", "dfnText": "active document", "refSections": [{"refs": [{"id": "ref-for-nav-document"}], "title": "13.2. User intention"}], "external": true}; window.dfnpanelData['6c7bb277'] = {"dfnID": "6c7bb277", "url": "https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-appversion", "dfnText": "appVersion", "refSections": [{"refs": [{"id": "ref-for-dom-navigator-appversion"}], "title": "13.8.2. Considerations for when to automatically grant \"xr-session-supported\""}], "external": true}; window.dfnpanelData['faf954d6'] = {"dfnID": "faf954d6", "url": "https://html.spec.whatwg.org/multipage/browsers.html#browsing-context", "dfnText": "browsing context", "refSections": [{"refs": [{"id": "ref-for-browsing-context"}, {"id": "ref-for-browsing-context\u2460"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-browsing-context\u2461"}], "title": "13.2. User intention"}, {"refs": [{"id": "ref-for-browsing-context\u2462"}], "title": "13.2.4. Duration of consent"}, {"refs": [{"id": "ref-for-browsing-context\u2463"}, {"id": "ref-for-browsing-context\u2464"}, {"id": "ref-for-browsing-context\u2465"}, {"id": "ref-for-browsing-context\u2466"}], "title": "13.7. Context Isolation"}], "external": true}; window.dfnpanelData['ce3d2bbb'] = {"dfnID": "ce3d2bbb", "url": "https://html.spec.whatwg.org/multipage/webappapis.html#current-global-object", "dfnText": "current global object", "refSections": [{"refs": [{"id": "ref-for-current-global-object"}], "title": "13.5.2. Poses"}], "external": true}; window.dfnpanelData['be15b25b'] = {"dfnID": "be15b25b", "url": "https://html.spec.whatwg.org/multipage/webappapis.html#current", "dfnText": "current realm", "refSections": [{"refs": [{"id": "ref-for-current"}, {"id": "ref-for-current\u2460"}, {"id": "ref-for-current\u2461"}], "title": "8.3. XRRigidTransform"}], "external": true}; window.dfnpanelData['5a0d3e81'] = {"dfnID": "5a0d3e81", "url": "https://html.spec.whatwg.org/multipage/interaction.html#currently-focused-area-of-a-top-level-browsing-context", "dfnText": "currently focused area", "refSections": [{"refs": [{"id": "ref-for-currently-focused-area-of-a-top-level-browsing-context"}], "title": "13.6. Trusted Environment"}], "external": true}; window.dfnpanelData['03675365'] = {"dfnID": "03675365", "url": "https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes", "dfnText": "event handler idl attribute", "refSections": [{"refs": [{"id": "ref-for-event-handler-idl-attributes"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-event-handler-idl-attributes\u2460"}, {"id": "ref-for-event-handler-idl-attributes\u2461"}, {"id": "ref-for-event-handler-idl-attributes\u2462"}, {"id": "ref-for-event-handler-idl-attributes\u2463"}, {"id": "ref-for-event-handler-idl-attributes\u2464"}, {"id": "ref-for-event-handler-idl-attributes\u2465"}, {"id": "ref-for-event-handler-idl-attributes\u2466"}, {"id": "ref-for-event-handler-idl-attributes\u2467"}, {"id": "ref-for-event-handler-idl-attributes\u2468"}, {"id": "ref-for-event-handler-idl-attributes\u2460\u24ea"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-event-handler-idl-attributes\u2460\u2460"}], "title": "6.2. XRReferenceSpace"}], "external": true}; window.dfnpanelData['9c69a1e4'] = {"dfnID": "9c69a1e4", "url": "https://html.spec.whatwg.org#dom-focus-dev", "dfnText": "focus", "refSections": [{"refs": [{"id": "ref-for-dom-focus-dev"}], "title": "4.1. XRSession"}], "external": true}; window.dfnpanelData['a72449dd'] = {"dfnID": "a72449dd", "url": "https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel", "dfnText": "in parallel", "refSections": [{"refs": [{"id": "ref-for-in-parallel"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-in-parallel\u2460"}, {"id": "ref-for-in-parallel\u2461"}, {"id": "ref-for-in-parallel\u2462"}, {"id": "ref-for-in-parallel\u2463"}, {"id": "ref-for-in-parallel\u2464"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-in-parallel\u2465"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-in-parallel\u2466"}, {"id": "ref-for-in-parallel\u2467"}, {"id": "ref-for-in-parallel\u2468"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['a0768d9f'] = {"dfnID": "a0768d9f", "url": "https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator", "dfnText": "navigator", "refSections": [{"refs": [{"id": "ref-for-dom-navigator"}], "title": "3.2. XRSystem"}], "external": true}; window.dfnpanelData['a944ac4c'] = {"dfnID": "a944ac4c", "url": "https://html.spec.whatwg.org/multipage/origin.html#concept-origin", "dfnText": "origin", "refSections": [{"refs": [{"id": "ref-for-concept-origin"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-concept-origin\u2460"}, {"id": "ref-for-concept-origin\u2461"}], "title": "11.3. WebGL Context Compatibility"}, {"refs": [{"id": "ref-for-concept-origin\u2462"}], "title": "12.5. Event Types"}, {"refs": [{"id": "ref-for-concept-origin\u2463"}], "title": "13.2.4. Duration of consent"}, {"refs": [{"id": "ref-for-concept-origin\u2464"}], "title": "14.1. Permissions Policy"}, {"refs": [{"id": "ref-for-concept-origin\u2465"}, {"id": "ref-for-concept-origin\u2466"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['a41102eb'] = {"dfnID": "a41102eb", "url": "https://html.spec.whatwg.org/multipage/dom.html#concept-document-permissions-policy", "dfnText": "permissions policy", "refSections": [{"refs": [{"id": "ref-for-concept-document-permissions-policy"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-concept-document-permissions-policy\u2460"}], "title": "14.1. Permissions Policy"}], "external": true}; window.dfnpanelData['9a517a7d'] = {"dfnID": "9a517a7d", "url": "https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task", "dfnText": "queue a task", "refSections": [{"refs": [{"id": "ref-for-queue-a-task"}, {"id": "ref-for-queue-a-task\u2460"}, {"id": "ref-for-queue-a-task\u2461"}, {"id": "ref-for-queue-a-task\u2462"}, {"id": "ref-for-queue-a-task\u2463"}, {"id": "ref-for-queue-a-task\u2464"}, {"id": "ref-for-queue-a-task\u2465"}, {"id": "ref-for-queue-a-task\u2466"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-queue-a-task\u2467"}, {"id": "ref-for-queue-a-task\u2468"}, {"id": "ref-for-queue-a-task\u2460\u24ea"}, {"id": "ref-for-queue-a-task\u2460\u2460"}, {"id": "ref-for-queue-a-task\u2460\u2461"}, {"id": "ref-for-queue-a-task\u2460\u2462"}, {"id": "ref-for-queue-a-task\u2460\u2463"}, {"id": "ref-for-queue-a-task\u2460\u2464"}, {"id": "ref-for-queue-a-task\u2460\u2465"}, {"id": "ref-for-queue-a-task\u2460\u2466"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-queue-a-task\u2460\u2467"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-queue-a-task\u2460\u2468"}, {"id": "ref-for-queue-a-task\u2461\u24ea"}, {"id": "ref-for-queue-a-task\u2461\u2460"}, {"id": "ref-for-queue-a-task\u2461\u2461"}, {"id": "ref-for-queue-a-task\u2461\u2462"}, {"id": "ref-for-queue-a-task\u2461\u2463"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-queue-a-task\u2461\u2464"}, {"id": "ref-for-queue-a-task\u2461\u2465"}, {"id": "ref-for-queue-a-task\u2461\u2466"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-queue-a-task\u2461\u2467"}, {"id": "ref-for-queue-a-task\u2461\u2468"}, {"id": "ref-for-queue-a-task\u2462\u24ea"}, {"id": "ref-for-queue-a-task\u2462\u2460"}, {"id": "ref-for-queue-a-task\u2462\u2461"}, {"id": "ref-for-queue-a-task\u2462\u2462"}, {"id": "ref-for-queue-a-task\u2462\u2463"}], "title": "11.3. WebGL Context Compatibility"}, {"refs": [{"id": "ref-for-queue-a-task\u2462\u2464"}], "title": "12. Events"}], "external": true}; window.dfnpanelData['e99bd18e'] = {"dfnID": "e99bd18e", "url": "https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-global", "dfnText": "relevant global object", "refSections": [{"refs": [{"id": "ref-for-concept-relevant-global"}, {"id": "ref-for-concept-relevant-global\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-concept-relevant-global\u2461"}], "title": "13.5.2. Poses"}], "external": true}; window.dfnpanelData['5991ccfb'] = {"dfnID": "5991ccfb", "url": "https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm", "dfnText": "relevant realm", "refSections": [{"refs": [{"id": "ref-for-concept-relevant-realm"}, {"id": "ref-for-concept-relevant-realm\u2460"}, {"id": "ref-for-concept-relevant-realm\u2461"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2462"}, {"id": "ref-for-concept-relevant-realm\u2463"}, {"id": "ref-for-concept-relevant-realm\u2464"}, {"id": "ref-for-concept-relevant-realm\u2465"}, {"id": "ref-for-concept-relevant-realm\u2466"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2467"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2468"}, {"id": "ref-for-concept-relevant-realm\u2460\u24ea"}, {"id": "ref-for-concept-relevant-realm\u2460\u2460"}, {"id": "ref-for-concept-relevant-realm\u2460\u2461"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2460\u2462"}, {"id": "ref-for-concept-relevant-realm\u2460\u2463"}, {"id": "ref-for-concept-relevant-realm\u2460\u2464"}, {"id": "ref-for-concept-relevant-realm\u2460\u2465"}, {"id": "ref-for-concept-relevant-realm\u2460\u2466"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2460\u2467"}, {"id": "ref-for-concept-relevant-realm\u2460\u2468"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2461\u24ea"}, {"id": "ref-for-concept-relevant-realm\u2461\u2460"}], "title": "8.3. XRRigidTransform"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2461\u2461"}, {"id": "ref-for-concept-relevant-realm\u2461\u2462"}, {"id": "ref-for-concept-relevant-realm\u2461\u2463"}, {"id": "ref-for-concept-relevant-realm\u2461\u2464"}, {"id": "ref-for-concept-relevant-realm\u2461\u2465"}, {"id": "ref-for-concept-relevant-realm\u2461\u2466"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2461\u2467"}, {"id": "ref-for-concept-relevant-realm\u2461\u2468"}, {"id": "ref-for-concept-relevant-realm\u2462\u24ea"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2462\u2460"}, {"id": "ref-for-concept-relevant-realm\u2462\u2461"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-concept-relevant-realm\u2462\u2462"}, {"id": "ref-for-concept-relevant-realm\u2462\u2463"}], "title": "13.7. Context Isolation"}], "external": true}; window.dfnpanelData['6998ead7'] = {"dfnID": "6998ead7", "url": "https://html.spec.whatwg.org/multipage/webappapis.html#rendering-opportunity", "dfnText": "rendering opportunity", "refSections": [{"refs": [{"id": "ref-for-rendering-opportunity"}, {"id": "ref-for-rendering-opportunity\u2460"}, {"id": "ref-for-rendering-opportunity\u2461"}], "title": "4.3. Animation Frames"}], "external": true}; window.dfnpanelData['e57197d8'] = {"dfnID": "e57197d8", "url": "https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe", "dfnText": "requestAnimationFrame(callback)", "refSections": [{"refs": [{"id": "ref-for-dom-animationframeprovider-requestanimationframe"}, {"id": "ref-for-dom-animationframeprovider-requestanimationframe\u2460"}, {"id": "ref-for-dom-animationframeprovider-requestanimationframe\u2461"}, {"id": "ref-for-dom-animationframeprovider-requestanimationframe\u2462"}, {"id": "ref-for-dom-animationframeprovider-requestanimationframe\u2463"}, {"id": "ref-for-dom-animationframeprovider-requestanimationframe\u2464"}], "title": "4.3. Animation Frames"}], "external": true}; window.dfnpanelData['7393da89'] = {"dfnID": "7393da89", "url": "https://html.spec.whatwg.org/multipage/browsers.html#same-origin", "dfnText": "same origin", "refSections": [{"refs": [{"id": "ref-for-same-origin"}], "title": "13.7. Context Isolation"}], "external": true}; window.dfnpanelData['ae8b1cd4'] = {"dfnID": "ae8b1cd4", "url": "https://html.spec.whatwg.org/multipage/origin.html#same-origin-domain", "dfnText": "same origin-domain", "refSections": [{"refs": [{"id": "ref-for-same-origin-domain"}], "title": "13.2. User intention"}], "external": true}; window.dfnpanelData['c3b2d08c'] = {"dfnID": "c3b2d08c", "url": "https://html.spec.whatwg.org/multipage/webappapis.html#task-source", "dfnText": "task source", "refSections": [{"refs": [{"id": "ref-for-task-source"}], "title": "12. Events"}], "external": true}; window.dfnpanelData['47fe679e'] = {"dfnID": "47fe679e", "url": "https://html.spec.whatwg.org/multipage/interaction.html#transient-activation", "dfnText": "transient activation", "refSections": [{"refs": [{"id": "ref-for-transient-activation"}], "title": "1.2. Application flow"}, {"refs": [{"id": "ref-for-transient-activation\u2460"}], "title": "13.2. User intention"}, {"refs": [{"id": "ref-for-transient-activation\u2461"}], "title": "13.2.1. User activation"}, {"refs": [{"id": "ref-for-transient-activation\u2462"}, {"id": "ref-for-transient-activation\u2463"}], "title": "13.5.1. Immersiveness"}], "external": true}; window.dfnpanelData['3cdef7e1'] = {"dfnID": "3cdef7e1", "url": "https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-useragent", "dfnText": "userAgent", "refSections": [{"refs": [{"id": "ref-for-dom-navigator-useragent"}, {"id": "ref-for-dom-navigator-useragent\u2460"}], "title": "13.8.2. Considerations for when to automatically grant \"xr-session-supported\""}], "external": true}; window.dfnpanelData['3a6b9c7b'] = {"dfnID": "3a6b9c7b", "url": "https://html.spec.whatwg.org/multipage/interaction.html#dom-document-visibilitystate", "dfnText": "visibilitystate", "refSections": [{"refs": [{"id": "ref-for-dom-document-visibilitystate"}], "title": "4.1. XRSession"}], "external": true}; window.dfnpanelData['53275e46'] = {"dfnID": "53275e46", "url": "https://infra.spec.whatwg.org/#list-append", "dfnText": "append", "refSections": [{"refs": [{"id": "ref-for-list-append"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-list-append\u2460"}], "title": "7.1. XRView"}], "external": true}; window.dfnpanelData['ae8def21'] = {"dfnID": "ae8def21", "url": "https://infra.spec.whatwg.org/#list-contain", "dfnText": "contain", "refSections": [{"refs": [{"id": "ref-for-list-contain"}, {"id": "ref-for-list-contain\u2460"}, {"id": "ref-for-list-contain\u2461"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-list-contain\u2462"}, {"id": "ref-for-list-contain\u2463"}, {"id": "ref-for-list-contain\u2464"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-list-contain\u2465"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-list-contain\u2466"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['f937b7b6'] = {"dfnID": "f937b7b6", "url": "https://infra.spec.whatwg.org/#iteration-continue", "dfnText": "continue", "refSections": [{"refs": [{"id": "ref-for-iteration-continue"}, {"id": "ref-for-iteration-continue\u2460"}, {"id": "ref-for-iteration-continue\u2461"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['d8f8bd6e'] = {"dfnID": "d8f8bd6e", "url": "https://infra.spec.whatwg.org/#list-extend", "dfnText": "extend", "refSections": [{"refs": [{"id": "ref-for-list-extend"}, {"id": "ref-for-list-extend\u2460"}, {"id": "ref-for-list-extend\u2461"}, {"id": "ref-for-list-extend\u2462"}], "title": "4.1. XRSession"}], "external": true}; window.dfnpanelData['6b815fdd'] = {"dfnID": "6b815fdd", "url": "https://infra.spec.whatwg.org/#list-is-empty", "dfnText": "is empty", "refSections": [{"refs": [{"id": "ref-for-list-is-empty"}, {"id": "ref-for-list-is-empty\u2460"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['649608b9'] = {"dfnID": "649608b9", "url": "https://infra.spec.whatwg.org/#list", "dfnText": "list", "refSections": [{"refs": [{"id": "ref-for-list"}, {"id": "ref-for-list\u2460"}, {"id": "ref-for-list\u2461"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-list\u2462"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-list\u2463"}, {"id": "ref-for-list\u2464"}, {"id": "ref-for-list\u2465"}, {"id": "ref-for-list\u2466"}, {"id": "ref-for-list\u2467"}, {"id": "ref-for-list\u2468"}, {"id": "ref-for-list\u2460\u24ea"}, {"id": "ref-for-list\u2460\u2460"}, {"id": "ref-for-list\u2460\u2461"}, {"id": "ref-for-list\u2460\u2462"}, {"id": "ref-for-list\u2460\u2463"}, {"id": "ref-for-list\u2460\u2464"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-list\u2460\u2465"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-list\u2460\u2466"}, {"id": "ref-for-list\u2460\u2467"}, {"id": "ref-for-list\u2460\u2468"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-list\u2461\u24ea"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-list\u2461\u2460"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-list\u2461\u2461"}, {"id": "ref-for-list\u2461\u2462"}], "title": "10.3. XRInputSourceArray"}, {"refs": [{"id": "ref-for-list\u2461\u2463"}, {"id": "ref-for-list\u2461\u2464"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-list\u2461\u2465"}, {"id": "ref-for-list\u2461\u2466"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-list\u2461\u2467"}, {"id": "ref-for-list\u2461\u2468"}, {"id": "ref-for-list\u2462\u24ea"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['99c988d6'] = {"dfnID": "99c988d6", "url": "https://infra.spec.whatwg.org/#list-remove", "dfnText": "remove", "refSections": [{"refs": [{"id": "ref-for-list-remove"}, {"id": "ref-for-list-remove\u2460"}, {"id": "ref-for-list-remove\u2461"}, {"id": "ref-for-list-remove\u2462"}], "title": "4.1. XRSession"}], "external": true}; window.dfnpanelData['15e48c39'] = {"dfnID": "15e48c39", "url": "https://infra.spec.whatwg.org/#ordered-set", "dfnText": "set", "refSections": [{"refs": [{"id": "ref-for-ordered-set"}, {"id": "ref-for-ordered-set\u2460"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-ordered-set\u2461"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-ordered-set\u2462"}], "title": "4.1. XRSession"}], "external": true}; window.dfnpanelData['0204d188'] = {"dfnID": "0204d188", "url": "https://infra.spec.whatwg.org/#list-size", "dfnText": "size", "refSections": [{"refs": [{"id": "ref-for-list-size"}], "title": "3.2. XRSystem"}], "external": true}; window.dfnpanelData['0698d556'] = {"dfnID": "0698d556", "url": "https://infra.spec.whatwg.org/#string", "dfnText": "string", "refSections": [{"refs": [{"id": "ref-for-string"}], "title": "2.1. XR device"}], "external": true}; window.dfnpanelData['0e8de730'] = {"dfnID": "0e8de730", "url": "https://infra.spec.whatwg.org/#tuple", "dfnText": "tuple", "refSections": [{"refs": [{"id": "ref-for-tuple"}, {"id": "ref-for-tuple\u2460"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['0c8dc052'] = {"dfnID": "0c8dc052", "url": "https://www.w3.org/TR/orientation-sensor/#absoluteorientationsensor", "dfnText": "AbsoluteOrientationSensor", "refSections": [{"refs": [{"id": "ref-for-absoluteorientationsensor"}], "title": "1. Introduction"}], "external": true}; window.dfnpanelData['64da46e8'] = {"dfnID": "64da46e8", "url": "https://www.w3.org/TR/orientation-sensor/#relativeorientationsensor", "dfnText": "RelativeOrientationSensor", "refSections": [{"refs": [{"id": "ref-for-relativeorientationsensor"}], "title": "1. Introduction"}], "external": true}; window.dfnpanelData['03efcfde'] = {"dfnID": "03efcfde", "url": "https://www.w3.org/TR/permissions/#dom-permissiondescriptor", "dfnText": "PermissionDescriptor", "refSections": [{"refs": [{"id": "ref-for-dom-permissiondescriptor"}], "title": "13.8.1. Fingerprinting considerations of isSessionSupported()"}, {"refs": [{"id": "ref-for-dom-permissiondescriptor\u2460"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['4036a132'] = {"dfnID": "4036a132", "url": "https://www.w3.org/TR/permissions/#dom-permissionstatus", "dfnText": "PermissionStatus", "refSections": [{"refs": [{"id": "ref-for-dom-permissionstatus"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['a849381c'] = {"dfnID": "a849381c", "url": "https://www.w3.org/TR/permissions/#dom-permissionstate-denied", "dfnText": "denied", "refSections": [{"refs": [{"id": "ref-for-dom-permissionstate-denied"}, {"id": "ref-for-dom-permissionstate-denied\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-permissionstate-denied\u2461"}, {"id": "ref-for-dom-permissionstate-denied\u2462"}, {"id": "ref-for-dom-permissionstate-denied\u2463"}, {"id": "ref-for-dom-permissionstate-denied\u2464"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['b5775905'] = {"dfnID": "b5775905", "url": "https://www.w3.org/TR/permissions/#dom-permissionstate-granted", "dfnText": "granted", "refSections": [{"refs": [{"id": "ref-for-dom-permissionstate-granted"}, {"id": "ref-for-dom-permissionstate-granted\u2460"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['3804f39d'] = {"dfnID": "3804f39d", "url": "https://www.w3.org/TR/permissions/#dom-permissiondescriptor-name", "dfnText": "name", "refSections": [{"refs": [{"id": "ref-for-dom-permissiondescriptor-name"}], "title": "13.8.1. Fingerprinting considerations of isSessionSupported()"}, {"refs": [{"id": "ref-for-dom-permissiondescriptor-name\u2460"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['d8705310'] = {"dfnID": "d8705310", "url": "https://www.w3.org/TR/permissions/#dfn-permission-descriptor-type", "dfnText": "permission descriptor type", "refSections": [{"refs": [{"id": "ref-for-dfn-permission-descriptor-type"}], "title": "13.8.1. Fingerprinting considerations of isSessionSupported()"}, {"refs": [{"id": "ref-for-dfn-permission-descriptor-type\u2460"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['2d58565c'] = {"dfnID": "2d58565c", "url": "https://www.w3.org/TR/permissions/#dfn-permission-query-algorithm", "dfnText": "permission query algorithm", "refSections": [{"refs": [{"id": "ref-for-dfn-permission-query-algorithm"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['c9842981'] = {"dfnID": "c9842981", "url": "https://www.w3.org/TR/permissions/#dfn-permission-result-type", "dfnText": "permission result type", "refSections": [{"refs": [{"id": "ref-for-dfn-permission-result-type"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['01082766'] = {"dfnID": "01082766", "url": "https://www.w3.org/TR/permissions/#dfn-permission-state", "dfnText": "permission state", "refSections": [{"refs": [{"id": "ref-for-dfn-permission-state"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['27daf463'] = {"dfnID": "27daf463", "url": "https://www.w3.org/TR/permissions/#dfn-powerful-feature", "dfnText": "powerful feature", "refSections": [{"refs": [{"id": "ref-for-dfn-powerful-feature"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dfn-powerful-feature\u2460"}], "title": "13.8.1. Fingerprinting considerations of isSessionSupported()"}, {"refs": [{"id": "ref-for-dfn-powerful-feature\u2461"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['85dc4077'] = {"dfnID": "85dc4077", "url": "https://www.w3.org/TR/permissions/#dom-permissionstate-prompt", "dfnText": "prompt", "refSections": [{"refs": [{"id": "ref-for-dom-permissionstate-prompt"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['756a432d'] = {"dfnID": "756a432d", "url": "https://www.w3.org/TR/permissions/#dfn-request-permission-to-use", "dfnText": "request permission to use", "refSections": [{"refs": [{"id": "ref-for-dfn-request-permission-to-use"}], "title": "3.2. XRSystem"}], "external": true}; window.dfnpanelData['73533f9c'] = {"dfnID": "73533f9c", "url": "https://www.w3.org/TR/permissions/#dom-permissionstatus-state", "dfnText": "state", "refSections": [{"refs": [{"id": "ref-for-dom-permissionstatus-state"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-permissionstatus-state\u2460"}, {"id": "ref-for-dom-permissionstatus-state\u2461"}, {"id": "ref-for-dom-permissionstatus-state\u2462"}, {"id": "ref-for-dom-permissionstatus-state\u2463"}, {"id": "ref-for-dom-permissionstatus-state\u2464"}, {"id": "ref-for-dom-permissionstatus-state\u2465"}, {"id": "ref-for-dom-permissionstatus-state\u2466"}, {"id": "ref-for-dom-permissionstatus-state\u2467"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['c88e6590'] = {"dfnID": "c88e6590", "url": "https://www.w3.org/TR/permissions-policy-1/#policy-controlled-feature-default-allowlist", "dfnText": "default allowlist", "refSections": [{"refs": [{"id": "ref-for-policy-controlled-feature-default-allowlist"}], "title": "14.1. Permissions Policy"}], "external": true}; window.dfnpanelData['4ed2f1ff'] = {"dfnID": "4ed2f1ff", "url": "https://www.w3.org/TR/permissions-policy-1/#policy-controlled-feature", "dfnText": "policy-controlled feature", "refSections": [{"refs": [{"id": "ref-for-policy-controlled-feature"}], "title": "14.1. Permissions Policy"}], "external": true}; window.dfnpanelData['bc2ba137'] = {"dfnID": "bc2ba137", "url": "https://www.w3.org/TR/pointerevents/#dfn-primary-pointer", "dfnText": "primary pointer", "refSections": [{"refs": [{"id": "ref-for-dfn-primary-pointer"}], "title": "10.2. Transient input"}], "external": true}; window.dfnpanelData['3cad9654'] = {"dfnID": "3cad9654", "url": "https://www.w3.org/TR/requestidlecallback/#the-requestidlecallback-method", "dfnText": "requestIdleCallback()", "refSections": [{"refs": [{"id": "ref-for-the-requestidlecallback-method"}], "title": "4.3. Animation Frames"}], "external": true}; window.dfnpanelData['f9fd5528'] = {"dfnID": "f9fd5528", "url": "https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.14", "dfnText": "SRGB8", "refSections": [{"refs": [{"id": "ref-for-5.14\u2461"}, {"id": "ref-for-5.14\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['60e993cd'] = {"dfnID": "60e993cd", "url": "https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.14", "dfnText": "SRGB8_ALPHA8", "refSections": [{"refs": [{"id": "ref-for-5.14\u2461"}, {"id": "ref-for-5.14\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['eb6a2780'] = {"dfnID": "eb6a2780", "url": "https://www.khronos.org/registry/webgl/specs/latest/2.0/#WebGL2RenderingContext", "dfnText": "WebGL2RenderingContext", "refSections": [{"refs": [{"id": "ref-for-WebGL2RenderingContext"}, {"id": "ref-for-WebGL2RenderingContext\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['32e2917b'] = {"dfnID": "32e2917b", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase", "dfnText": "FRAMEBUFFER_UNSUPPORTED", "refSections": [{"refs": [{"id": "ref-for-WebGLRenderingContextBase"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-WebGLRenderingContextBase\u2460"}, {"id": "ref-for-WebGLRenderingContextBase\u2461"}, {"id": "ref-for-WebGLRenderingContextBase\u2462"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-WebGLRenderingContextBase\u2463"}, {"id": "ref-for-WebGLRenderingContextBase\u2464"}, {"id": "ref-for-WebGLRenderingContextBase\u2465"}, {"id": "ref-for-WebGLRenderingContextBase\u2466"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['1ea6687d'] = {"dfnID": "1ea6687d", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase", "dfnText": "INVALID_FRAMEBUFFER_OPERATION", "refSections": [{"refs": [{"id": "ref-for-WebGLRenderingContextBase"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-WebGLRenderingContextBase\u2460"}, {"id": "ref-for-WebGLRenderingContextBase\u2461"}, {"id": "ref-for-WebGLRenderingContextBase\u2462"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-WebGLRenderingContextBase\u2463"}, {"id": "ref-for-WebGLRenderingContextBase\u2464"}, {"id": "ref-for-WebGLRenderingContextBase\u2465"}, {"id": "ref-for-WebGLRenderingContextBase\u2466"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['cc56cc84'] = {"dfnID": "cc56cc84", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase", "dfnText": "INVALID_OPERATION", "refSections": [{"refs": [{"id": "ref-for-WebGLRenderingContextBase"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-WebGLRenderingContextBase\u2460"}, {"id": "ref-for-WebGLRenderingContextBase\u2461"}, {"id": "ref-for-WebGLRenderingContextBase\u2462"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-WebGLRenderingContextBase\u2463"}, {"id": "ref-for-WebGLRenderingContextBase\u2464"}, {"id": "ref-for-WebGLRenderingContextBase\u2465"}, {"id": "ref-for-WebGLRenderingContextBase\u2466"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['c37054f1'] = {"dfnID": "c37054f1", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14", "dfnText": "RGB", "refSections": [{"refs": [{"id": "ref-for-5.14"}, {"id": "ref-for-5.14\u2460"}, {"id": "ref-for-5.14\u2463"}, {"id": "ref-for-5.14\u2464"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['1c1d06a6'] = {"dfnID": "1c1d06a6", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14", "dfnText": "RGBA", "refSections": [{"refs": [{"id": "ref-for-5.14"}, {"id": "ref-for-5.14\u2460"}, {"id": "ref-for-5.14\u2463"}, {"id": "ref-for-5.14\u2464"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['10ab0dcf'] = {"dfnID": "10ab0dcf", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLContextAttributes", "dfnText": "WebGLContextAttributes", "refSections": [{"refs": [{"id": "ref-for-WebGLContextAttributes"}, {"id": "ref-for-WebGLContextAttributes\u2460"}, {"id": "ref-for-WebGLContextAttributes\u2461"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-WebGLContextAttributes\u2462"}, {"id": "ref-for-WebGLContextAttributes\u2463"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['4d3afed8'] = {"dfnID": "4d3afed8", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLFramebuffer", "dfnText": "WebGLFramebuffer", "refSections": [{"refs": [{"id": "ref-for-WebGLFramebuffer"}, {"id": "ref-for-WebGLFramebuffer\u2460"}, {"id": "ref-for-WebGLFramebuffer\u2461"}, {"id": "ref-for-WebGLFramebuffer\u2462"}, {"id": "ref-for-WebGLFramebuffer\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['95b96ac0'] = {"dfnID": "95b96ac0", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLObject", "dfnText": "WebGLObject", "refSections": [{"refs": [{"id": "ref-for-WebGLObject"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['6c06778d'] = {"dfnID": "6c06778d", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContext", "dfnText": "WebGLRenderingContext", "refSections": [{"refs": [{"id": "ref-for-WebGLRenderingContext"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-WebGLRenderingContext\u2460"}, {"id": "ref-for-WebGLRenderingContext\u2461"}, {"id": "ref-for-WebGLRenderingContext\u2462"}, {"id": "ref-for-WebGLRenderingContext\u2463"}, {"id": "ref-for-WebGLRenderingContext\u2464"}, {"id": "ref-for-WebGLRenderingContext\u2465"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['7f7e3772'] = {"dfnID": "7f7e3772", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#WebGLRenderingContextBase", "dfnText": "WebGLRenderingContextBase", "refSections": [{"refs": [{"id": "ref-for-WebGLRenderingContextBase"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-WebGLRenderingContextBase\u2460"}, {"id": "ref-for-WebGLRenderingContextBase\u2461"}, {"id": "ref-for-WebGLRenderingContextBase\u2462"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-WebGLRenderingContextBase\u2463"}, {"id": "ref-for-WebGLRenderingContextBase\u2464"}, {"id": "ref-for-WebGLRenderingContextBase\u2465"}, {"id": "ref-for-WebGLRenderingContextBase\u2466"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['9eb20236'] = {"dfnID": "9eb20236", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#actual-context-parameters", "dfnText": "actual context parameters", "refSections": [{"refs": [{"id": "ref-for-actual-context-parameters"}, {"id": "ref-for-actual-context-parameters\u2460"}, {"id": "ref-for-actual-context-parameters\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['69019726'] = {"dfnID": "69019726", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#context-canvas", "dfnText": "canvas", "refSections": [{"refs": [{"id": "ref-for-context-canvas"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['ff0613ea'] = {"dfnID": "ff0613ea", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6", "dfnText": "checkFramebufferStatus", "refSections": [{"refs": [{"id": "ref-for-5.14.6"}, {"id": "ref-for-5.14.6\u2460"}, {"id": "ref-for-5.14.6\u2461"}, {"id": "ref-for-5.14.6\u2462"}, {"id": "ref-for-5.14.6\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['e6e9ebc9'] = {"dfnID": "e6e9ebc9", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11", "dfnText": "clear", "refSections": [{"refs": [{"id": "ref-for-5.14.11"}, {"id": "ref-for-5.14.11\u2460"}, {"id": "ref-for-5.14.11\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['1000528e'] = {"dfnID": "1000528e", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#create-a-drawing-buffer", "dfnText": "create a drawing buffer", "refSections": [{"refs": [{"id": "ref-for-create-a-drawing-buffer"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['901e18bb'] = {"dfnID": "901e18bb", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.1", "dfnText": "create the webgl context", "refSections": [{"refs": [{"id": "ref-for-2.1"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['9ab7cb57'] = {"dfnID": "9ab7cb57", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2", "dfnText": "default framebuffer", "refSections": [{"refs": [{"id": "ref-for-2.2"}, {"id": "ref-for-2.2\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['e6031f8e'] = {"dfnID": "e6031f8e", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6", "dfnText": "deleteFramebuffer", "refSections": [{"refs": [{"id": "ref-for-5.14.6"}, {"id": "ref-for-5.14.6\u2460"}, {"id": "ref-for-5.14.6\u2461"}, {"id": "ref-for-5.14.6\u2462"}, {"id": "ref-for-5.14.6\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['38a85ef5'] = {"dfnID": "38a85ef5", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11", "dfnText": "drawArrays", "refSections": [{"refs": [{"id": "ref-for-5.14.11"}, {"id": "ref-for-5.14.11\u2460"}, {"id": "ref-for-5.14.11\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['387bce46'] = {"dfnID": "387bce46", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11", "dfnText": "drawElements", "refSections": [{"refs": [{"id": "ref-for-5.14.11"}, {"id": "ref-for-5.14.11\u2460"}, {"id": "ref-for-5.14.11\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['1acb6d84'] = {"dfnID": "1acb6d84", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#fire-a-webgl-context-event", "dfnText": "fire a webgl context event", "refSections": [{"refs": [{"id": "ref-for-fire-a-webgl-context-event"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['5ab8d343'] = {"dfnID": "5ab8d343", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6", "dfnText": "framebufferRenderbuffer", "refSections": [{"refs": [{"id": "ref-for-5.14.6"}, {"id": "ref-for-5.14.6\u2460"}, {"id": "ref-for-5.14.6\u2461"}, {"id": "ref-for-5.14.6\u2462"}, {"id": "ref-for-5.14.6\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['966b783c'] = {"dfnID": "966b783c", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6", "dfnText": "framebufferTexture2D", "refSections": [{"refs": [{"id": "ref-for-5.14.6"}, {"id": "ref-for-5.14.6\u2460"}, {"id": "ref-for-5.14.6\u2461"}, {"id": "ref-for-5.14.6\u2462"}, {"id": "ref-for-5.14.6\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['ca0bebec'] = {"dfnID": "ca0bebec", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6", "dfnText": "getFramebufferAttachmentParameter", "refSections": [{"refs": [{"id": "ref-for-5.14.6"}, {"id": "ref-for-5.14.6\u2460"}, {"id": "ref-for-5.14.6\u2461"}, {"id": "ref-for-5.14.6\u2462"}, {"id": "ref-for-5.14.6\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['8b76e0c1'] = {"dfnID": "8b76e0c1", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#CONTEXT_LOST", "dfnText": "handle the context loss", "refSections": [{"refs": [{"id": "ref-for-CONTEXT_LOST"}, {"id": "ref-for-CONTEXT_LOST\u2460"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['9a2add78'] = {"dfnID": "9a2add78", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-object-invalidated-flag", "dfnText": "invalidated", "refSections": [{"refs": [{"id": "ref-for-webgl-object-invalidated-flag"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['ca8286d6'] = {"dfnID": "ca8286d6", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#restore-the-drawing-buffer", "dfnText": "restore the context", "refSections": [{"refs": [{"id": "ref-for-restore-the-drawing-buffer"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['20b818ec'] = {"dfnID": "20b818ec", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.1", "dfnText": "statusMessage", "refSections": [{"refs": [{"id": "ref-for-5.15.1"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['6529f975'] = {"dfnID": "6529f975", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10", "dfnText": "uniformMatrix4fv", "refSections": [{"refs": [{"id": "ref-for-5.14.10"}], "title": "8.1. Matrices"}], "external": true}; window.dfnpanelData['a162c94f'] = {"dfnID": "a162c94f", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-context-lost-flag", "dfnText": "webgl context lost flag", "refSections": [{"refs": [{"id": "ref-for-webgl-context-lost-flag"}, {"id": "ref-for-webgl-context-lost-flag\u2460"}, {"id": "ref-for-webgl-context-lost-flag\u2461"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['a162c94f'] = {"dfnID": "a162c94f", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#webgl-context-lost-flag", "dfnText": "webgl context lost flag (for WebGLRenderingContext)", "refSections": [{"refs": [{"id": "ref-for-webgl-context-lost-flag"}, {"id": "ref-for-webgl-context-lost-flag\u2460"}, {"id": "ref-for-webgl-context-lost-flag\u2461"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['83bce337'] = {"dfnID": "83bce337", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15", "dfnText": "webgl task source", "refSections": [{"refs": [{"id": "ref-for-5.15"}, {"id": "ref-for-5.15\u2460"}, {"id": "ref-for-5.15\u2461"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['17adb4fd'] = {"dfnID": "17adb4fd", "url": "https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4", "dfnText": "webgl viewport", "refSections": [{"refs": [{"id": "ref-for-5.14.4"}, {"id": "ref-for-5.14.4\u2460"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-5.14.4\u2461"}, {"id": "ref-for-5.14.4\u2462"}], "title": "7.3. XRViewport"}, {"refs": [{"id": "ref-for-5.14.4\u2463"}, {"id": "ref-for-5.14.4\u2464"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['d25dfb2c'] = {"dfnID": "d25dfb2c", "url": "https://webidl.spec.whatwg.org/#aborterror", "dfnText": "AbortError", "refSections": [{"refs": [{"id": "ref-for-aborterror"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['dca2de17'] = {"dfnID": "dca2de17", "url": "https://webidl.spec.whatwg.org/#idl-DOMException", "dfnText": "DOMException", "refSections": [{"refs": [{"id": "ref-for-idl-DOMException"}, {"id": "ref-for-idl-DOMException\u2460"}, {"id": "ref-for-idl-DOMException\u2461"}, {"id": "ref-for-idl-DOMException\u2462"}, {"id": "ref-for-idl-DOMException\u2463"}, {"id": "ref-for-idl-DOMException\u2464"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-idl-DOMException\u2465"}, {"id": "ref-for-idl-DOMException\u2466"}, {"id": "ref-for-idl-DOMException\u2467"}, {"id": "ref-for-idl-DOMException\u2468"}], "title": "4.1. XRSession"}], "external": true}; window.dfnpanelData['8855a9aa'] = {"dfnID": "8855a9aa", "url": "https://webidl.spec.whatwg.org/#idl-DOMString", "dfnText": "DOMString", "refSections": [{"refs": [{"id": "ref-for-idl-DOMString"}, {"id": "ref-for-idl-DOMString\u2460"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-idl-DOMString\u2461"}, {"id": "ref-for-idl-DOMString\u2462"}, {"id": "ref-for-idl-DOMString\u2463"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-idl-DOMString\u2464"}, {"id": "ref-for-idl-DOMString\u2465"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-idl-DOMString\u2466"}], "title": "12.1. XRSessionEvent"}, {"refs": [{"id": "ref-for-idl-DOMString\u2467"}], "title": "12.2. XRInputSourceEvent"}, {"refs": [{"id": "ref-for-idl-DOMString\u2468"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-idl-DOMString\u2460\u24ea"}], "title": "12.4. XRReferenceSpaceEvent"}, {"refs": [{"id": "ref-for-idl-DOMString\u2460\u2460"}, {"id": "ref-for-idl-DOMString\u2460\u2461"}, {"id": "ref-for-idl-DOMString\u2460\u2462"}, {"id": "ref-for-idl-DOMString\u2460\u2463"}, {"id": "ref-for-idl-DOMString\u2460\u2464"}, {"id": "ref-for-idl-DOMString\u2460\u2465"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['889e932f'] = {"dfnID": "889e932f", "url": "https://webidl.spec.whatwg.org/#Exposed", "dfnText": "Exposed", "refSections": [{"refs": [{"id": "ref-for-Exposed"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-Exposed\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-Exposed\u2461"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-Exposed\u2462"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-Exposed\u2463"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-Exposed\u2464"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-Exposed\u2465"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-Exposed\u2466"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-Exposed\u2467"}], "title": "7.3. XRViewport"}, {"refs": [{"id": "ref-for-Exposed\u2468"}], "title": "8.3. XRRigidTransform"}, {"refs": [{"id": "ref-for-Exposed\u2460\u24ea"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-Exposed\u2460\u2460"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-Exposed\u2460\u2461"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-Exposed\u2460\u2462"}], "title": "10.3. XRInputSourceArray"}, {"refs": [{"id": "ref-for-Exposed\u2460\u2463"}], "title": "11.1. XRLayer"}, {"refs": [{"id": "ref-for-Exposed\u2460\u2464"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-Exposed\u2460\u2465"}], "title": "12.1. XRSessionEvent"}, {"refs": [{"id": "ref-for-Exposed\u2460\u2466"}], "title": "12.2. XRInputSourceEvent"}, {"refs": [{"id": "ref-for-Exposed\u2460\u2467"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-Exposed\u2460\u2468"}], "title": "12.4. XRReferenceSpaceEvent"}, {"refs": [{"id": "ref-for-Exposed\u2461\u24ea"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['0a296dfe'] = {"dfnID": "0a296dfe", "url": "https://webidl.spec.whatwg.org/#idl-Float32Array", "dfnText": "Float32Array", "refSections": [{"refs": [{"id": "ref-for-idl-Float32Array"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-idl-Float32Array\u2460"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-idl-Float32Array\u2461"}, {"id": "ref-for-idl-Float32Array\u2462"}], "title": "8.1. Matrices"}, {"refs": [{"id": "ref-for-idl-Float32Array\u2463"}, {"id": "ref-for-idl-Float32Array\u2464"}, {"id": "ref-for-idl-Float32Array\u2465"}], "title": "8.3. XRRigidTransform"}], "external": true}; window.dfnpanelData['dcf5fafa'] = {"dfnID": "dcf5fafa", "url": "https://webidl.spec.whatwg.org/#idl-frozen-array", "dfnText": "FrozenArray", "refSections": [{"refs": [{"id": "ref-for-idl-frozen-array"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-idl-frozen-array\u2460"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-idl-frozen-array\u2461"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-idl-frozen-array\u2462"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-idl-frozen-array\u2463"}, {"id": "ref-for-idl-frozen-array\u2464"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-idl-frozen-array\u2465"}, {"id": "ref-for-idl-frozen-array\u2466"}, {"id": "ref-for-idl-frozen-array\u2467"}, {"id": "ref-for-idl-frozen-array\u2468"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['797018a7'] = {"dfnID": "797018a7", "url": "https://webidl.spec.whatwg.org/#invalidstateerror", "dfnText": "InvalidStateError", "refSections": [{"refs": [{"id": "ref-for-invalidstateerror"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-invalidstateerror\u2460"}, {"id": "ref-for-invalidstateerror\u2461"}, {"id": "ref-for-invalidstateerror\u2462"}, {"id": "ref-for-invalidstateerror\u2463"}, {"id": "ref-for-invalidstateerror\u2464"}, {"id": "ref-for-invalidstateerror\u2465"}, {"id": "ref-for-invalidstateerror\u2466"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-invalidstateerror\u2467"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-invalidstateerror\u2468"}, {"id": "ref-for-invalidstateerror\u2460\u24ea"}, {"id": "ref-for-invalidstateerror\u2460\u2460"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-invalidstateerror\u2460\u2461"}], "title": "8.2. Normalization"}, {"refs": [{"id": "ref-for-invalidstateerror\u2460\u2462"}, {"id": "ref-for-invalidstateerror\u2460\u2463"}, {"id": "ref-for-invalidstateerror\u2460\u2464"}, {"id": "ref-for-invalidstateerror\u2460\u2465"}, {"id": "ref-for-invalidstateerror\u2460\u2466"}, {"id": "ref-for-invalidstateerror\u2460\u2467"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-invalidstateerror\u2460\u2468"}, {"id": "ref-for-invalidstateerror\u2461\u24ea"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['c807e273'] = {"dfnID": "c807e273", "url": "https://webidl.spec.whatwg.org/#NewObject", "dfnText": "NewObject", "refSections": [{"refs": [{"id": "ref-for-NewObject"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-NewObject\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-NewObject\u2461"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-NewObject\u2462"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['3182eb71'] = {"dfnID": "3182eb71", "url": "https://webidl.spec.whatwg.org/#notsupportederror", "dfnText": "NotSupportedError", "refSections": [{"refs": [{"id": "ref-for-notsupportederror"}, {"id": "ref-for-notsupportederror\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-notsupportederror\u2461"}, {"id": "ref-for-notsupportederror\u2462"}], "title": "4.1. XRSession"}], "external": true}; window.dfnpanelData['34443090'] = {"dfnID": "34443090", "url": "https://webidl.spec.whatwg.org/#operationerror", "dfnText": "OperationError", "refSections": [{"refs": [{"id": "ref-for-operationerror"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['bdbd19d1'] = {"dfnID": "bdbd19d1", "url": "https://webidl.spec.whatwg.org/#idl-promise", "dfnText": "Promise", "refSections": [{"refs": [{"id": "ref-for-idl-promise"}, {"id": "ref-for-idl-promise\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-idl-promise\u2461"}, {"id": "ref-for-idl-promise\u2462"}, {"id": "ref-for-idl-promise\u2463"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-idl-promise\u2464"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['a5c91173'] = {"dfnID": "a5c91173", "url": "https://webidl.spec.whatwg.org/#SameObject", "dfnText": "SameObject", "refSections": [{"refs": [{"id": "ref-for-SameObject"}], "title": "3.1. navigator.xr"}, {"refs": [{"id": "ref-for-SameObject\u2460"}, {"id": "ref-for-SameObject\u2461"}, {"id": "ref-for-SameObject\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-SameObject\u2463"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-SameObject\u2464"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-SameObject\u2465"}, {"id": "ref-for-SameObject\u2466"}, {"id": "ref-for-SameObject\u2467"}], "title": "8.3. XRRigidTransform"}, {"refs": [{"id": "ref-for-SameObject\u2468"}, {"id": "ref-for-SameObject\u2460\u24ea"}, {"id": "ref-for-SameObject\u2460\u2460"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-SameObject\u2460\u2461"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-SameObject\u2460\u2462"}, {"id": "ref-for-SameObject\u2460\u2463"}, {"id": "ref-for-SameObject\u2460\u2464"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-SameObject\u2460\u2465"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-SameObject\u2460\u2466"}], "title": "12.1. XRSessionEvent"}, {"refs": [{"id": "ref-for-SameObject\u2460\u2467"}, {"id": "ref-for-SameObject\u2460\u2468"}], "title": "12.2. XRInputSourceEvent"}, {"refs": [{"id": "ref-for-SameObject\u2461\u24ea"}, {"id": "ref-for-SameObject\u2461\u2460"}, {"id": "ref-for-SameObject\u2461\u2461"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-SameObject\u2461\u2462"}, {"id": "ref-for-SameObject\u2461\u2463"}], "title": "12.4. XRReferenceSpaceEvent"}], "external": true}; window.dfnpanelData['b75bb3bd'] = {"dfnID": "b75bb3bd", "url": "https://webidl.spec.whatwg.org/#SecureContext", "dfnText": "SecureContext", "refSections": [{"refs": [{"id": "ref-for-SecureContext"}], "title": "3.1. navigator.xr"}, {"refs": [{"id": "ref-for-SecureContext\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-SecureContext\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-SecureContext\u2462"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-SecureContext\u2463"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-SecureContext\u2464"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-SecureContext\u2465"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-SecureContext\u2466"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-SecureContext\u2467"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-SecureContext\u2468"}], "title": "7.3. XRViewport"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u24ea"}], "title": "8.3. XRRigidTransform"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u2460"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u2461"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u2462"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u2463"}], "title": "10.3. XRInputSourceArray"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u2464"}], "title": "11.1. XRLayer"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u2465"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u2466"}], "title": "12.1. XRSessionEvent"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u2467"}], "title": "12.2. XRInputSourceEvent"}, {"refs": [{"id": "ref-for-SecureContext\u2460\u2468"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-SecureContext\u2461\u24ea"}], "title": "12.4. XRReferenceSpaceEvent"}], "external": true}; window.dfnpanelData['c3e881ef'] = {"dfnID": "c3e881ef", "url": "https://webidl.spec.whatwg.org/#securityerror", "dfnText": "SecurityError", "refSections": [{"refs": [{"id": "ref-for-securityerror"}, {"id": "ref-for-securityerror\u2460"}, {"id": "ref-for-securityerror\u2461"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-securityerror\u2462"}], "title": "6.1. XRSpace"}], "external": true}; window.dfnpanelData['82ca3efc'] = {"dfnID": "82ca3efc", "url": "https://webidl.spec.whatwg.org/#exceptiondef-typeerror", "dfnText": "TypeError", "refSections": [{"refs": [{"id": "ref-for-exceptiondef-typeerror"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-exceptiondef-typeerror\u2460"}, {"id": "ref-for-exceptiondef-typeerror\u2461"}], "title": "8.3. XRRigidTransform"}], "external": true}; window.dfnpanelData['dacde8b5'] = {"dfnID": "dacde8b5", "url": "https://webidl.spec.whatwg.org/#a-new-promise", "dfnText": "a new promise", "refSections": [{"refs": [{"id": "ref-for-a-new-promise"}, {"id": "ref-for-a-new-promise\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-a-new-promise\u2461"}, {"id": "ref-for-a-new-promise\u2462"}, {"id": "ref-for-a-new-promise\u2463"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-a-new-promise\u2464"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['5372cca8'] = {"dfnID": "5372cca8", "url": "https://webidl.spec.whatwg.org/#idl-boolean", "dfnText": "boolean", "refSections": [{"refs": [{"id": "ref-for-idl-boolean"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-idl-boolean\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-idl-boolean\u2461"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-idl-boolean\u2462"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-idl-boolean\u2463"}, {"id": "ref-for-idl-boolean\u2464"}, {"id": "ref-for-idl-boolean\u2465"}, {"id": "ref-for-idl-boolean\u2466"}, {"id": "ref-for-idl-boolean\u2467"}, {"id": "ref-for-idl-boolean\u2468"}, {"id": "ref-for-idl-boolean\u2460\u24ea"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-idl-boolean\u2460\u2460"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['8c800cdf'] = {"dfnID": "8c800cdf", "url": "https://webidl.spec.whatwg.org/#idl-double", "dfnText": "double", "refSections": [{"refs": [{"id": "ref-for-idl-double"}, {"id": "ref-for-idl-double\u2460"}, {"id": "ref-for-idl-double\u2461"}, {"id": "ref-for-idl-double\u2462"}, {"id": "ref-for-idl-double\u2463"}, {"id": "ref-for-idl-double\u2464"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-idl-double\u2465"}, {"id": "ref-for-idl-double\u2466"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-idl-double\u2467"}, {"id": "ref-for-idl-double\u2468"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['eec1be2d'] = {"dfnID": "eec1be2d", "url": "https://webidl.spec.whatwg.org/#idl-float", "dfnText": "float", "refSections": [{"refs": [{"id": "ref-for-idl-float"}, {"id": "ref-for-idl-float\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-idl-float\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['abbed741'] = {"dfnID": "abbed741", "url": "https://webidl.spec.whatwg.org/#dfn-frozen-array-type", "dfnText": "frozen array type", "refSections": [{"refs": [{"id": "ref-for-dfn-frozen-array-type"}], "title": "10.3. XRInputSourceArray"}], "external": true}; window.dfnpanelData['57cf55df'] = {"dfnID": "57cf55df", "url": "https://webidl.spec.whatwg.org/#dfn-indexed-property-getter", "dfnText": "indexed property getter", "refSections": [{"refs": [{"id": "ref-for-dfn-indexed-property-getter"}], "title": "10.3. XRInputSourceArray"}], "external": true}; window.dfnpanelData['2bdfe871'] = {"dfnID": "2bdfe871", "url": "https://webidl.spec.whatwg.org/#invoke-a-callback-function", "dfnText": "invoke the web idl callback function", "refSections": [{"refs": [{"id": "ref-for-invoke-a-callback-function"}], "title": "4.3. Animation Frames"}], "external": true}; window.dfnpanelData['f8de33a3'] = {"dfnID": "f8de33a3", "url": "https://webidl.spec.whatwg.org/#idl-long", "dfnText": "long", "refSections": [{"refs": [{"id": "ref-for-idl-long"}, {"id": "ref-for-idl-long\u2460"}, {"id": "ref-for-idl-long\u2461"}, {"id": "ref-for-idl-long\u2462"}], "title": "7.3. XRViewport"}], "external": true}; window.dfnpanelData['56f81a8e'] = {"dfnID": "56f81a8e", "url": "https://webidl.spec.whatwg.org/#new", "dfnText": "new", "refSections": [{"refs": [{"id": "ref-for-new"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-new\u2460"}, {"id": "ref-for-new\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-new\u2462"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-new\u2463"}, {"id": "ref-for-new\u2464"}, {"id": "ref-for-new\u2465"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-new\u2466"}, {"id": "ref-for-new\u2467"}, {"id": "ref-for-new\u2468"}, {"id": "ref-for-new\u2460\u24ea"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-new\u2460\u2460"}, {"id": "ref-for-new\u2460\u2461"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-new\u2460\u2462"}, {"id": "ref-for-new\u2460\u2463"}, {"id": "ref-for-new\u2460\u2464"}, {"id": "ref-for-new\u2460\u2465"}, {"id": "ref-for-new\u2460\u2466"}, {"id": "ref-for-new\u2460\u2467"}, {"id": "ref-for-new\u2460\u2468"}, {"id": "ref-for-new\u2461\u24ea"}], "title": "8.3. XRRigidTransform"}, {"refs": [{"id": "ref-for-new\u2461\u2460"}, {"id": "ref-for-new\u2461\u2461"}, {"id": "ref-for-new\u2461\u2462"}, {"id": "ref-for-new\u2461\u2463"}, {"id": "ref-for-new\u2461\u2464"}, {"id": "ref-for-new\u2461\u2465"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-new\u2461\u2466"}, {"id": "ref-for-new\u2461\u2467"}, {"id": "ref-for-new\u2461\u2468"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-new\u2462\u24ea"}, {"id": "ref-for-new\u2462\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['b262501e'] = {"dfnID": "b262501e", "url": "https://webidl.spec.whatwg.org/#reject", "dfnText": "reject", "refSections": [{"refs": [{"id": "ref-for-reject"}, {"id": "ref-for-reject\u2460"}, {"id": "ref-for-reject\u2461"}, {"id": "ref-for-reject\u2462"}, {"id": "ref-for-reject\u2463"}, {"id": "ref-for-reject\u2464"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-reject\u2465"}, {"id": "ref-for-reject\u2466"}, {"id": "ref-for-reject\u2467"}, {"id": "ref-for-reject\u2468"}, {"id": "ref-for-reject\u2460\u24ea"}, {"id": "ref-for-reject\u2460\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-reject\u2460\u2461"}, {"id": "ref-for-reject\u2460\u2462"}, {"id": "ref-for-reject\u2460\u2463"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['3b90bdcd'] = {"dfnID": "3b90bdcd", "url": "https://webidl.spec.whatwg.org/#resolve", "dfnText": "resolve", "refSections": [{"refs": [{"id": "ref-for-resolve"}, {"id": "ref-for-resolve\u2460"}, {"id": "ref-for-resolve\u2461"}, {"id": "ref-for-resolve\u2462"}, {"id": "ref-for-resolve\u2463"}, {"id": "ref-for-resolve\u2464"}, {"id": "ref-for-resolve\u2465"}, {"id": "ref-for-resolve\u2466"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-resolve\u2467"}, {"id": "ref-for-resolve\u2468"}, {"id": "ref-for-resolve\u2460\u24ea"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-resolve\u2460\u2460"}, {"id": "ref-for-resolve\u2460\u2461"}, {"id": "ref-for-resolve\u2460\u2462"}, {"id": "ref-for-resolve\u2460\u2463"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['9cce47fd'] = {"dfnID": "9cce47fd", "url": "https://webidl.spec.whatwg.org/#idl-sequence", "dfnText": "sequence", "refSections": [{"refs": [{"id": "ref-for-idl-sequence"}, {"id": "ref-for-idl-sequence\u2460"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-idl-sequence\u2461"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-idl-sequence\u2462"}, {"id": "ref-for-idl-sequence\u2463"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-idl-sequence\u2464"}, {"id": "ref-for-idl-sequence\u2465"}], "title": "14.2. Permissions API Integration"}], "external": true}; window.dfnpanelData['4013a022'] = {"dfnID": "4013a022", "url": "https://webidl.spec.whatwg.org/#this", "dfnText": "this", "refSections": [{"refs": [{"id": "ref-for-this"}, {"id": "ref-for-this\u2460"}, {"id": "ref-for-this\u2461"}, {"id": "ref-for-this\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-this\u2463"}, {"id": "ref-for-this\u2464"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-this\u2465"}, {"id": "ref-for-this\u2466"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-this\u2467"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-this\u2468"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['5f90bbfb'] = {"dfnID": "5f90bbfb", "url": "https://webidl.spec.whatwg.org/#idl-undefined", "dfnText": "undefined", "refSections": [{"refs": [{"id": "ref-for-idl-undefined"}, {"id": "ref-for-idl-undefined\u2460"}, {"id": "ref-for-idl-undefined\u2461"}, {"id": "ref-for-idl-undefined\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-idl-undefined\u2463"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-idl-undefined\u2464"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-idl-undefined\u2465"}], "title": "11.3. WebGL Context Compatibility"}], "external": true}; window.dfnpanelData['e97a9688'] = {"dfnID": "e97a9688", "url": "https://webidl.spec.whatwg.org/#idl-unsigned-long", "dfnText": "unsigned long", "refSections": [{"refs": [{"id": "ref-for-idl-unsigned-long"}, {"id": "ref-for-idl-unsigned-long\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-idl-unsigned-long\u2461"}, {"id": "ref-for-idl-unsigned-long\u2462"}], "title": "10.3. XRInputSourceArray"}, {"refs": [{"id": "ref-for-idl-unsigned-long\u2463"}, {"id": "ref-for-idl-unsigned-long\u2464"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['2b77e73c'] = {"dfnID": "2b77e73c", "url": "https://www.w3.org/TR/webxr-ar-module-1/#first-person-observer-view", "dfnText": "first-person observer view", "refSections": [{"refs": [{"id": "ref-for-first-person-observer-view"}], "title": "7.2. Primary and Secondary Views"}], "external": true}; window.dfnpanelData['2c275d68'] = {"dfnID": "2c275d68", "url": "https://www.w3.org/TR/webxrlayers-1/#dom-xrlayerinit-colorformat", "dfnText": "colorFormat", "refSections": [{"refs": [{"id": "ref-for-dom-xrlayerinit-colorformat"}], "title": "11.2. XRWebGLLayer"}], "external": true}; window.dfnpanelData['c9c7b7d0'] = {"dfnID": "c9c7b7d0", "url": "https://www.w3.org/TR/webxrlayers-1/#dom-xrrenderstate-layers", "dfnText": "layers", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstate-layers"}, {"id": "ref-for-dom-xrrenderstate-layers\u2460"}], "title": "4.1. XRSession"}], "external": true}; window.dfnpanelData['3dof'] = {"dfnID": "3dof", "url": "#3dof", "dfnText": "3DoF", "refSections": [{"refs": [{"id": "ref-for-3dof"}, {"id": "ref-for-3dof\u2460"}], "title": "1.1. Terminology"}, {"refs": [{"id": "ref-for-3dof\u2461"}, {"id": "ref-for-3dof\u2462"}], "title": "6.1. XRSpace"}], "external": false}; window.dfnpanelData['6dof'] = {"dfnID": "6dof", "url": "#6dof", "dfnText": "6DoF", "refSections": [{"refs": [{"id": "ref-for-6dof"}], "title": "1. Introduction"}, {"refs": [{"id": "ref-for-6dof\u2460"}], "title": "1.1. Terminology"}, {"refs": [{"id": "ref-for-6dof\u2461"}, {"id": "ref-for-6dof\u2462"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-6dof\u2463"}, {"id": "ref-for-6dof\u2464"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-6dof\u2465"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-6dof\u2466"}, {"id": "ref-for-6dof\u2467"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['xr-device'] = {"dfnID": "xr-device", "url": "#xr-device", "dfnText": "XR device", "refSections": [{"refs": [{"id": "ref-for-xr-device"}, {"id": "ref-for-xr-device\u2460"}], "title": "1.1. Terminology"}, {"refs": [{"id": "ref-for-xr-device\u2461"}, {"id": "ref-for-xr-device\u2462"}, {"id": "ref-for-xr-device\u2463"}, {"id": "ref-for-xr-device\u2464"}, {"id": "ref-for-xr-device\u2465"}, {"id": "ref-for-xr-device\u2466"}, {"id": "ref-for-xr-device\u2467"}, {"id": "ref-for-xr-device\u2468"}, {"id": "ref-for-xr-device\u2460\u24ea"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-xr-device\u2460\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xr-device\u2460\u2461"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xr-device\u2460\u2462"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xr-device\u2460\u2463"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-xr-device\u2460\u2464"}], "title": "13.4. Data adjustments"}, {"refs": [{"id": "ref-for-xr-device\u2460\u2465"}], "title": "13.5.1. Immersiveness"}, {"refs": [{"id": "ref-for-xr-device\u2460\u2466"}], "title": "13.5.2. Poses"}], "external": false}; window.dfnpanelData['list-of-supported-modes'] = {"dfnID": "list-of-supported-modes", "url": "#list-of-supported-modes", "dfnText": "list of supported modes", "refSections": [{"refs": [{"id": "ref-for-list-of-supported-modes"}, {"id": "ref-for-list-of-supported-modes\u2460"}, {"id": "ref-for-list-of-supported-modes\u2461"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-list-of-supported-modes\u2462"}, {"id": "ref-for-list-of-supported-modes\u2463"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-list-of-supported-modes\u2464"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-list-of-supported-modes\u2465"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['xr-device-set-of-granted-features'] = {"dfnID": "xr-device-set-of-granted-features", "url": "#xr-device-set-of-granted-features", "dfnText": "set of granted features", "refSections": [{"refs": [{"id": "ref-for-xr-device-set-of-granted-features"}, {"id": "ref-for-xr-device-set-of-granted-features\u2460"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['list-of-immersive-xr-devices'] = {"dfnID": "list-of-immersive-xr-devices", "url": "#list-of-immersive-xr-devices", "dfnText": "list of immersive XR devices", "refSections": [{"refs": [{"id": "ref-for-list-of-immersive-xr-devices"}, {"id": "ref-for-list-of-immersive-xr-devices\u2460"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-list-of-immersive-xr-devices\u2461"}, {"id": "ref-for-list-of-immersive-xr-devices\u2462"}, {"id": "ref-for-list-of-immersive-xr-devices\u2463"}, {"id": "ref-for-list-of-immersive-xr-devices\u2464"}, {"id": "ref-for-list-of-immersive-xr-devices\u2465"}, {"id": "ref-for-list-of-immersive-xr-devices\u2466"}, {"id": "ref-for-list-of-immersive-xr-devices\u2467"}, {"id": "ref-for-list-of-immersive-xr-devices\u2468"}, {"id": "ref-for-list-of-immersive-xr-devices\u2460\u24ea"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['immersive-xr-device'] = {"dfnID": "immersive-xr-device", "url": "#immersive-xr-device", "dfnText": "immersive XR device", "refSections": [{"refs": [{"id": "ref-for-immersive-xr-device"}, {"id": "ref-for-immersive-xr-device\u2460"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-immersive-xr-device\u2461"}, {"id": "ref-for-immersive-xr-device\u2462"}, {"id": "ref-for-immersive-xr-device\u2463"}, {"id": "ref-for-immersive-xr-device\u2464"}, {"id": "ref-for-immersive-xr-device\u2465"}, {"id": "ref-for-immersive-xr-device\u2466"}, {"id": "ref-for-immersive-xr-device\u2467"}, {"id": "ref-for-immersive-xr-device\u2468"}, {"id": "ref-for-immersive-xr-device\u2460\u24ea"}, {"id": "ref-for-immersive-xr-device\u2460\u2460"}, {"id": "ref-for-immersive-xr-device\u2460\u2461"}, {"id": "ref-for-immersive-xr-device\u2460\u2462"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-immersive-xr-device\u2460\u2463"}, {"id": "ref-for-immersive-xr-device\u2460\u2464"}, {"id": "ref-for-immersive-xr-device\u2460\u2465"}, {"id": "ref-for-immersive-xr-device\u2460\u2466"}, {"id": "ref-for-immersive-xr-device\u2460\u2467"}, {"id": "ref-for-immersive-xr-device\u2460\u2468"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-immersive-xr-device\u2461\u24ea"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-immersive-xr-device\u2461\u2460"}, {"id": "ref-for-immersive-xr-device\u2461\u2461"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-immersive-xr-device\u2461\u2462"}, {"id": "ref-for-immersive-xr-device\u2461\u2463"}, {"id": "ref-for-immersive-xr-device\u2461\u2464"}, {"id": "ref-for-immersive-xr-device\u2461\u2465"}, {"id": "ref-for-immersive-xr-device\u2461\u2466"}, {"id": "ref-for-immersive-xr-device\u2461\u2467"}, {"id": "ref-for-immersive-xr-device\u2461\u2468"}, {"id": "ref-for-immersive-xr-device\u2462\u24ea"}, {"id": "ref-for-immersive-xr-device\u2462\u2460"}], "title": "11.3. WebGL Context Compatibility"}, {"refs": [{"id": "ref-for-immersive-xr-device\u2462\u2461"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['default-inline-xr-device'] = {"dfnID": "default-inline-xr-device", "url": "#default-inline-xr-device", "dfnText": "default inline XR device", "refSections": [{"refs": [{"id": "ref-for-default-inline-xr-device"}, {"id": "ref-for-default-inline-xr-device\u2460"}, {"id": "ref-for-default-inline-xr-device\u2461"}, {"id": "ref-for-default-inline-xr-device\u2462"}, {"id": "ref-for-default-inline-xr-device\u2463"}, {"id": "ref-for-default-inline-xr-device\u2464"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-default-inline-xr-device\u2465"}, {"id": "ref-for-default-inline-xr-device\u2466"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['inline-xr-device'] = {"dfnID": "inline-xr-device", "url": "#inline-xr-device", "dfnText": "inline XR device", "refSections": [{"refs": [{"id": "ref-for-inline-xr-device"}, {"id": "ref-for-inline-xr-device\u2460"}, {"id": "ref-for-inline-xr-device\u2461"}, {"id": "ref-for-inline-xr-device\u2462"}, {"id": "ref-for-inline-xr-device\u2463"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-inline-xr-device\u2464"}, {"id": "ref-for-inline-xr-device\u2465"}, {"id": "ref-for-inline-xr-device\u2466"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['dom-navigator-xr'] = {"dfnID": "dom-navigator-xr", "url": "#dom-navigator-xr", "dfnText": "xr", "refSections": [{"refs": [{"id": "ref-for-dom-navigator-xr"}], "title": "3.1. navigator.xr"}, {"refs": [{"id": "ref-for-dom-navigator-xr\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-navigator-xr\u2461"}], "title": "14.1. Permissions Policy"}], "external": false}; window.dfnpanelData['xrsystem'] = {"dfnID": "xrsystem", "url": "#xrsystem", "dfnText": "XRSystem", "refSections": [{"refs": [{"id": "ref-for-xrsystem"}, {"id": "ref-for-xrsystem\u2460"}], "title": "3.1. navigator.xr"}, {"refs": [{"id": "ref-for-xrsystem\u2461"}, {"id": "ref-for-xrsystem\u2462"}, {"id": "ref-for-xrsystem\u2463"}, {"id": "ref-for-xrsystem\u2464"}, {"id": "ref-for-xrsystem\u2465"}, {"id": "ref-for-xrsystem\u2466"}, {"id": "ref-for-xrsystem\u2467"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-xrsystem\u2468"}, {"id": "ref-for-xrsystem\u2460\u24ea"}, {"id": "ref-for-xrsystem\u2460\u2460"}, {"id": "ref-for-xrsystem\u2460\u2461"}, {"id": "ref-for-xrsystem\u2460\u2462"}, {"id": "ref-for-xrsystem\u2460\u2463"}, {"id": "ref-for-xrsystem\u2460\u2464"}, {"id": "ref-for-xrsystem\u2460\u2465"}, {"id": "ref-for-xrsystem\u2460\u2466"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsystem\u2460\u2467"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xrsystem\u2460\u2468"}], "title": "12.4. XRReferenceSpaceEvent"}, {"refs": [{"id": "ref-for-xrsystem\u2461\u24ea"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['enumerate-immersive-xr-devices'] = {"dfnID": "enumerate-immersive-xr-devices", "url": "#enumerate-immersive-xr-devices", "dfnText": "enumerate immersive XR devices", "refSections": [{"refs": [{"id": "ref-for-enumerate-immersive-xr-devices"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['select-an-immersive-xr-device'] = {"dfnID": "select-an-immersive-xr-device", "url": "#select-an-immersive-xr-device", "dfnText": "select an immersive XR device", "refSections": [{"refs": [{"id": "ref-for-select-an-immersive-xr-device"}, {"id": "ref-for-select-an-immersive-xr-device\u2460"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['ensure-an-immersive-xr-device-is-selected'] = {"dfnID": "ensure-an-immersive-xr-device-is-selected", "url": "#ensure-an-immersive-xr-device-is-selected", "dfnText": "ensure an immersive XR device is selected", "refSections": [{"refs": [{"id": "ref-for-ensure-an-immersive-xr-device-is-selected"}, {"id": "ref-for-ensure-an-immersive-xr-device-is-selected\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-ensure-an-immersive-xr-device-is-selected\u2461"}, {"id": "ref-for-ensure-an-immersive-xr-device-is-selected\u2462"}, {"id": "ref-for-ensure-an-immersive-xr-device-is-selected\u2463"}], "title": "11.3. WebGL Context Compatibility"}], "external": false}; window.dfnpanelData['dom-xrsystem-ondevicechange'] = {"dfnID": "dom-xrsystem-ondevicechange", "url": "#dom-xrsystem-ondevicechange", "dfnText": "ondevicechange", "refSections": [{"refs": [{"id": "ref-for-dom-xrsystem-ondevicechange"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['dom-xrsystem-issessionsupported'] = {"dfnID": "dom-xrsystem-issessionsupported", "url": "#dom-xrsystem-issessionsupported", "dfnText": "isSessionSupported(mode)", "refSections": [{"refs": [{"id": "ref-for-dom-xrsystem-issessionsupported"}], "title": "1.2. Application flow"}, {"refs": [{"id": "ref-for-dom-xrsystem-issessionsupported\u2460"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2461"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2462"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2463"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2464"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-xrsystem-issessionsupported\u2465"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2466"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2467"}], "title": "13.8.1. Fingerprinting considerations of isSessionSupported()"}, {"refs": [{"id": "ref-for-dom-xrsystem-issessionsupported\u2468"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2460\u24ea"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2460\u2460"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2460\u2461"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2460\u2462"}, {"id": "ref-for-dom-xrsystem-issessionsupported\u2460\u2463"}], "title": "13.8.2. Considerations for when to automatically grant \"xr-session-supported\""}, {"refs": [{"id": "ref-for-dom-xrsystem-issessionsupported\u2460\u2464"}], "title": "14.1. Permissions Policy"}], "external": false}; window.dfnpanelData['pending-immersive-session'] = {"dfnID": "pending-immersive-session", "url": "#pending-immersive-session", "dfnText": "pending immersive session", "refSections": [{"refs": [{"id": "ref-for-pending-immersive-session"}, {"id": "ref-for-pending-immersive-session\u2460"}, {"id": "ref-for-pending-immersive-session\u2461"}, {"id": "ref-for-pending-immersive-session\u2462"}, {"id": "ref-for-pending-immersive-session\u2463"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['active-immersive-session'] = {"dfnID": "active-immersive-session", "url": "#active-immersive-session", "dfnText": "active immersive session", "refSections": [{"refs": [{"id": "ref-for-active-immersive-session"}, {"id": "ref-for-active-immersive-session\u2460"}, {"id": "ref-for-active-immersive-session\u2461"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-active-immersive-session\u2462"}, {"id": "ref-for-active-immersive-session\u2463"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-active-immersive-session\u2464"}, {"id": "ref-for-active-immersive-session\u2465"}, {"id": "ref-for-active-immersive-session\u2466"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-active-immersive-session\u2467"}, {"id": "ref-for-active-immersive-session\u2468"}], "title": "13.3. Mid-session consent"}], "external": false}; window.dfnpanelData['list-of-inline-sessions'] = {"dfnID": "list-of-inline-sessions", "url": "#list-of-inline-sessions", "dfnText": "list of inline sessions", "refSections": [{"refs": [{"id": "ref-for-list-of-inline-sessions"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-list-of-inline-sessions\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsystem-requestsession'] = {"dfnID": "dom-xrsystem-requestsession", "url": "#dom-xrsystem-requestsession", "dfnText": "requestSession(mode, options)", "refSections": [{"refs": [{"id": "ref-for-dom-xrsystem-requestsession"}], "title": "1.2. Application flow"}, {"refs": [{"id": "ref-for-dom-xrsystem-requestsession\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-xrsystem-requestsession\u2461"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-dom-xrsystem-requestsession\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrsystem-requestsession\u2463"}], "title": "13.8.2. Considerations for when to automatically grant \"xr-session-supported\""}, {"refs": [{"id": "ref-for-dom-xrsystem-requestsession\u2464"}], "title": "14.1. Permissions Policy"}], "external": false}; window.dfnpanelData['obtain-the-current-device'] = {"dfnID": "obtain-the-current-device", "url": "#obtain-the-current-device", "dfnText": "obtain the current device", "refSections": [{"refs": [{"id": "ref-for-obtain-the-current-device"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-obtain-the-current-device\u2460"}, {"id": "ref-for-obtain-the-current-device\u2461"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['enumdef-xrsessionmode'] = {"dfnID": "enumdef-xrsessionmode", "url": "#enumdef-xrsessionmode", "dfnText": "XRSessionMode", "refSections": [{"refs": [{"id": "ref-for-enumdef-xrsessionmode"}, {"id": "ref-for-enumdef-xrsessionmode\u2460"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-enumdef-xrsessionmode\u2461"}, {"id": "ref-for-enumdef-xrsessionmode\u2462"}, {"id": "ref-for-enumdef-xrsessionmode\u2463"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-enumdef-xrsessionmode\u2464"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-enumdef-xrsessionmode\u2465"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-enumdef-xrsessionmode\u2466"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-enumdef-xrsessionmode\u2467"}], "title": "13.8.1. Fingerprinting considerations of isSessionSupported()"}, {"refs": [{"id": "ref-for-enumdef-xrsessionmode\u2468"}, {"id": "ref-for-enumdef-xrsessionmode\u2460\u24ea"}, {"id": "ref-for-enumdef-xrsessionmode\u2460\u2460"}, {"id": "ref-for-enumdef-xrsessionmode\u2460\u2461"}, {"id": "ref-for-enumdef-xrsessionmode\u2460\u2462"}, {"id": "ref-for-enumdef-xrsessionmode\u2460\u2463"}, {"id": "ref-for-enumdef-xrsessionmode\u2460\u2464"}], "title": "13.8.2. Considerations for when to automatically grant \"xr-session-supported\""}, {"refs": [{"id": "ref-for-enumdef-xrsessionmode\u2460\u2465"}, {"id": "ref-for-enumdef-xrsessionmode\u2460\u2466"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['dom-xrsessionmode-inline'] = {"dfnID": "dom-xrsessionmode-inline", "url": "#dom-xrsessionmode-inline", "dfnText": "inline", "refSections": [{"refs": [{"id": "ref-for-dom-xrsessionmode-inline"}, {"id": "ref-for-dom-xrsessionmode-inline\u2460"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2461"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2462"}, {"id": "ref-for-dom-xrsessionmode-inline\u2463"}, {"id": "ref-for-dom-xrsessionmode-inline\u2464"}, {"id": "ref-for-dom-xrsessionmode-inline\u2465"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2466"}, {"id": "ref-for-dom-xrsessionmode-inline\u2467"}, {"id": "ref-for-dom-xrsessionmode-inline\u2468"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2460\u24ea"}, {"id": "ref-for-dom-xrsessionmode-inline\u2460\u2460"}, {"id": "ref-for-dom-xrsessionmode-inline\u2460\u2461"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2460\u2462"}, {"id": "ref-for-dom-xrsessionmode-inline\u2460\u2463"}, {"id": "ref-for-dom-xrsessionmode-inline\u2460\u2464"}, {"id": "ref-for-dom-xrsessionmode-inline\u2460\u2465"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2460\u2466"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2460\u2467"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2460\u2468"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2461\u24ea"}, {"id": "ref-for-dom-xrsessionmode-inline\u2461\u2460"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2461\u2461"}], "title": "11.3. WebGL Context Compatibility"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2461\u2462"}], "title": "13.1. Sensitive Information"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-inline\u2461\u2463"}], "title": "13.5.1. Immersiveness"}], "external": false}; window.dfnpanelData['dom-xrsessionmode-immersive-vr'] = {"dfnID": "dom-xrsessionmode-immersive-vr", "url": "#dom-xrsessionmode-immersive-vr", "dfnText": "immersive-vr", "refSections": [{"refs": [{"id": "ref-for-dom-xrsessionmode-immersive-vr"}, {"id": "ref-for-dom-xrsessionmode-immersive-vr\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-immersive-vr\u2461"}, {"id": "ref-for-dom-xrsessionmode-immersive-vr\u2462"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-dom-xrsessionmode-immersive-vr\u2463"}], "title": "13.8.2. Considerations for when to automatically grant \"xr-session-supported\""}], "external": false}; window.dfnpanelData['dom-xrsessionmode-immersive-ar'] = {"dfnID": "dom-xrsessionmode-immersive-ar", "url": "#dom-xrsessionmode-immersive-ar", "dfnText": "immersive-ar", "refSections": [{"refs": [{"id": "ref-for-dom-xrsessionmode-immersive-ar"}, {"id": "ref-for-dom-xrsessionmode-immersive-ar\u2460"}], "title": "3.3. XRSessionMode"}], "external": false}; window.dfnpanelData['inline-session'] = {"dfnID": "inline-session", "url": "#inline-session", "dfnText": "inline session", "refSections": [{"refs": [{"id": "ref-for-inline-session"}, {"id": "ref-for-inline-session\u2460"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-inline-session\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-inline-session\u2462"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-inline-session\u2463"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-inline-session\u2464"}], "title": "14.1. Permissions Policy"}], "external": false}; window.dfnpanelData['immersive-session'] = {"dfnID": "immersive-session", "url": "#immersive-session", "dfnText": "immersive session", "refSections": [{"refs": [{"id": "ref-for-immersive-session"}, {"id": "ref-for-immersive-session\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-immersive-session\u2461"}, {"id": "ref-for-immersive-session\u2462"}, {"id": "ref-for-immersive-session\u2463"}, {"id": "ref-for-immersive-session\u2464"}, {"id": "ref-for-immersive-session\u2465"}, {"id": "ref-for-immersive-session\u2466"}, {"id": "ref-for-immersive-session\u2467"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-immersive-session\u2468"}, {"id": "ref-for-immersive-session\u2460\u24ea"}, {"id": "ref-for-immersive-session\u2460\u2460"}, {"id": "ref-for-immersive-session\u2460\u2461"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-immersive-session\u2460\u2462"}, {"id": "ref-for-immersive-session\u2460\u2463"}, {"id": "ref-for-immersive-session\u2460\u2464"}, {"id": "ref-for-immersive-session\u2460\u2465"}, {"id": "ref-for-immersive-session\u2460\u2466"}, {"id": "ref-for-immersive-session\u2460\u2467"}, {"id": "ref-for-immersive-session\u2460\u2468"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-immersive-session\u2461\u24ea"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-immersive-session\u2461\u2460"}, {"id": "ref-for-immersive-session\u2461\u2461"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-immersive-session\u2461\u2462"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-immersive-session\u2461\u2463"}, {"id": "ref-for-immersive-session\u2461\u2464"}, {"id": "ref-for-immersive-session\u2461\u2465"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-immersive-session\u2461\u2466"}, {"id": "ref-for-immersive-session\u2461\u2467"}, {"id": "ref-for-immersive-session\u2461\u2468"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-immersive-session\u2462\u24ea"}], "title": "11.3. WebGL Context Compatibility"}, {"refs": [{"id": "ref-for-immersive-session\u2462\u2460"}], "title": "13.1. Sensitive Information"}, {"refs": [{"id": "ref-for-immersive-session\u2462\u2461"}, {"id": "ref-for-immersive-session\u2462\u2462"}], "title": "13.5.1. Immersiveness"}, {"refs": [{"id": "ref-for-immersive-session\u2462\u2463"}, {"id": "ref-for-immersive-session\u2462\u2464"}], "title": "14.1. Permissions Policy"}], "external": false}; window.dfnpanelData['exclusive-access'] = {"dfnID": "exclusive-access", "url": "#exclusive-access", "dfnText": "exclusive access", "refSections": [{"refs": [{"id": "ref-for-exclusive-access"}, {"id": "ref-for-exclusive-access\u2460"}, {"id": "ref-for-exclusive-access\u2461"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-exclusive-access\u2462"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['required-features'] = {"dfnID": "required-features", "url": "#required-features", "dfnText": "required features", "refSections": [{"refs": [{"id": "ref-for-required-features"}, {"id": "ref-for-required-features\u2460"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-required-features\u2461"}], "title": "13.5.1. Immersiveness"}], "external": false}; window.dfnpanelData['optional-features'] = {"dfnID": "optional-features", "url": "#optional-features", "dfnText": "Optional features", "refSections": [{"refs": [{"id": "ref-for-optional-features"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-optional-features\u2460"}], "title": "13.5.1. Immersiveness"}], "external": false}; window.dfnpanelData['dictdef-xrsessioninit'] = {"dfnID": "dictdef-xrsessioninit", "url": "#dictdef-xrsessioninit", "dfnText": "XRSessionInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-xrsessioninit"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dictdef-xrsessioninit\u2460"}, {"id": "ref-for-dictdef-xrsessioninit\u2461"}, {"id": "ref-for-dictdef-xrsessioninit\u2462"}], "title": "3.4. Feature Dependencies"}], "external": false}; window.dfnpanelData['dom-xrsessioninit-requiredfeatures'] = {"dfnID": "dom-xrsessioninit-requiredfeatures", "url": "#dom-xrsessioninit-requiredfeatures", "dfnText": "requiredFeatures", "refSections": [{"refs": [{"id": "ref-for-dom-xrsessioninit-requiredfeatures"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-xrsessioninit-requiredfeatures\u2460"}, {"id": "ref-for-dom-xrsessioninit-requiredfeatures\u2461"}, {"id": "ref-for-dom-xrsessioninit-requiredfeatures\u2462"}, {"id": "ref-for-dom-xrsessioninit-requiredfeatures\u2463"}, {"id": "ref-for-dom-xrsessioninit-requiredfeatures\u2464"}, {"id": "ref-for-dom-xrsessioninit-requiredfeatures\u2465"}], "title": "3.4. Feature Dependencies"}], "external": false}; window.dfnpanelData['dom-xrsessioninit-optionalfeatures'] = {"dfnID": "dom-xrsessioninit-optionalfeatures", "url": "#dom-xrsessioninit-optionalfeatures", "dfnText": "optionalFeatures", "refSections": [{"refs": [{"id": "ref-for-dom-xrsessioninit-optionalfeatures"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-xrsessioninit-optionalfeatures\u2460"}, {"id": "ref-for-dom-xrsessioninit-optionalfeatures\u2461"}, {"id": "ref-for-dom-xrsessioninit-optionalfeatures\u2462"}, {"id": "ref-for-dom-xrsessioninit-optionalfeatures\u2463"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-dom-xrsessioninit-optionalfeatures\u2464"}], "title": "7.2. Primary and Secondary Views"}], "external": false}; window.dfnpanelData['feature-descriptor'] = {"dfnID": "feature-descriptor", "url": "#feature-descriptor", "dfnText": "feature descriptor", "refSections": [{"refs": [{"id": "ref-for-feature-descriptor"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-feature-descriptor\u2460"}, {"id": "ref-for-feature-descriptor\u2461"}, {"id": "ref-for-feature-descriptor\u2462"}, {"id": "ref-for-feature-descriptor\u2463"}, {"id": "ref-for-feature-descriptor\u2464"}, {"id": "ref-for-feature-descriptor\u2465"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-feature-descriptor\u2466"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-feature-descriptor\u2467"}], "title": "7.2. Primary and Secondary Views"}, {"refs": [{"id": "ref-for-feature-descriptor\u2468"}, {"id": "ref-for-feature-descriptor\u2460\u24ea"}, {"id": "ref-for-feature-descriptor\u2460\u2460"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['default-features'] = {"dfnID": "default-features", "url": "#default-features", "dfnText": "default features", "refSections": [{"refs": [{"id": "ref-for-default-features"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-default-features\u2460"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['requested-features'] = {"dfnID": "requested-features", "url": "#requested-features", "dfnText": "requested features", "refSections": [{"refs": [{"id": "ref-for-requested-features"}, {"id": "ref-for-requested-features\u2460"}, {"id": "ref-for-requested-features\u2461"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-requested-features\u2462"}], "title": "13.5.1. Immersiveness"}], "external": false}; window.dfnpanelData['feature-requirements'] = {"dfnID": "feature-requirements", "url": "#feature-requirements", "dfnText": "feature requirements", "refSections": [{"refs": [{"id": "ref-for-feature-requirements"}], "title": "13.5.3. Reference spaces"}, {"refs": [{"id": "ref-for-feature-requirements\u2460"}, {"id": "ref-for-feature-requirements\u2461"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['capable-of-supporting'] = {"dfnID": "capable-of-supporting", "url": "#capable-of-supporting", "dfnText": "capable of supporting", "refSections": [{"refs": [{"id": "ref-for-capable-of-supporting"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-capable-of-supporting\u2460"}, {"id": "ref-for-capable-of-supporting\u2461"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['should-not-initialize-device-tracking'] = {"dfnID": "should-not-initialize-device-tracking", "url": "#should-not-initialize-device-tracking", "dfnText": "SHOULD NOT initialize device tracking", "refSections": [{"refs": [{"id": "ref-for-should-not-initialize-device-tracking"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['enumdef-xrvisibilitystate'] = {"dfnID": "enumdef-xrvisibilitystate", "url": "#enumdef-xrvisibilitystate", "dfnText": "XRVisibilityState", "refSections": [{"refs": [{"id": "ref-for-enumdef-xrvisibilitystate"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['xrsession'] = {"dfnID": "xrsession", "url": "#xrsession", "dfnText": "XRSession", "refSections": [{"refs": [{"id": "ref-for-xrsession"}, {"id": "ref-for-xrsession\u2460"}], "title": "1.2. Application flow"}, {"refs": [{"id": "ref-for-xrsession\u2461"}, {"id": "ref-for-xrsession\u2462"}, {"id": "ref-for-xrsession\u2463"}, {"id": "ref-for-xrsession\u2464"}, {"id": "ref-for-xrsession\u2465"}, {"id": "ref-for-xrsession\u2466"}, {"id": "ref-for-xrsession\u2467"}, {"id": "ref-for-xrsession\u2468"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-xrsession\u2460\u24ea"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2460"}, {"id": "ref-for-xrsession\u2460\u2461"}, {"id": "ref-for-xrsession\u2460\u2462"}, {"id": "ref-for-xrsession\u2460\u2463"}, {"id": "ref-for-xrsession\u2460\u2464"}, {"id": "ref-for-xrsession\u2460\u2465"}, {"id": "ref-for-xrsession\u2460\u2466"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2467"}, {"id": "ref-for-xrsession\u2460\u2468"}, {"id": "ref-for-xrsession\u2461\u24ea"}, {"id": "ref-for-xrsession\u2461\u2460"}, {"id": "ref-for-xrsession\u2461\u2461"}, {"id": "ref-for-xrsession\u2461\u2462"}, {"id": "ref-for-xrsession\u2461\u2463"}, {"id": "ref-for-xrsession\u2461\u2464"}, {"id": "ref-for-xrsession\u2461\u2465"}, {"id": "ref-for-xrsession\u2461\u2466"}, {"id": "ref-for-xrsession\u2461\u2467"}, {"id": "ref-for-xrsession\u2461\u2468"}, {"id": "ref-for-xrsession\u2462\u24ea"}, {"id": "ref-for-xrsession\u2462\u2460"}, {"id": "ref-for-xrsession\u2462\u2461"}, {"id": "ref-for-xrsession\u2462\u2462"}, {"id": "ref-for-xrsession\u2462\u2463"}, {"id": "ref-for-xrsession\u2462\u2464"}, {"id": "ref-for-xrsession\u2462\u2465"}, {"id": "ref-for-xrsession\u2462\u2466"}, {"id": "ref-for-xrsession\u2462\u2467"}, {"id": "ref-for-xrsession\u2462\u2468"}, {"id": "ref-for-xrsession\u2463\u24ea"}, {"id": "ref-for-xrsession\u2463\u2460"}, {"id": "ref-for-xrsession\u2463\u2461"}, {"id": "ref-for-xrsession\u2463\u2462"}, {"id": "ref-for-xrsession\u2463\u2463"}, {"id": "ref-for-xrsession\u2463\u2464"}, {"id": "ref-for-xrsession\u2463\u2465"}, {"id": "ref-for-xrsession\u2463\u2466"}, {"id": "ref-for-xrsession\u2463\u2467"}, {"id": "ref-for-xrsession\u2463\u2468"}, {"id": "ref-for-xrsession\u2464\u24ea"}, {"id": "ref-for-xrsession\u2464\u2460"}, {"id": "ref-for-xrsession\u2464\u2461"}, {"id": "ref-for-xrsession\u2464\u2462"}, {"id": "ref-for-xrsession\u2464\u2463"}, {"id": "ref-for-xrsession\u2464\u2464"}, {"id": "ref-for-xrsession\u2464\u2465"}, {"id": "ref-for-xrsession\u2464\u2466"}, {"id": "ref-for-xrsession\u2464\u2467"}, {"id": "ref-for-xrsession\u2464\u2468"}, {"id": "ref-for-xrsession\u2465\u24ea"}, {"id": "ref-for-xrsession\u2465\u2460"}, {"id": "ref-for-xrsession\u2465\u2461"}, {"id": "ref-for-xrsession\u2465\u2462"}, {"id": "ref-for-xrsession\u2465\u2463"}, {"id": "ref-for-xrsession\u2465\u2464"}, {"id": "ref-for-xrsession\u2465\u2465"}, {"id": "ref-for-xrsession\u2465\u2466"}, {"id": "ref-for-xrsession\u2465\u2467"}, {"id": "ref-for-xrsession\u2465\u2468"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsession\u2466\u24ea"}, {"id": "ref-for-xrsession\u2466\u2460"}, {"id": "ref-for-xrsession\u2466\u2461"}, {"id": "ref-for-xrsession\u2466\u2462"}, {"id": "ref-for-xrsession\u2466\u2463"}, {"id": "ref-for-xrsession\u2466\u2464"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-xrsession\u2466\u2465"}, {"id": "ref-for-xrsession\u2466\u2466"}, {"id": "ref-for-xrsession\u2466\u2467"}, {"id": "ref-for-xrsession\u2466\u2468"}, {"id": "ref-for-xrsession\u2467\u24ea"}, {"id": "ref-for-xrsession\u2467\u2460"}, {"id": "ref-for-xrsession\u2467\u2461"}, {"id": "ref-for-xrsession\u2467\u2462"}, {"id": "ref-for-xrsession\u2467\u2463"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrsession\u2467\u2464"}, {"id": "ref-for-xrsession\u2467\u2465"}, {"id": "ref-for-xrsession\u2467\u2466"}, {"id": "ref-for-xrsession\u2467\u2467"}, {"id": "ref-for-xrsession\u2467\u2468"}, {"id": "ref-for-xrsession\u2468\u24ea"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrsession\u2468\u2460"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrsession\u2468\u2461"}, {"id": "ref-for-xrsession\u2468\u2462"}, {"id": "ref-for-xrsession\u2468\u2463"}, {"id": "ref-for-xrsession\u2468\u2464"}, {"id": "ref-for-xrsession\u2468\u2465"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-xrsession\u2468\u2466"}, {"id": "ref-for-xrsession\u2468\u2467"}, {"id": "ref-for-xrsession\u2468\u2468"}, {"id": "ref-for-xrsession\u2460\u24ea\u24ea"}, {"id": "ref-for-xrsession\u2460\u24ea\u2460"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-xrsession\u2460\u24ea\u2461"}, {"id": "ref-for-xrsession\u2460\u24ea\u2462"}, {"id": "ref-for-xrsession\u2460\u24ea\u2463"}], "title": "7.2. Primary and Secondary Views"}, {"refs": [{"id": "ref-for-xrsession\u2460\u24ea\u2464"}, {"id": "ref-for-xrsession\u2460\u24ea\u2465"}, {"id": "ref-for-xrsession\u2460\u24ea\u2466"}, {"id": "ref-for-xrsession\u2460\u24ea\u2467"}, {"id": "ref-for-xrsession\u2460\u24ea\u2468"}, {"id": "ref-for-xrsession\u2460\u2460\u24ea"}, {"id": "ref-for-xrsession\u2460\u2460\u2460"}, {"id": "ref-for-xrsession\u2460\u2460\u2461"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2460\u2462"}, {"id": "ref-for-xrsession\u2460\u2460\u2463"}, {"id": "ref-for-xrsession\u2460\u2460\u2464"}, {"id": "ref-for-xrsession\u2460\u2460\u2465"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2460\u2466"}], "title": "10.3. XRInputSourceArray"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2460\u2467"}, {"id": "ref-for-xrsession\u2460\u2460\u2468"}, {"id": "ref-for-xrsession\u2460\u2461\u24ea"}, {"id": "ref-for-xrsession\u2460\u2461\u2460"}, {"id": "ref-for-xrsession\u2460\u2461\u2461"}, {"id": "ref-for-xrsession\u2460\u2461\u2462"}, {"id": "ref-for-xrsession\u2460\u2461\u2463"}, {"id": "ref-for-xrsession\u2460\u2461\u2464"}, {"id": "ref-for-xrsession\u2460\u2461\u2465"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2461\u2466"}], "title": "11.3. WebGL Context Compatibility"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2461\u2467"}, {"id": "ref-for-xrsession\u2460\u2461\u2468"}, {"id": "ref-for-xrsession\u2460\u2462\u24ea"}, {"id": "ref-for-xrsession\u2460\u2462\u2460"}], "title": "12.1. XRSessionEvent"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2462\u2461"}, {"id": "ref-for-xrsession\u2460\u2462\u2462"}, {"id": "ref-for-xrsession\u2460\u2462\u2463"}, {"id": "ref-for-xrsession\u2460\u2462\u2464"}, {"id": "ref-for-xrsession\u2460\u2462\u2465"}, {"id": "ref-for-xrsession\u2460\u2462\u2466"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2462\u2467"}, {"id": "ref-for-xrsession\u2460\u2462\u2468"}, {"id": "ref-for-xrsession\u2460\u2463\u24ea"}, {"id": "ref-for-xrsession\u2460\u2463\u2460"}, {"id": "ref-for-xrsession\u2460\u2463\u2461"}, {"id": "ref-for-xrsession\u2460\u2463\u2462"}, {"id": "ref-for-xrsession\u2460\u2463\u2463"}, {"id": "ref-for-xrsession\u2460\u2463\u2464"}, {"id": "ref-for-xrsession\u2460\u2463\u2465"}, {"id": "ref-for-xrsession\u2460\u2463\u2466"}, {"id": "ref-for-xrsession\u2460\u2463\u2467"}, {"id": "ref-for-xrsession\u2460\u2463\u2468"}, {"id": "ref-for-xrsession\u2460\u2464\u24ea"}], "title": "12.5. Event Types"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2464\u2460"}], "title": "13.2.4. Duration of consent"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2464\u2461"}], "title": "13.5.2. Poses"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2464\u2462"}, {"id": "ref-for-xrsession\u2460\u2464\u2463"}, {"id": "ref-for-xrsession\u2460\u2464\u2464"}], "title": "13.6. Trusted Environment"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2464\u2465"}], "title": "13.7. Context Isolation"}, {"refs": [{"id": "ref-for-xrsession\u2460\u2464\u2466"}], "title": "14.1. Permissions Policy"}], "external": false}; window.dfnpanelData['xrsession-mode'] = {"dfnID": "xrsession-mode", "url": "#xrsession-mode", "dfnText": "mode", "refSections": [{"refs": [{"id": "ref-for-xrsession-mode"}, {"id": "ref-for-xrsession-mode\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsession-mode\u2461"}, {"id": "ref-for-xrsession-mode\u2462"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrsession-mode\u2463"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xrsession-mode\u2464"}, {"id": "ref-for-xrsession-mode\u2465"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['xrsession-animation-frame'] = {"dfnID": "xrsession-animation-frame", "url": "#xrsession-animation-frame", "dfnText": "animation frame", "refSections": [{"refs": [{"id": "ref-for-xrsession-animation-frame"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrsession-animation-frame\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['xrsession-set-of-granted-features'] = {"dfnID": "xrsession-set-of-granted-features", "url": "#xrsession-set-of-granted-features", "dfnText": "set of granted features", "refSections": [{"refs": [{"id": "ref-for-xrsession-set-of-granted-features"}, {"id": "ref-for-xrsession-set-of-granted-features\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsession-set-of-granted-features\u2461"}], "title": "6.2. XRReferenceSpace"}], "external": false}; window.dfnpanelData['dom-xrsession-enabledfeatures'] = {"dfnID": "dom-xrsession-enabledfeatures", "url": "#dom-xrsession-enabledfeatures", "dfnText": "enabledFeatures", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-enabledfeatures"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-issystemkeyboardsupported'] = {"dfnID": "dom-xrsession-issystemkeyboardsupported", "url": "#dom-xrsession-issystemkeyboardsupported", "dfnText": "isSystemKeyboardSupported", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-issystemkeyboardsupported"}, {"id": "ref-for-dom-xrsession-issystemkeyboardsupported\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['initialize-the-session'] = {"dfnID": "initialize-the-session", "url": "#initialize-the-session", "dfnText": "initialize the session", "refSections": [{"refs": [{"id": "ref-for-initialize-the-session"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['shut-down-the-session'] = {"dfnID": "shut-down-the-session", "url": "#shut-down-the-session", "dfnText": "shut down the session", "refSections": [{"refs": [{"id": "ref-for-shut-down-the-session"}], "title": "1.2. Application flow"}, {"refs": [{"id": "ref-for-shut-down-the-session\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-shut-down-the-session\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-shut-down-the-session\u2462"}], "title": "13.3. Mid-session consent"}], "external": false}; window.dfnpanelData['ended'] = {"dfnID": "ended", "url": "#ended", "dfnText": "ended", "refSections": [{"refs": [{"id": "ref-for-ended"}, {"id": "ref-for-ended\u2460"}, {"id": "ref-for-ended\u2461"}, {"id": "ref-for-ended\u2462"}, {"id": "ref-for-ended\u2463"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-ended\u2464"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-ended\u2465"}, {"id": "ref-for-ended\u2466"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-ended\u2467"}], "title": "13.2.4. Duration of consent"}], "external": false}; window.dfnpanelData['dom-xrsession-end'] = {"dfnID": "dom-xrsession-end", "url": "#dom-xrsession-end", "dfnText": "end()", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-end"}, {"id": "ref-for-dom-xrsession-end\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['active-render-state'] = {"dfnID": "active-render-state", "url": "#active-render-state", "dfnText": "active render state", "refSections": [{"refs": [{"id": "ref-for-active-render-state"}, {"id": "ref-for-active-render-state\u2460"}, {"id": "ref-for-active-render-state\u2461"}, {"id": "ref-for-active-render-state\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-active-render-state\u2463"}], "title": "4.2. XRRenderState"}], "external": false}; window.dfnpanelData['pending-render-state'] = {"dfnID": "pending-render-state", "url": "#pending-render-state", "dfnText": "pending render state", "refSections": [{"refs": [{"id": "ref-for-pending-render-state"}, {"id": "ref-for-pending-render-state\u2460"}, {"id": "ref-for-pending-render-state\u2461"}, {"id": "ref-for-pending-render-state\u2462"}, {"id": "ref-for-pending-render-state\u2463"}, {"id": "ref-for-pending-render-state\u2464"}, {"id": "ref-for-pending-render-state\u2465"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-pending-render-state\u2466"}], "title": "4.3. Animation Frames"}], "external": false}; window.dfnpanelData['dom-xrsession-renderstate'] = {"dfnID": "dom-xrsession-renderstate", "url": "#dom-xrsession-renderstate", "dfnText": "renderState", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-renderstate"}, {"id": "ref-for-dom-xrsession-renderstate\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrsession-renderstate\u2461"}, {"id": "ref-for-dom-xrsession-renderstate\u2462"}, {"id": "ref-for-dom-xrsession-renderstate\u2463"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-dom-xrsession-renderstate\u2464"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-dom-xrsession-renderstate\u2465"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['minimum-inline-field-of-view'] = {"dfnID": "minimum-inline-field-of-view", "url": "#minimum-inline-field-of-view", "dfnText": "minimum inline field of view", "refSections": [{"refs": [{"id": "ref-for-minimum-inline-field-of-view"}, {"id": "ref-for-minimum-inline-field-of-view\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['maximum-inline-field-of-view'] = {"dfnID": "maximum-inline-field-of-view", "url": "#maximum-inline-field-of-view", "dfnText": "maximum inline field of view", "refSections": [{"refs": [{"id": "ref-for-maximum-inline-field-of-view"}, {"id": "ref-for-maximum-inline-field-of-view\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['minimum-near-clip-plane'] = {"dfnID": "minimum-near-clip-plane", "url": "#minimum-near-clip-plane", "dfnText": "minimum near clip plane", "refSections": [{"refs": [{"id": "ref-for-minimum-near-clip-plane"}, {"id": "ref-for-minimum-near-clip-plane\u2460"}, {"id": "ref-for-minimum-near-clip-plane\u2461"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['maximum-far-clip-plane'] = {"dfnID": "maximum-far-clip-plane", "url": "#maximum-far-clip-plane", "dfnText": "maximum far clip plane", "refSections": [{"refs": [{"id": "ref-for-maximum-far-clip-plane"}, {"id": "ref-for-maximum-far-clip-plane\u2460"}, {"id": "ref-for-maximum-far-clip-plane\u2461"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['update-the-pending-layers-state'] = {"dfnID": "update-the-pending-layers-state", "url": "#update-the-pending-layers-state", "dfnText": "update the pending layers state", "refSections": [{"refs": [{"id": "ref-for-update-the-pending-layers-state"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['apply-the-nominal-frame-rate'] = {"dfnID": "apply-the-nominal-frame-rate", "url": "#apply-the-nominal-frame-rate", "dfnText": "apply the nominal frame rate", "refSections": [{"refs": [{"id": "ref-for-apply-the-nominal-frame-rate"}, {"id": "ref-for-apply-the-nominal-frame-rate\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-updatetargetframerate'] = {"dfnID": "dom-xrsession-updatetargetframerate", "url": "#dom-xrsession-updatetargetframerate", "dfnText": "updateTargetFrameRate(rate)", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-updatetargetframerate"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-updaterenderstate'] = {"dfnID": "dom-xrsession-updaterenderstate", "url": "#dom-xrsession-updaterenderstate", "dfnText": "updateRenderState(newState)", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-updaterenderstate"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrsession-updaterenderstate\u2460"}], "title": "4.2. XRRenderState"}], "external": false}; window.dfnpanelData['apply-the-pending-render-state'] = {"dfnID": "apply-the-pending-render-state", "url": "#apply-the-pending-render-state", "dfnText": "apply the pending render state", "refSections": [{"refs": [{"id": "ref-for-apply-the-pending-render-state"}], "title": "4.3. Animation Frames"}], "external": false}; window.dfnpanelData['dom-xrsession-requestreferencespace'] = {"dfnID": "dom-xrsession-requestreferencespace", "url": "#dom-xrsession-requestreferencespace", "dfnText": "requestReferenceSpace(type)", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-requestreferencespace"}, {"id": "ref-for-dom-xrsession-requestreferencespace\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrsession-requestreferencespace\u2461"}], "title": "6.2. XRReferenceSpace"}], "external": false}; window.dfnpanelData['list-of-active-xr-input-sources'] = {"dfnID": "list-of-active-xr-input-sources", "url": "#list-of-active-xr-input-sources", "dfnText": "list of active XR input sources", "refSections": [{"refs": [{"id": "ref-for-list-of-active-xr-input-sources"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-list-of-active-xr-input-sources\u2460"}, {"id": "ref-for-list-of-active-xr-input-sources\u2461"}, {"id": "ref-for-list-of-active-xr-input-sources\u2462"}, {"id": "ref-for-list-of-active-xr-input-sources\u2463"}, {"id": "ref-for-list-of-active-xr-input-sources\u2464"}, {"id": "ref-for-list-of-active-xr-input-sources\u2465"}, {"id": "ref-for-list-of-active-xr-input-sources\u2466"}, {"id": "ref-for-list-of-active-xr-input-sources\u2467"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-list-of-active-xr-input-sources\u2468"}, {"id": "ref-for-list-of-active-xr-input-sources\u2460\u24ea"}, {"id": "ref-for-list-of-active-xr-input-sources\u2460\u2460"}, {"id": "ref-for-list-of-active-xr-input-sources\u2460\u2461"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-list-of-active-xr-input-sources\u2460\u2462"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-list-of-active-xr-input-sources\u2460\u2463"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['list-of-active-xr-tracked-sources'] = {"dfnID": "list-of-active-xr-tracked-sources", "url": "#list-of-active-xr-tracked-sources", "dfnText": "list of active XR tracked sources", "refSections": [{"refs": [{"id": "ref-for-list-of-active-xr-tracked-sources"}, {"id": "ref-for-list-of-active-xr-tracked-sources\u2460"}, {"id": "ref-for-list-of-active-xr-tracked-sources\u2461"}, {"id": "ref-for-list-of-active-xr-tracked-sources\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-list-of-active-xr-tracked-sources\u2463"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['xrsession-xr-device'] = {"dfnID": "xrsession-xr-device", "url": "#xrsession-xr-device", "dfnText": "XR device", "refSections": [{"refs": [{"id": "ref-for-xrsession-xr-device"}], "title": "1.2. Application flow"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2460"}, {"id": "ref-for-xrsession-xr-device\u2461"}, {"id": "ref-for-xrsession-xr-device\u2462"}, {"id": "ref-for-xrsession-xr-device\u2463"}, {"id": "ref-for-xrsession-xr-device\u2464"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2465"}, {"id": "ref-for-xrsession-xr-device\u2466"}, {"id": "ref-for-xrsession-xr-device\u2467"}, {"id": "ref-for-xrsession-xr-device\u2468"}, {"id": "ref-for-xrsession-xr-device\u2460\u24ea"}, {"id": "ref-for-xrsession-xr-device\u2460\u2460"}, {"id": "ref-for-xrsession-xr-device\u2460\u2461"}, {"id": "ref-for-xrsession-xr-device\u2460\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2460\u2463"}, {"id": "ref-for-xrsession-xr-device\u2460\u2464"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2460\u2465"}], "title": "4.4. The XR Compositor"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2460\u2466"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2460\u2467"}, {"id": "ref-for-xrsession-xr-device\u2460\u2468"}, {"id": "ref-for-xrsession-xr-device\u2461\u24ea"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2461\u2460"}, {"id": "ref-for-xrsession-xr-device\u2461\u2461"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2461\u2462"}, {"id": "ref-for-xrsession-xr-device\u2461\u2463"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2461\u2464"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2461\u2465"}, {"id": "ref-for-xrsession-xr-device\u2461\u2466"}, {"id": "ref-for-xrsession-xr-device\u2461\u2467"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xrsession-xr-device\u2461\u2468"}, {"id": "ref-for-xrsession-xr-device\u2462\u24ea"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['dom-xrsession-inputsources'] = {"dfnID": "dom-xrsession-inputsources", "url": "#dom-xrsession-inputsources", "dfnText": "inputSources", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-inputsources"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrsession-inputsources\u2460"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-dom-xrsession-inputsources\u2461"}], "title": "10.3. XRInputSourceArray"}], "external": false}; window.dfnpanelData['dom-xrsession-trackedsources'] = {"dfnID": "dom-xrsession-trackedsources", "url": "#dom-xrsession-trackedsources", "dfnText": "trackedSources", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-trackedsources"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['xrsession-promise-resolved'] = {"dfnID": "xrsession-promise-resolved", "url": "#xrsession-promise-resolved", "dfnText": "promise resolved", "refSections": [{"refs": [{"id": "ref-for-xrsession-promise-resolved"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-xrsession-promise-resolved\u2460"}, {"id": "ref-for-xrsession-promise-resolved\u2461"}, {"id": "ref-for-xrsession-promise-resolved\u2462"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['xrsession-add-input-source'] = {"dfnID": "xrsession-add-input-source", "url": "#xrsession-add-input-source", "dfnText": "new XR input sources become available", "refSections": [{"refs": [{"id": "ref-for-xrsession-add-input-source"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsession-add-input-source\u2460"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['xrsession-remove-input-source'] = {"dfnID": "xrsession-remove-input-source", "url": "#xrsession-remove-input-source", "dfnText": "XR input sources are no longer available", "refSections": [{"refs": [{"id": "ref-for-xrsession-remove-input-source"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsession-remove-input-source\u2460"}, {"id": "ref-for-xrsession-remove-input-source\u2461"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['xrsession-change-input-source'] = {"dfnID": "xrsession-change-input-source", "url": "#xrsession-change-input-source", "dfnText": "handedness, targetRayMode, profiles, presence of a gripSpace or the status as a primary input source or tracked input source for any XR input sources change", "refSections": [{"refs": [{"id": "ref-for-xrsession-change-input-source"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['xrsession-visibility-state'] = {"dfnID": "xrsession-visibility-state", "url": "#xrsession-visibility-state", "dfnText": "visibility state", "refSections": [{"refs": [{"id": "ref-for-xrsession-visibility-state"}, {"id": "ref-for-xrsession-visibility-state\u2460"}, {"id": "ref-for-xrsession-visibility-state\u2461"}, {"id": "ref-for-xrsession-visibility-state\u2462"}, {"id": "ref-for-xrsession-visibility-state\u2463"}, {"id": "ref-for-xrsession-visibility-state\u2464"}, {"id": "ref-for-xrsession-visibility-state\u2465"}, {"id": "ref-for-xrsession-visibility-state\u2466"}, {"id": "ref-for-xrsession-visibility-state\u2467"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsession-visibility-state\u2468"}], "title": "12.5. Event Types"}, {"refs": [{"id": "ref-for-xrsession-visibility-state\u2460\u24ea"}, {"id": "ref-for-xrsession-visibility-state\u2460\u2460"}], "title": "13.6. Trusted Environment"}], "external": false}; window.dfnpanelData['dom-xrvisibilitystate-visible'] = {"dfnID": "dom-xrvisibilitystate-visible", "url": "#dom-xrvisibilitystate-visible", "dfnText": "visible", "refSections": [{"refs": [{"id": "ref-for-dom-xrvisibilitystate-visible"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-dom-xrvisibilitystate-visible\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrvisibilitystate-visible-blurred'] = {"dfnID": "dom-xrvisibilitystate-visible-blurred", "url": "#dom-xrvisibilitystate-visible-blurred", "dfnText": "visible-blurred", "refSections": [{"refs": [{"id": "ref-for-dom-xrvisibilitystate-visible-blurred"}, {"id": "ref-for-dom-xrvisibilitystate-visible-blurred\u2460"}, {"id": "ref-for-dom-xrvisibilitystate-visible-blurred\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrvisibilitystate-visible-blurred\u2462"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrvisibilitystate-visible-blurred\u2463"}, {"id": "ref-for-dom-xrvisibilitystate-visible-blurred\u2464"}], "title": "13.6. Trusted Environment"}], "external": false}; window.dfnpanelData['dom-xrvisibilitystate-hidden'] = {"dfnID": "dom-xrvisibilitystate-hidden", "url": "#dom-xrvisibilitystate-hidden", "dfnText": "hidden", "refSections": [{"refs": [{"id": "ref-for-dom-xrvisibilitystate-hidden"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrvisibilitystate-hidden\u2460"}], "title": "13.5.2. Poses"}, {"refs": [{"id": "ref-for-dom-xrvisibilitystate-hidden\u2461"}, {"id": "ref-for-dom-xrvisibilitystate-hidden\u2462"}, {"id": "ref-for-dom-xrvisibilitystate-hidden\u2463"}], "title": "13.6. Trusted Environment"}], "external": false}; window.dfnpanelData['dom-xrsession-visibilitystate'] = {"dfnID": "dom-xrsession-visibilitystate", "url": "#dom-xrsession-visibilitystate", "dfnText": "visibilityState", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-visibilitystate"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrsession-visibilitystate\u2460"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrsession-visibilitystate\u2461"}], "title": "13.5.2. Poses"}], "external": false}; window.dfnpanelData['dom-xrsession-onvisibilitychange'] = {"dfnID": "dom-xrsession-onvisibilitychange", "url": "#dom-xrsession-onvisibilitychange", "dfnText": "onvisibilitychange", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-onvisibilitychange"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['nominal-frame-rate'] = {"dfnID": "nominal-frame-rate", "url": "#nominal-frame-rate", "dfnText": "nominal frame rate", "refSections": [{"refs": [{"id": "ref-for-nominal-frame-rate"}, {"id": "ref-for-nominal-frame-rate\u2460"}, {"id": "ref-for-nominal-frame-rate\u2461"}, {"id": "ref-for-nominal-frame-rate\u2462"}, {"id": "ref-for-nominal-frame-rate\u2463"}, {"id": "ref-for-nominal-frame-rate\u2464"}, {"id": "ref-for-nominal-frame-rate\u2465"}, {"id": "ref-for-nominal-frame-rate\u2466"}, {"id": "ref-for-nominal-frame-rate\u2467"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['effective-frame-rate'] = {"dfnID": "effective-frame-rate", "url": "#effective-frame-rate", "dfnText": "effective frame rate", "refSections": [{"refs": [{"id": "ref-for-effective-frame-rate"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['target-frame-rate'] = {"dfnID": "target-frame-rate", "url": "#target-frame-rate", "dfnText": "target frame rate", "refSections": [{"refs": [{"id": "ref-for-target-frame-rate"}, {"id": "ref-for-target-frame-rate\u2460"}, {"id": "ref-for-target-frame-rate\u2461"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['display-frame-rate'] = {"dfnID": "display-frame-rate", "url": "#display-frame-rate", "dfnText": "display frame rate", "refSections": [{"refs": [{"id": "ref-for-display-frame-rate"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['xrsession-internal-target-framerate'] = {"dfnID": "xrsession-internal-target-framerate", "url": "#xrsession-internal-target-framerate", "dfnText": "internal target frameRate", "refSections": [{"refs": [{"id": "ref-for-xrsession-internal-target-framerate"}, {"id": "ref-for-xrsession-internal-target-framerate\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['xrsession-internal-nominal-framerate'] = {"dfnID": "xrsession-internal-nominal-framerate", "url": "#xrsession-internal-nominal-framerate", "dfnText": "internal nominal frameRate", "refSections": [{"refs": [{"id": "ref-for-xrsession-internal-nominal-framerate"}, {"id": "ref-for-xrsession-internal-nominal-framerate\u2460"}, {"id": "ref-for-xrsession-internal-nominal-framerate\u2461"}, {"id": "ref-for-xrsession-internal-nominal-framerate\u2462"}, {"id": "ref-for-xrsession-internal-nominal-framerate\u2463"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsession-internal-nominal-framerate\u2464"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['dom-xrsession-framerate'] = {"dfnID": "dom-xrsession-framerate", "url": "#dom-xrsession-framerate", "dfnText": "frameRate", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-framerate"}, {"id": "ref-for-dom-xrsession-framerate\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-onframeratechange'] = {"dfnID": "dom-xrsession-onframeratechange", "url": "#dom-xrsession-onframeratechange", "dfnText": "onframeratechange", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-onframeratechange"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-supportedframerates'] = {"dfnID": "dom-xrsession-supportedframerates", "url": "#dom-xrsession-supportedframerates", "dfnText": "supportedFrameRates", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-supportedframerates"}, {"id": "ref-for-dom-xrsession-supportedframerates\u2460"}, {"id": "ref-for-dom-xrsession-supportedframerates\u2461"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['xrsession-viewer-reference-space'] = {"dfnID": "xrsession-viewer-reference-space", "url": "#xrsession-viewer-reference-space", "dfnText": "viewer reference space", "refSections": [{"refs": [{"id": "ref-for-xrsession-viewer-reference-space"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrsession-viewer-reference-space\u2460"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['xrsession-list-of-views'] = {"dfnID": "xrsession-list-of-views", "url": "#xrsession-list-of-views", "dfnText": "list of views", "refSections": [{"refs": [{"id": "ref-for-xrsession-list-of-views"}, {"id": "ref-for-xrsession-list-of-views\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsession-list-of-views\u2461"}, {"id": "ref-for-xrsession-list-of-views\u2462"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrsession-list-of-views\u2463"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrsession-list-of-views\u2464"}, {"id": "ref-for-xrsession-list-of-views\u2465"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['dom-xrsession-onend'] = {"dfnID": "dom-xrsession-onend", "url": "#dom-xrsession-onend", "dfnText": "onend", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-onend"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-oninputsourceschange'] = {"dfnID": "dom-xrsession-oninputsourceschange", "url": "#dom-xrsession-oninputsourceschange", "dfnText": "oninputsourceschange", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-oninputsourceschange"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-onselectstart'] = {"dfnID": "dom-xrsession-onselectstart", "url": "#dom-xrsession-onselectstart", "dfnText": "onselectstart", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-onselectstart"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-onselectend'] = {"dfnID": "dom-xrsession-onselectend", "url": "#dom-xrsession-onselectend", "dfnText": "onselectend", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-onselectend"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-onselect'] = {"dfnID": "dom-xrsession-onselect", "url": "#dom-xrsession-onselect", "dfnText": "onselect", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-onselect"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-onsqueezestart'] = {"dfnID": "dom-xrsession-onsqueezestart", "url": "#dom-xrsession-onsqueezestart", "dfnText": "onsqueezestart", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-onsqueezestart"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-onsqueezeend'] = {"dfnID": "dom-xrsession-onsqueezeend", "url": "#dom-xrsession-onsqueezeend", "dfnText": "onsqueezeend", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-onsqueezeend"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrsession-onsqueeze'] = {"dfnID": "dom-xrsession-onsqueeze", "url": "#dom-xrsession-onsqueeze", "dfnText": "onsqueeze", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-onsqueeze"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dictdef-xrrenderstateinit'] = {"dfnID": "dictdef-xrrenderstateinit", "url": "#dictdef-xrrenderstateinit", "dfnText": "XRRenderStateInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-xrrenderstateinit"}, {"id": "ref-for-dictdef-xrrenderstateinit\u2460"}, {"id": "ref-for-dictdef-xrrenderstateinit\u2461"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrrenderstateinit-depthnear'] = {"dfnID": "dom-xrrenderstateinit-depthnear", "url": "#dom-xrrenderstateinit-depthnear", "dfnText": "depthNear", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstateinit-depthnear"}, {"id": "ref-for-dom-xrrenderstateinit-depthnear\u2460"}, {"id": "ref-for-dom-xrrenderstateinit-depthnear\u2461"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrrenderstateinit-depthfar'] = {"dfnID": "dom-xrrenderstateinit-depthfar", "url": "#dom-xrrenderstateinit-depthfar", "dfnText": "depthFar", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstateinit-depthfar"}, {"id": "ref-for-dom-xrrenderstateinit-depthfar\u2460"}, {"id": "ref-for-dom-xrrenderstateinit-depthfar\u2461"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrrenderstateinit-inlineverticalfieldofview'] = {"dfnID": "dom-xrrenderstateinit-inlineverticalfieldofview", "url": "#dom-xrrenderstateinit-inlineverticalfieldofview", "dfnText": "inlineVerticalFieldOfView", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstateinit-inlineverticalfieldofview"}, {"id": "ref-for-dom-xrrenderstateinit-inlineverticalfieldofview\u2460"}, {"id": "ref-for-dom-xrrenderstateinit-inlineverticalfieldofview\u2461"}, {"id": "ref-for-dom-xrrenderstateinit-inlineverticalfieldofview\u2462"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrrenderstateinit-baselayer'] = {"dfnID": "dom-xrrenderstateinit-baselayer", "url": "#dom-xrrenderstateinit-baselayer", "dfnText": "baseLayer", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstateinit-baselayer"}, {"id": "ref-for-dom-xrrenderstateinit-baselayer\u2460"}, {"id": "ref-for-dom-xrrenderstateinit-baselayer\u2461"}, {"id": "ref-for-dom-xrrenderstateinit-baselayer\u2462"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrrenderstateinit-layers'] = {"dfnID": "dom-xrrenderstateinit-layers", "url": "#dom-xrrenderstateinit-layers", "dfnText": "layers", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstateinit-layers"}, {"id": "ref-for-dom-xrrenderstateinit-layers\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['xrrenderstate'] = {"dfnID": "xrrenderstate", "url": "#xrrenderstate", "dfnText": "XRRenderState", "refSections": [{"refs": [{"id": "ref-for-xrrenderstate"}, {"id": "ref-for-xrrenderstate\u2460"}, {"id": "ref-for-xrrenderstate\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrrenderstate\u2462"}, {"id": "ref-for-xrrenderstate\u2463"}, {"id": "ref-for-xrrenderstate\u2464"}, {"id": "ref-for-xrrenderstate\u2465"}, {"id": "ref-for-xrrenderstate\u2466"}, {"id": "ref-for-xrrenderstate\u2467"}, {"id": "ref-for-xrrenderstate\u2468"}, {"id": "ref-for-xrrenderstate\u2460\u24ea"}], "title": "4.2. XRRenderState"}], "external": false}; window.dfnpanelData['xrrenderstate-output-canvas'] = {"dfnID": "xrrenderstate-output-canvas", "url": "#xrrenderstate-output-canvas", "dfnText": "output canvas", "refSections": [{"refs": [{"id": "ref-for-xrrenderstate-output-canvas"}, {"id": "ref-for-xrrenderstate-output-canvas\u2460"}, {"id": "ref-for-xrrenderstate-output-canvas\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrrenderstate-output-canvas\u2462"}, {"id": "ref-for-xrrenderstate-output-canvas\u2463"}, {"id": "ref-for-xrrenderstate-output-canvas\u2464"}, {"id": "ref-for-xrrenderstate-output-canvas\u2465"}, {"id": "ref-for-xrrenderstate-output-canvas\u2466"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-xrrenderstate-output-canvas\u2467"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrrenderstate-output-canvas\u2468"}, {"id": "ref-for-xrrenderstate-output-canvas\u2460\u24ea"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['xrrenderstate-composition-enabled'] = {"dfnID": "xrrenderstate-composition-enabled", "url": "#xrrenderstate-composition-enabled", "dfnText": "composition enabled", "refSections": [{"refs": [{"id": "ref-for-xrrenderstate-composition-enabled"}, {"id": "ref-for-xrrenderstate-composition-enabled\u2460"}, {"id": "ref-for-xrrenderstate-composition-enabled\u2461"}, {"id": "ref-for-xrrenderstate-composition-enabled\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrrenderstate-composition-enabled\u2463"}, {"id": "ref-for-xrrenderstate-composition-enabled\u2464"}, {"id": "ref-for-xrrenderstate-composition-enabled\u2465"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-xrrenderstate-composition-enabled\u2466"}], "title": "\nChanges from the Working Draft 24 July 2020"}], "external": false}; window.dfnpanelData['initialize-the-render-state'] = {"dfnID": "initialize-the-render-state", "url": "#initialize-the-render-state", "dfnText": "initialize the render state", "refSections": [{"refs": [{"id": "ref-for-initialize-the-render-state"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['dom-xrrenderstate-depthnear'] = {"dfnID": "dom-xrrenderstate-depthnear", "url": "#dom-xrrenderstate-depthnear", "dfnText": "depthNear", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstate-depthnear"}, {"id": "ref-for-dom-xrrenderstate-depthnear\u2460"}, {"id": "ref-for-dom-xrrenderstate-depthnear\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrrenderstate-depthnear\u2462"}, {"id": "ref-for-dom-xrrenderstate-depthnear\u2463"}, {"id": "ref-for-dom-xrrenderstate-depthnear\u2464"}, {"id": "ref-for-dom-xrrenderstate-depthnear\u2465"}, {"id": "ref-for-dom-xrrenderstate-depthnear\u2466"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-dom-xrrenderstate-depthnear\u2467"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrrenderstate-depthfar'] = {"dfnID": "dom-xrrenderstate-depthfar", "url": "#dom-xrrenderstate-depthfar", "dfnText": "depthFar", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstate-depthfar"}, {"id": "ref-for-dom-xrrenderstate-depthfar\u2460"}, {"id": "ref-for-dom-xrrenderstate-depthfar\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrrenderstate-depthfar\u2462"}, {"id": "ref-for-dom-xrrenderstate-depthfar\u2463"}, {"id": "ref-for-dom-xrrenderstate-depthfar\u2464"}, {"id": "ref-for-dom-xrrenderstate-depthfar\u2465"}, {"id": "ref-for-dom-xrrenderstate-depthfar\u2466"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-dom-xrrenderstate-depthfar\u2467"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrrenderstate-inlineverticalfieldofview'] = {"dfnID": "dom-xrrenderstate-inlineverticalfieldofview", "url": "#dom-xrrenderstate-inlineverticalfieldofview", "dfnText": "inlineVerticalFieldOfView", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstate-inlineverticalfieldofview"}, {"id": "ref-for-dom-xrrenderstate-inlineverticalfieldofview\u2460"}, {"id": "ref-for-dom-xrrenderstate-inlineverticalfieldofview\u2461"}, {"id": "ref-for-dom-xrrenderstate-inlineverticalfieldofview\u2462"}, {"id": "ref-for-dom-xrrenderstate-inlineverticalfieldofview\u2463"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrrenderstate-inlineverticalfieldofview\u2464"}, {"id": "ref-for-dom-xrrenderstate-inlineverticalfieldofview\u2465"}, {"id": "ref-for-dom-xrrenderstate-inlineverticalfieldofview\u2466"}, {"id": "ref-for-dom-xrrenderstate-inlineverticalfieldofview\u2467"}], "title": "4.2. XRRenderState"}], "external": false}; window.dfnpanelData['dom-xrrenderstate-baselayer'] = {"dfnID": "dom-xrrenderstate-baselayer", "url": "#dom-xrrenderstate-baselayer", "dfnText": "baseLayer", "refSections": [{"refs": [{"id": "ref-for-dom-xrrenderstate-baselayer"}, {"id": "ref-for-dom-xrrenderstate-baselayer\u2460"}, {"id": "ref-for-dom-xrrenderstate-baselayer\u2461"}, {"id": "ref-for-dom-xrrenderstate-baselayer\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrrenderstate-baselayer\u2463"}, {"id": "ref-for-dom-xrrenderstate-baselayer\u2464"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-dom-xrrenderstate-baselayer\u2465"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-dom-xrrenderstate-baselayer\u2466"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-dom-xrrenderstate-baselayer\u2467"}, {"id": "ref-for-dom-xrrenderstate-baselayer\u2468"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['callbackdef-xrframerequestcallback'] = {"dfnID": "callbackdef-xrframerequestcallback", "url": "#callbackdef-xrframerequestcallback", "dfnText": "XRFrameRequestCallback", "refSections": [{"refs": [{"id": "ref-for-callbackdef-xrframerequestcallback"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-callbackdef-xrframerequestcallback\u2460"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-callbackdef-xrframerequestcallback\u2461"}, {"id": "ref-for-callbackdef-xrframerequestcallback\u2462"}], "title": "5.1. XRFrame"}], "external": false}; window.dfnpanelData['xrframerequestcallback-cancelled'] = {"dfnID": "xrframerequestcallback-cancelled", "url": "#xrframerequestcallback-cancelled", "dfnText": "cancelled", "refSections": [{"refs": [{"id": "ref-for-xrframerequestcallback-cancelled"}, {"id": "ref-for-xrframerequestcallback-cancelled\u2460"}], "title": "4.3. Animation Frames"}], "external": false}; window.dfnpanelData['list-of-animation-frame-callbacks'] = {"dfnID": "list-of-animation-frame-callbacks", "url": "#list-of-animation-frame-callbacks", "dfnText": "list of animation frame callbacks", "refSections": [{"refs": [{"id": "ref-for-list-of-animation-frame-callbacks"}, {"id": "ref-for-list-of-animation-frame-callbacks\u2460"}, {"id": "ref-for-list-of-animation-frame-callbacks\u2461"}, {"id": "ref-for-list-of-animation-frame-callbacks\u2462"}, {"id": "ref-for-list-of-animation-frame-callbacks\u2463"}, {"id": "ref-for-list-of-animation-frame-callbacks\u2464"}], "title": "4.3. Animation Frames"}], "external": false}; window.dfnpanelData['list-of-currently-running-animation-frame-callbacks'] = {"dfnID": "list-of-currently-running-animation-frame-callbacks", "url": "#list-of-currently-running-animation-frame-callbacks", "dfnText": "list of currently running animation frame callbacks", "refSections": [{"refs": [{"id": "ref-for-list-of-currently-running-animation-frame-callbacks"}, {"id": "ref-for-list-of-currently-running-animation-frame-callbacks\u2460"}, {"id": "ref-for-list-of-currently-running-animation-frame-callbacks\u2461"}, {"id": "ref-for-list-of-currently-running-animation-frame-callbacks\u2462"}], "title": "4.3. Animation Frames"}], "external": false}; window.dfnpanelData['animation-frame-callback-identifier'] = {"dfnID": "animation-frame-callback-identifier", "url": "#animation-frame-callback-identifier", "dfnText": "animation frame callback identifier", "refSections": [{"refs": [{"id": "ref-for-animation-frame-callback-identifier"}, {"id": "ref-for-animation-frame-callback-identifier\u2460"}, {"id": "ref-for-animation-frame-callback-identifier\u2461"}, {"id": "ref-for-animation-frame-callback-identifier\u2462"}], "title": "4.3. Animation Frames"}], "external": false}; window.dfnpanelData['dom-xrsession-requestanimationframe'] = {"dfnID": "dom-xrsession-requestanimationframe", "url": "#dom-xrsession-requestanimationframe", "dfnText": "requestAnimationFrame(callback)", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-requestanimationframe"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2460"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2461"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2462"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2463"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2464"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrsession-requestanimationframe\u2465"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2466"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2467"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2468"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2460\u24ea"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-dom-xrsession-requestanimationframe\u2460\u2460"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2460\u2461"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-dom-xrsession-requestanimationframe\u2460\u2462"}, {"id": "ref-for-dom-xrsession-requestanimationframe\u2460\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrsession-cancelanimationframe'] = {"dfnID": "dom-xrsession-cancelanimationframe", "url": "#dom-xrsession-cancelanimationframe", "dfnText": "cancelAnimationFrame(handle)", "refSections": [{"refs": [{"id": "ref-for-dom-xrsession-cancelanimationframe"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['check-the-layers-state'] = {"dfnID": "check-the-layers-state", "url": "#check-the-layers-state", "dfnText": "check the layers state", "refSections": [{"refs": [{"id": "ref-for-check-the-layers-state"}], "title": "4.3. Animation Frames"}], "external": false}; window.dfnpanelData['should-be-rendered'] = {"dfnID": "should-be-rendered", "url": "#should-be-rendered", "dfnText": "should be rendered", "refSections": [{"refs": [{"id": "ref-for-should-be-rendered"}], "title": "4.3. Animation Frames"}], "external": false}; window.dfnpanelData['xr-animation-frame'] = {"dfnID": "xr-animation-frame", "url": "#xr-animation-frame", "dfnText": "XR animation frame", "refSections": [{"refs": [{"id": "ref-for-xr-animation-frame"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xr-animation-frame\u2460"}, {"id": "ref-for-xr-animation-frame\u2461"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xr-animation-frame\u2462"}, {"id": "ref-for-xr-animation-frame\u2463"}, {"id": "ref-for-xr-animation-frame\u2464"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xr-animation-frame\u2465"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['xr-compositor'] = {"dfnID": "xr-compositor", "url": "#xr-compositor", "dfnText": "XR Compositor", "refSections": [{"refs": [{"id": "ref-for-xr-compositor"}, {"id": "ref-for-xr-compositor\u2460"}, {"id": "ref-for-xr-compositor\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xr-compositor\u2462"}, {"id": "ref-for-xr-compositor\u2463"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-xr-compositor\u2464"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xr-compositor\u2465"}, {"id": "ref-for-xr-compositor\u2466"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xr-compositor\u2467"}, {"id": "ref-for-xr-compositor\u2468"}, {"id": "ref-for-xr-compositor\u2460\u24ea"}, {"id": "ref-for-xr-compositor\u2460\u2460"}, {"id": "ref-for-xr-compositor\u2460\u2461"}, {"id": "ref-for-xr-compositor\u2460\u2462"}, {"id": "ref-for-xr-compositor\u2460\u2463"}, {"id": "ref-for-xr-compositor\u2460\u2464"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xr-compositor\u2460\u2465"}], "title": "12.5. Event Types"}, {"refs": [{"id": "ref-for-xr-compositor\u2460\u2466"}], "title": "13.6. Trusted Environment"}], "external": false}; window.dfnpanelData['xrframe'] = {"dfnID": "xrframe", "url": "#xrframe", "dfnText": "XRFrame", "refSections": [{"refs": [{"id": "ref-for-xrframe"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrframe\u2460"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrframe\u2461"}, {"id": "ref-for-xrframe\u2462"}, {"id": "ref-for-xrframe\u2463"}, {"id": "ref-for-xrframe\u2464"}, {"id": "ref-for-xrframe\u2465"}, {"id": "ref-for-xrframe\u2466"}, {"id": "ref-for-xrframe\u2467"}, {"id": "ref-for-xrframe\u2468"}, {"id": "ref-for-xrframe\u2460\u24ea"}, {"id": "ref-for-xrframe\u2460\u2460"}, {"id": "ref-for-xrframe\u2460\u2461"}, {"id": "ref-for-xrframe\u2460\u2462"}, {"id": "ref-for-xrframe\u2460\u2463"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrframe\u2460\u2464"}, {"id": "ref-for-xrframe\u2460\u2465"}, {"id": "ref-for-xrframe\u2460\u2466"}, {"id": "ref-for-xrframe\u2460\u2467"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrframe\u2460\u2468"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-xrframe\u2461\u24ea"}, {"id": "ref-for-xrframe\u2461\u2460"}, {"id": "ref-for-xrframe\u2461\u2461"}, {"id": "ref-for-xrframe\u2461\u2462"}, {"id": "ref-for-xrframe\u2461\u2463"}, {"id": "ref-for-xrframe\u2461\u2464"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xrframe\u2461\u2465"}, {"id": "ref-for-xrframe\u2461\u2466"}, {"id": "ref-for-xrframe\u2461\u2467"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-xrframe\u2461\u2468"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xrframe\u2462\u24ea"}, {"id": "ref-for-xrframe\u2462\u2460"}, {"id": "ref-for-xrframe\u2462\u2461"}, {"id": "ref-for-xrframe\u2462\u2462"}], "title": "12.2. XRInputSourceEvent"}], "external": false}; window.dfnpanelData['xrframe-active'] = {"dfnID": "xrframe-active", "url": "#xrframe-active", "dfnText": "active", "refSections": [{"refs": [{"id": "ref-for-xrframe-active"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrframe-active\u2460"}, {"id": "ref-for-xrframe-active\u2461"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrframe-active\u2462"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrframe-active\u2463"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xrframe-active\u2464"}, {"id": "ref-for-xrframe-active\u2465"}], "title": "12.2. XRInputSourceEvent"}], "external": false}; window.dfnpanelData['xrframe-animationframe'] = {"dfnID": "xrframe-animationframe", "url": "#xrframe-animationframe", "dfnText": "animationFrame", "refSections": [{"refs": [{"id": "ref-for-xrframe-animationframe"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrframe-animationframe\u2460"}], "title": "5.1. XRFrame"}], "external": false}; window.dfnpanelData['dom-xrframe-session'] = {"dfnID": "dom-xrframe-session", "url": "#dom-xrframe-session", "dfnText": "session", "refSections": [{"refs": [{"id": "ref-for-dom-xrframe-session"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrframe-session\u2460"}, {"id": "ref-for-dom-xrframe-session\u2461"}, {"id": "ref-for-dom-xrframe-session\u2462"}, {"id": "ref-for-dom-xrframe-session\u2463"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-dom-xrframe-session\u2464"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrframe-session\u2465"}, {"id": "ref-for-dom-xrframe-session\u2466"}, {"id": "ref-for-dom-xrframe-session\u2467"}, {"id": "ref-for-dom-xrframe-session\u2468"}, {"id": "ref-for-dom-xrframe-session\u2460\u24ea"}, {"id": "ref-for-dom-xrframe-session\u2460\u2460"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-dom-xrframe-session\u2460\u2461"}, {"id": "ref-for-dom-xrframe-session\u2460\u2462"}, {"id": "ref-for-dom-xrframe-session\u2460\u2463"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-dom-xrframe-session\u2460\u2464"}], "title": "12.2. XRInputSourceEvent"}], "external": false}; window.dfnpanelData['dom-xrframe-predicteddisplaytime'] = {"dfnID": "dom-xrframe-predicteddisplaytime", "url": "#dom-xrframe-predicteddisplaytime", "dfnText": "predictedDisplayTime", "refSections": [{"refs": [{"id": "ref-for-dom-xrframe-predicteddisplaytime"}, {"id": "ref-for-dom-xrframe-predicteddisplaytime\u2460"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-dom-xrframe-predicteddisplaytime\u2461"}, {"id": "ref-for-dom-xrframe-predicteddisplaytime\u2462"}, {"id": "ref-for-dom-xrframe-predicteddisplaytime\u2463"}, {"id": "ref-for-dom-xrframe-predicteddisplaytime\u2464"}, {"id": "ref-for-dom-xrframe-predicteddisplaytime\u2465"}], "title": "5.1. XRFrame"}], "external": false}; window.dfnpanelData['xrframe-time'] = {"dfnID": "xrframe-time", "url": "#xrframe-time", "dfnText": "time", "refSections": [{"refs": [{"id": "ref-for-xrframe-time"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrframe-time\u2460"}, {"id": "ref-for-xrframe-time\u2461"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrframe-time\u2462"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrframe-time\u2463"}, {"id": "ref-for-xrframe-time\u2464"}, {"id": "ref-for-xrframe-time\u2465"}, {"id": "ref-for-xrframe-time\u2466"}, {"id": "ref-for-xrframe-time\u2467"}, {"id": "ref-for-xrframe-time\u2468"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['dom-xrframe-getviewerpose'] = {"dfnID": "dom-xrframe-getviewerpose", "url": "#dom-xrframe-getviewerpose", "dfnText": "getViewerPose(referenceSpace)", "refSections": [{"refs": [{"id": "ref-for-dom-xrframe-getviewerpose"}, {"id": "ref-for-dom-xrframe-getviewerpose\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrframe-getviewerpose\u2461"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-dom-xrframe-getviewerpose\u2462"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-dom-xrframe-getviewerpose\u2463"}], "title": "12.2. XRInputSourceEvent"}], "external": false}; window.dfnpanelData['dom-xrframe-getpose'] = {"dfnID": "dom-xrframe-getpose", "url": "#dom-xrframe-getpose", "dfnText": "getPose(space, baseSpace)", "refSections": [{"refs": [{"id": "ref-for-dom-xrframe-getpose"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-dom-xrframe-getpose\u2460"}], "title": "6.1. XRSpace"}], "external": false}; window.dfnpanelData['frame-update'] = {"dfnID": "frame-update", "url": "#frame-update", "dfnText": "frame update", "refSections": [{"refs": [{"id": "ref-for-frame-update"}, {"id": "ref-for-frame-update\u2460"}], "title": "5.1. XRFrame"}], "external": false}; window.dfnpanelData['xrsession-list-of-frame-updates'] = {"dfnID": "xrsession-list-of-frame-updates", "url": "#xrsession-list-of-frame-updates", "dfnText": "list of frame updates", "refSections": [{"refs": [{"id": "ref-for-xrsession-list-of-frame-updates"}], "title": "5.1. XRFrame"}], "external": false}; window.dfnpanelData['xrframe-apply-frame-updates'] = {"dfnID": "xrframe-apply-frame-updates", "url": "#xrframe-apply-frame-updates", "dfnText": "apply frame updates", "refSections": [{"refs": [{"id": "ref-for-xrframe-apply-frame-updates"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-xrframe-apply-frame-updates\u2460"}], "title": "12.2. XRInputSourceEvent"}], "external": false}; window.dfnpanelData['xrspace'] = {"dfnID": "xrspace", "url": "#xrspace", "dfnText": "XRSpace", "refSections": [{"refs": [{"id": "ref-for-xrspace"}, {"id": "ref-for-xrspace\u2460"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrspace\u2461"}, {"id": "ref-for-xrspace\u2462"}, {"id": "ref-for-xrspace\u2463"}, {"id": "ref-for-xrspace\u2464"}, {"id": "ref-for-xrspace\u2465"}, {"id": "ref-for-xrspace\u2466"}, {"id": "ref-for-xrspace\u2467"}, {"id": "ref-for-xrspace\u2468"}, {"id": "ref-for-xrspace\u2460\u24ea"}, {"id": "ref-for-xrspace\u2460\u2460"}, {"id": "ref-for-xrspace\u2460\u2461"}, {"id": "ref-for-xrspace\u2460\u2462"}, {"id": "ref-for-xrspace\u2460\u2463"}, {"id": "ref-for-xrspace\u2460\u2464"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrspace\u2460\u2465"}, {"id": "ref-for-xrspace\u2460\u2466"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-xrspace\u2460\u2467"}, {"id": "ref-for-xrspace\u2460\u2468"}, {"id": "ref-for-xrspace\u2461\u24ea"}, {"id": "ref-for-xrspace\u2461\u2460"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-xrspace\u2461\u2461"}, {"id": "ref-for-xrspace\u2461\u2462"}, {"id": "ref-for-xrspace\u2461\u2463"}, {"id": "ref-for-xrspace\u2461\u2464"}, {"id": "ref-for-xrspace\u2461\u2465"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['xrspace-session'] = {"dfnID": "xrspace-session", "url": "#xrspace-session", "dfnText": "session", "refSections": [{"refs": [{"id": "ref-for-xrspace-session"}, {"id": "ref-for-xrspace-session\u2460"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrspace-session\u2461"}], "title": "6.2. XRReferenceSpace"}], "external": false}; window.dfnpanelData['xrspace-native-origin'] = {"dfnID": "xrspace-native-origin", "url": "#xrspace-native-origin", "dfnText": "native origin", "refSections": [{"refs": [{"id": "ref-for-xrspace-native-origin"}, {"id": "ref-for-xrspace-native-origin\u2460"}, {"id": "ref-for-xrspace-native-origin\u2461"}, {"id": "ref-for-xrspace-native-origin\u2462"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrspace-native-origin\u2463"}, {"id": "ref-for-xrspace-native-origin\u2464"}, {"id": "ref-for-xrspace-native-origin\u2465"}, {"id": "ref-for-xrspace-native-origin\u2466"}, {"id": "ref-for-xrspace-native-origin\u2467"}, {"id": "ref-for-xrspace-native-origin\u2468"}, {"id": "ref-for-xrspace-native-origin\u2460\u24ea"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-xrspace-native-origin\u2460\u2460"}, {"id": "ref-for-xrspace-native-origin\u2460\u2461"}, {"id": "ref-for-xrspace-native-origin\u2460\u2462"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-xrspace-native-origin\u2460\u2463"}, {"id": "ref-for-xrspace-native-origin\u2460\u2464"}, {"id": "ref-for-xrspace-native-origin\u2460\u2465"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xrspace-native-origin\u2460\u2466"}], "title": "12.4. XRReferenceSpaceEvent"}, {"refs": [{"id": "ref-for-xrspace-native-origin\u2460\u2467"}, {"id": "ref-for-xrspace-native-origin\u2460\u2468"}], "title": "12.5. Event Types"}, {"refs": [{"id": "ref-for-xrspace-native-origin\u2461\u24ea"}, {"id": "ref-for-xrspace-native-origin\u2461\u2460"}, {"id": "ref-for-xrspace-native-origin\u2461\u2461"}, {"id": "ref-for-xrspace-native-origin\u2461\u2462"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['xrspace-effective-origin'] = {"dfnID": "xrspace-effective-origin", "url": "#xrspace-effective-origin", "dfnText": "effective origin", "refSections": [{"refs": [{"id": "ref-for-xrspace-effective-origin"}, {"id": "ref-for-xrspace-effective-origin\u2460"}, {"id": "ref-for-xrspace-effective-origin\u2461"}, {"id": "ref-for-xrspace-effective-origin\u2462"}, {"id": "ref-for-xrspace-effective-origin\u2463"}, {"id": "ref-for-xrspace-effective-origin\u2464"}, {"id": "ref-for-xrspace-effective-origin\u2465"}, {"id": "ref-for-xrspace-effective-origin\u2466"}, {"id": "ref-for-xrspace-effective-origin\u2467"}, {"id": "ref-for-xrspace-effective-origin\u2468"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrspace-effective-origin\u2460\u24ea"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-xrspace-effective-origin\u2460\u2460"}, {"id": "ref-for-xrspace-effective-origin\u2460\u2461"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['xrspace-coordinate-system'] = {"dfnID": "xrspace-coordinate-system", "url": "#xrspace-coordinate-system", "dfnText": "coordinate system", "refSections": [{"refs": [{"id": "ref-for-xrspace-coordinate-system"}, {"id": "ref-for-xrspace-coordinate-system\u2460"}, {"id": "ref-for-xrspace-coordinate-system\u2461"}, {"id": "ref-for-xrspace-coordinate-system\u2462"}, {"id": "ref-for-xrspace-coordinate-system\u2463"}, {"id": "ref-for-xrspace-coordinate-system\u2464"}, {"id": "ref-for-xrspace-coordinate-system\u2465"}, {"id": "ref-for-xrspace-coordinate-system\u2466"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrspace-coordinate-system\u2467"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['xrspace-origin-offset'] = {"dfnID": "xrspace-origin-offset", "url": "#xrspace-origin-offset", "dfnText": "origin offset", "refSections": [{"refs": [{"id": "ref-for-xrspace-origin-offset"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrspace-origin-offset\u2460"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrspace-origin-offset\u2461"}, {"id": "ref-for-xrspace-origin-offset\u2462"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-xrspace-origin-offset\u2463"}], "title": "6.3. XRBoundedReferenceSpace"}], "external": false}; window.dfnpanelData['populate-the-pose'] = {"dfnID": "populate-the-pose", "url": "#populate-the-pose", "dfnText": "populate the pose", "refSections": [{"refs": [{"id": "ref-for-populate-the-pose"}, {"id": "ref-for-populate-the-pose\u2460"}], "title": "5.1. XRFrame"}], "external": false}; window.dfnpanelData['enumdef-xrreferencespacetype'] = {"dfnID": "enumdef-xrreferencespacetype", "url": "#enumdef-xrreferencespacetype", "dfnText": "XRReferenceSpaceType", "refSections": [{"refs": [{"id": "ref-for-enumdef-xrreferencespacetype"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-enumdef-xrreferencespacetype\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-enumdef-xrreferencespacetype\u2461"}, {"id": "ref-for-enumdef-xrreferencespacetype\u2462"}, {"id": "ref-for-enumdef-xrreferencespacetype\u2463"}], "title": "6.2. XRReferenceSpace"}], "external": false}; window.dfnpanelData['xrreferencespace'] = {"dfnID": "xrreferencespace", "url": "#xrreferencespace", "dfnText": "XRReferenceSpace", "refSections": [{"refs": [{"id": "ref-for-xrreferencespace"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-xrreferencespace\u2460"}, {"id": "ref-for-xrreferencespace\u2461"}, {"id": "ref-for-xrreferencespace\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrreferencespace\u2463"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrreferencespace\u2464"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrreferencespace\u2465"}, {"id": "ref-for-xrreferencespace\u2466"}, {"id": "ref-for-xrreferencespace\u2467"}, {"id": "ref-for-xrreferencespace\u2468"}, {"id": "ref-for-xrreferencespace\u2460\u24ea"}, {"id": "ref-for-xrreferencespace\u2460\u2460"}, {"id": "ref-for-xrreferencespace\u2460\u2461"}, {"id": "ref-for-xrreferencespace\u2460\u2462"}, {"id": "ref-for-xrreferencespace\u2460\u2463"}, {"id": "ref-for-xrreferencespace\u2460\u2464"}, {"id": "ref-for-xrreferencespace\u2460\u2465"}, {"id": "ref-for-xrreferencespace\u2460\u2466"}, {"id": "ref-for-xrreferencespace\u2460\u2467"}, {"id": "ref-for-xrreferencespace\u2460\u2468"}, {"id": "ref-for-xrreferencespace\u2461\u24ea"}, {"id": "ref-for-xrreferencespace\u2461\u2460"}, {"id": "ref-for-xrreferencespace\u2461\u2461"}, {"id": "ref-for-xrreferencespace\u2461\u2462"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-xrreferencespace\u2461\u2463"}, {"id": "ref-for-xrreferencespace\u2461\u2464"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-xrreferencespace\u2461\u2465"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-xrreferencespace\u2461\u2466"}, {"id": "ref-for-xrreferencespace\u2461\u2467"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-xrreferencespace\u2461\u2468"}, {"id": "ref-for-xrreferencespace\u2462\u24ea"}, {"id": "ref-for-xrreferencespace\u2462\u2460"}, {"id": "ref-for-xrreferencespace\u2462\u2461"}], "title": "12.4. XRReferenceSpaceEvent"}, {"refs": [{"id": "ref-for-xrreferencespace\u2462\u2462"}, {"id": "ref-for-xrreferencespace\u2462\u2463"}, {"id": "ref-for-xrreferencespace\u2462\u2464"}], "title": "12.5. Event Types"}, {"refs": [{"id": "ref-for-xrreferencespace\u2462\u2465"}, {"id": "ref-for-xrreferencespace\u2462\u2466"}], "title": "13.5.3. Reference spaces"}, {"refs": [{"id": "ref-for-xrreferencespace\u2462\u2467"}], "title": "14.1. Permissions Policy"}], "external": false}; window.dfnpanelData['xrreferencespace-type'] = {"dfnID": "xrreferencespace-type", "url": "#xrreferencespace-type", "dfnText": "type", "refSections": [{"refs": [{"id": "ref-for-xrreferencespace-type"}, {"id": "ref-for-xrreferencespace-type\u2460"}, {"id": "ref-for-xrreferencespace-type\u2461"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-xrreferencespace-type\u2462"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['dom-xrreferencespacetype-viewer'] = {"dfnID": "dom-xrreferencespacetype-viewer", "url": "#dom-xrreferencespacetype-viewer", "dfnText": "viewer", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespacetype-viewer"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-viewer\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-viewer\u2461"}, {"id": "ref-for-dom-xrreferencespacetype-viewer\u2462"}, {"id": "ref-for-dom-xrreferencespacetype-viewer\u2463"}, {"id": "ref-for-dom-xrreferencespacetype-viewer\u2464"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-viewer\u2465"}], "title": "14.1. Permissions Policy"}], "external": false}; window.dfnpanelData['dom-xrreferencespacetype-local'] = {"dfnID": "dom-xrreferencespacetype-local", "url": "#dom-xrreferencespacetype-local", "dfnText": "local", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespacetype-local"}, {"id": "ref-for-dom-xrreferencespacetype-local\u2460"}, {"id": "ref-for-dom-xrreferencespacetype-local\u2461"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-local\u2462"}, {"id": "ref-for-dom-xrreferencespacetype-local\u2463"}, {"id": "ref-for-dom-xrreferencespacetype-local\u2464"}, {"id": "ref-for-dom-xrreferencespacetype-local\u2465"}, {"id": "ref-for-dom-xrreferencespacetype-local\u2466"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-local\u2467"}, {"id": "ref-for-dom-xrreferencespacetype-local\u2468"}, {"id": "ref-for-dom-xrreferencespacetype-local\u2460\u24ea"}, {"id": "ref-for-dom-xrreferencespacetype-local\u2460\u2460"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['dom-xrreferencespacetype-local-floor'] = {"dfnID": "dom-xrreferencespacetype-local-floor", "url": "#dom-xrreferencespacetype-local-floor", "dfnText": "local-floor", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespacetype-local-floor"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-local-floor\u2460"}, {"id": "ref-for-dom-xrreferencespacetype-local-floor\u2461"}, {"id": "ref-for-dom-xrreferencespacetype-local-floor\u2462"}, {"id": "ref-for-dom-xrreferencespacetype-local-floor\u2463"}, {"id": "ref-for-dom-xrreferencespacetype-local-floor\u2464"}, {"id": "ref-for-dom-xrreferencespacetype-local-floor\u2465"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-local-floor\u2466"}, {"id": "ref-for-dom-xrreferencespacetype-local-floor\u2467"}, {"id": "ref-for-dom-xrreferencespacetype-local-floor\u2468"}, {"id": "ref-for-dom-xrreferencespacetype-local-floor\u2460\u24ea"}, {"id": "ref-for-dom-xrreferencespacetype-local-floor\u2460\u2460"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['estimated-floor-level'] = {"dfnID": "estimated-floor-level", "url": "#estimated-floor-level", "dfnText": "estimated floor level", "refSections": [{"refs": [{"id": "ref-for-estimated-floor-level"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-estimated-floor-level\u2460"}], "title": "9.1. XRPose"}], "external": false}; window.dfnpanelData['dom-xrreferencespacetype-bounded-floor'] = {"dfnID": "dom-xrreferencespacetype-bounded-floor", "url": "#dom-xrreferencespacetype-bounded-floor", "dfnText": "bounded-floor", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespacetype-bounded-floor"}, {"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2460"}, {"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2461"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2463"}, {"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2464"}, {"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2465"}, {"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2466"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2467"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2468"}, {"id": "ref-for-dom-xrreferencespacetype-bounded-floor\u2460\u24ea"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['dom-xrreferencespacetype-unbounded'] = {"dfnID": "dom-xrreferencespacetype-unbounded", "url": "#dom-xrreferencespacetype-unbounded", "dfnText": "unbounded", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespacetype-unbounded"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-unbounded\u2460"}, {"id": "ref-for-dom-xrreferencespacetype-unbounded\u2461"}, {"id": "ref-for-dom-xrreferencespacetype-unbounded\u2462"}, {"id": "ref-for-dom-xrreferencespacetype-unbounded\u2463"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-unbounded\u2464"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-unbounded\u2465"}], "title": "12.5. Event Types"}, {"refs": [{"id": "ref-for-dom-xrreferencespacetype-unbounded\u2466"}, {"id": "ref-for-dom-xrreferencespacetype-unbounded\u2467"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['dom-xrreferencespace-onreset'] = {"dfnID": "dom-xrreferencespace-onreset", "url": "#dom-xrreferencespace-onreset", "dfnText": "onreset", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespace-onreset"}], "title": "6.2. XRReferenceSpace"}], "external": false}; window.dfnpanelData['create-a-reference-space'] = {"dfnID": "create-a-reference-space", "url": "#create-a-reference-space", "dfnText": "create a reference space", "refSections": [{"refs": [{"id": "ref-for-create-a-reference-space"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['reference-space-is-supported'] = {"dfnID": "reference-space-is-supported", "url": "#reference-space-is-supported", "dfnText": "reference space is supported", "refSections": [{"refs": [{"id": "ref-for-reference-space-is-supported"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-reference-space-is-supported\u2460"}], "title": "6.2. XRReferenceSpace"}], "external": false}; window.dfnpanelData['dom-xrreferencespace-getoffsetreferencespace'] = {"dfnID": "dom-xrreferencespace-getoffsetreferencespace", "url": "#dom-xrreferencespace-getoffsetreferencespace", "dfnText": "getOffsetReferenceSpace(originOffset)", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespace-getoffsetreferencespace"}, {"id": "ref-for-dom-xrreferencespace-getoffsetreferencespace\u2460"}, {"id": "ref-for-dom-xrreferencespace-getoffsetreferencespace\u2461"}, {"id": "ref-for-dom-xrreferencespace-getoffsetreferencespace\u2462"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrreferencespace-getoffsetreferencespace\u2463"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['xrboundedreferencespace'] = {"dfnID": "xrboundedreferencespace", "url": "#xrboundedreferencespace", "dfnText": "XRBoundedReferenceSpace", "refSections": [{"refs": [{"id": "ref-for-xrboundedreferencespace"}, {"id": "ref-for-xrboundedreferencespace\u2460"}, {"id": "ref-for-xrboundedreferencespace\u2461"}, {"id": "ref-for-xrboundedreferencespace\u2462"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-xrboundedreferencespace\u2463"}, {"id": "ref-for-xrboundedreferencespace\u2464"}, {"id": "ref-for-xrboundedreferencespace\u2465"}, {"id": "ref-for-xrboundedreferencespace\u2466"}, {"id": "ref-for-xrboundedreferencespace\u2467"}, {"id": "ref-for-xrboundedreferencespace\u2468"}, {"id": "ref-for-xrboundedreferencespace\u2460\u24ea"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-xrboundedreferencespace\u2460\u2460"}, {"id": "ref-for-xrboundedreferencespace\u2460\u2461"}], "title": "12.5. Event Types"}, {"refs": [{"id": "ref-for-xrboundedreferencespace\u2460\u2462"}, {"id": "ref-for-xrboundedreferencespace\u2460\u2463"}, {"id": "ref-for-xrboundedreferencespace\u2460\u2464"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['xrboundedreferencespace-native-bounds-geometry'] = {"dfnID": "xrboundedreferencespace-native-bounds-geometry", "url": "#xrboundedreferencespace-native-bounds-geometry", "dfnText": "native bounds geometry", "refSections": [{"refs": [{"id": "ref-for-xrboundedreferencespace-native-bounds-geometry"}, {"id": "ref-for-xrboundedreferencespace-native-bounds-geometry\u2460"}, {"id": "ref-for-xrboundedreferencespace-native-bounds-geometry\u2461"}, {"id": "ref-for-xrboundedreferencespace-native-bounds-geometry\u2462"}, {"id": "ref-for-xrboundedreferencespace-native-bounds-geometry\u2463"}, {"id": "ref-for-xrboundedreferencespace-native-bounds-geometry\u2464"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-xrboundedreferencespace-native-bounds-geometry\u2465"}, {"id": "ref-for-xrboundedreferencespace-native-bounds-geometry\u2466"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['dom-xrboundedreferencespace-boundsgeometry'] = {"dfnID": "dom-xrboundedreferencespace-boundsgeometry", "url": "#dom-xrboundedreferencespace-boundsgeometry", "dfnText": "boundsGeometry", "refSections": [{"refs": [{"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry"}, {"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2460"}, {"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2461"}, {"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2462"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2463"}, {"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2464"}, {"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2465"}, {"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2466"}, {"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2467"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2468"}, {"id": "ref-for-dom-xrboundedreferencespace-boundsgeometry\u2460\u24ea"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['bounded-reference-spaces-are-supported'] = {"dfnID": "bounded-reference-spaces-are-supported", "url": "#bounded-reference-spaces-are-supported", "dfnText": "bounded reference spaces are supported", "refSections": [{"refs": [{"id": "ref-for-bounded-reference-spaces-are-supported"}], "title": "6.2. XRReferenceSpace"}], "external": false}; window.dfnpanelData['view'] = {"dfnID": "view", "url": "#view", "dfnText": "view", "refSections": [{"refs": [{"id": "ref-for-view"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-view\u2460"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-view\u2461"}, {"id": "ref-for-view\u2462"}, {"id": "ref-for-view\u2463"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-view\u2464"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-view\u2465"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-view\u2466"}, {"id": "ref-for-view\u2467"}, {"id": "ref-for-view\u2468"}, {"id": "ref-for-view\u2460\u24ea"}, {"id": "ref-for-view\u2460\u2460"}, {"id": "ref-for-view\u2460\u2461"}, {"id": "ref-for-view\u2460\u2462"}, {"id": "ref-for-view\u2460\u2463"}, {"id": "ref-for-view\u2460\u2464"}, {"id": "ref-for-view\u2460\u2465"}, {"id": "ref-for-view\u2460\u2466"}, {"id": "ref-for-view\u2460\u2467"}, {"id": "ref-for-view\u2460\u2468"}, {"id": "ref-for-view\u2461\u24ea"}, {"id": "ref-for-view\u2461\u2460"}, {"id": "ref-for-view\u2461\u2461"}, {"id": "ref-for-view\u2461\u2462"}, {"id": "ref-for-view\u2461\u2463"}, {"id": "ref-for-view\u2461\u2464"}, {"id": "ref-for-view\u2461\u2465"}, {"id": "ref-for-view\u2461\u2466"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-view\u2461\u2467"}, {"id": "ref-for-view\u2461\u2468"}, {"id": "ref-for-view\u2462\u24ea"}, {"id": "ref-for-view\u2462\u2460"}], "title": "7.2. Primary and Secondary Views"}, {"refs": [{"id": "ref-for-view\u2462\u2461"}, {"id": "ref-for-view\u2462\u2462"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-view\u2462\u2463"}, {"id": "ref-for-view\u2462\u2464"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['view-offset'] = {"dfnID": "view-offset", "url": "#view-offset", "dfnText": "view offset", "refSections": [{"refs": [{"id": "ref-for-view-offset"}], "title": "5.1. XRFrame"}], "external": false}; window.dfnpanelData['view-projection-matrix'] = {"dfnID": "view-projection-matrix", "url": "#view-projection-matrix", "dfnText": "projection matrix", "refSections": [{"refs": [{"id": "ref-for-view-projection-matrix"}, {"id": "ref-for-view-projection-matrix\u2460"}, {"id": "ref-for-view-projection-matrix\u2461"}, {"id": "ref-for-view-projection-matrix\u2462"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['view-eye'] = {"dfnID": "view-eye", "url": "#view-eye", "dfnText": "eye", "refSections": [{"refs": [{"id": "ref-for-view-eye"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-view-eye\u2460"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-view-eye\u2461"}], "title": "7.2. Primary and Secondary Views"}], "external": false}; window.dfnpanelData['view-active'] = {"dfnID": "view-active", "url": "#view-active", "dfnText": "active", "refSections": [{"refs": [{"id": "ref-for-view-active"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-view-active\u2460"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-view-active\u2461"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-view-active\u2462"}, {"id": "ref-for-view-active\u2463"}, {"id": "ref-for-view-active\u2464"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-view-active\u2465"}, {"id": "ref-for-view-active\u2466"}], "title": "7.2. Primary and Secondary Views"}, {"refs": [{"id": "ref-for-view-active\u2467"}, {"id": "ref-for-view-active\u2468"}, {"id": "ref-for-view-active\u2460\u24ea"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['view-viewport-modifiable'] = {"dfnID": "view-viewport-modifiable", "url": "#view-viewport-modifiable", "dfnText": "viewport modifiable", "refSections": [{"refs": [{"id": "ref-for-view-viewport-modifiable"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-view-viewport-modifiable\u2460"}, {"id": "ref-for-view-viewport-modifiable\u2461"}, {"id": "ref-for-view-viewport-modifiable\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['view-requested-viewport-scale'] = {"dfnID": "view-requested-viewport-scale", "url": "#view-requested-viewport-scale", "dfnText": "requested viewport scale", "refSections": [{"refs": [{"id": "ref-for-view-requested-viewport-scale"}, {"id": "ref-for-view-requested-viewport-scale\u2460"}, {"id": "ref-for-view-requested-viewport-scale\u2461"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-view-requested-viewport-scale\u2462"}, {"id": "ref-for-view-requested-viewport-scale\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['view-current-viewport-scale'] = {"dfnID": "view-current-viewport-scale", "url": "#view-current-viewport-scale", "dfnText": "current viewport scale", "refSections": [{"refs": [{"id": "ref-for-view-current-viewport-scale"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-view-current-viewport-scale\u2460"}, {"id": "ref-for-view-current-viewport-scale\u2461"}, {"id": "ref-for-view-current-viewport-scale\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['enumdef-xreye'] = {"dfnID": "enumdef-xreye", "url": "#enumdef-xreye", "dfnText": "XREye", "refSections": [{"refs": [{"id": "ref-for-enumdef-xreye"}, {"id": "ref-for-enumdef-xreye\u2460"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['dom-xreye-none'] = {"dfnID": "dom-xreye-none", "url": "#dom-xreye-none", "dfnText": "\"none\"", "refSections": [{"refs": [{"id": "ref-for-dom-xreye-none"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['xrview'] = {"dfnID": "xrview", "url": "#xrview", "dfnText": "XRView", "refSections": [{"refs": [{"id": "ref-for-xrview"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-xrview\u2460"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrview\u2461"}, {"id": "ref-for-xrview\u2462"}, {"id": "ref-for-xrview\u2463"}, {"id": "ref-for-xrview\u2464"}, {"id": "ref-for-xrview\u2465"}, {"id": "ref-for-xrview\u2466"}, {"id": "ref-for-xrview\u2467"}, {"id": "ref-for-xrview\u2468"}, {"id": "ref-for-xrview\u2460\u24ea"}, {"id": "ref-for-xrview\u2460\u2460"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-xrview\u2460\u2461"}], "title": "7.3. XRViewport"}, {"refs": [{"id": "ref-for-xrview\u2460\u2462"}, {"id": "ref-for-xrview\u2460\u2463"}, {"id": "ref-for-xrview\u2460\u2464"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-xrview\u2460\u2465"}, {"id": "ref-for-xrview\u2460\u2466"}, {"id": "ref-for-xrview\u2460\u2467"}, {"id": "ref-for-xrview\u2460\u2468"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xrview\u2461\u24ea"}, {"id": "ref-for-xrview\u2461\u2460"}, {"id": "ref-for-xrview\u2461\u2461"}, {"id": "ref-for-xrview\u2461\u2462"}, {"id": "ref-for-xrview\u2461\u2463"}], "title": "13.5.2. Poses"}], "external": false}; window.dfnpanelData['dom-xrview-eye'] = {"dfnID": "dom-xrview-eye", "url": "#dom-xrview-eye", "dfnText": "eye", "refSections": [{"refs": [{"id": "ref-for-dom-xrview-eye"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-dom-xrview-eye\u2460"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['dom-xrview-projectionmatrix'] = {"dfnID": "dom-xrview-projectionmatrix", "url": "#dom-xrview-projectionmatrix", "dfnText": "projectionMatrix", "refSections": [{"refs": [{"id": "ref-for-dom-xrview-projectionmatrix"}, {"id": "ref-for-dom-xrview-projectionmatrix\u2460"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-dom-xrview-projectionmatrix\u2461"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['dom-xrview-transform'] = {"dfnID": "dom-xrview-transform", "url": "#dom-xrview-transform", "dfnText": "transform", "refSections": [{"refs": [{"id": "ref-for-dom-xrview-transform"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-dom-xrview-transform\u2460"}, {"id": "ref-for-dom-xrview-transform\u2461"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['dom-xrview-recommendedviewportscale'] = {"dfnID": "dom-xrview-recommendedviewportscale", "url": "#dom-xrview-recommendedviewportscale", "dfnText": "recommendedViewportScale", "refSections": [{"refs": [{"id": "ref-for-dom-xrview-recommendedviewportscale"}, {"id": "ref-for-dom-xrview-recommendedviewportscale\u2460"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['xrview-session'] = {"dfnID": "xrview-session", "url": "#xrview-session", "dfnText": "session", "refSections": [{"refs": [{"id": "ref-for-xrview-session"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrview-session\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['xrview-frame'] = {"dfnID": "xrview-frame", "url": "#xrview-frame", "dfnText": "frame", "refSections": [{"refs": [{"id": "ref-for-xrview-frame"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrview-frame\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['xrview-underlying-view'] = {"dfnID": "xrview-underlying-view", "url": "#xrview-underlying-view", "dfnText": "underlying view", "refSections": [{"refs": [{"id": "ref-for-xrview-underlying-view"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrview-underlying-view\u2460"}, {"id": "ref-for-xrview-underlying-view\u2461"}, {"id": "ref-for-xrview-underlying-view\u2462"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['xrview-internal-projection-matrix'] = {"dfnID": "xrview-internal-projection-matrix", "url": "#xrview-internal-projection-matrix", "dfnText": "internal projection matrix", "refSections": [{"refs": [{"id": "ref-for-xrview-internal-projection-matrix"}, {"id": "ref-for-xrview-internal-projection-matrix\u2460"}, {"id": "ref-for-xrview-internal-projection-matrix\u2461"}, {"id": "ref-for-xrview-internal-projection-matrix\u2462"}, {"id": "ref-for-xrview-internal-projection-matrix\u2463"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['dom-xrview-requestviewportscale'] = {"dfnID": "dom-xrview-requestviewportscale", "url": "#dom-xrview-requestviewportscale", "dfnText": "requestViewportScale(scale)", "refSections": [{"refs": [{"id": "ref-for-dom-xrview-requestviewportscale"}, {"id": "ref-for-dom-xrview-requestviewportscale\u2460"}, {"id": "ref-for-dom-xrview-requestviewportscale\u2461"}, {"id": "ref-for-dom-xrview-requestviewportscale\u2462"}, {"id": "ref-for-dom-xrview-requestviewportscale\u2463"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-dom-xrview-requestviewportscale\u2464"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['xrview-obtain-the-projection-matrix'] = {"dfnID": "xrview-obtain-the-projection-matrix", "url": "#xrview-obtain-the-projection-matrix", "dfnText": "obtain the projection matrix", "refSections": [{"refs": [{"id": "ref-for-xrview-obtain-the-projection-matrix"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['update-the-viewports'] = {"dfnID": "update-the-viewports", "url": "#update-the-viewports", "dfnText": "update the viewports", "refSections": [{"refs": [{"id": "ref-for-update-the-viewports"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-update-the-viewports\u2460"}], "title": "4.3. Animation Frames"}], "external": false}; window.dfnpanelData['xrview-obtain-a-scaled-viewport'] = {"dfnID": "xrview-obtain-a-scaled-viewport", "url": "#xrview-obtain-a-scaled-viewport", "dfnText": "obtain a scaled viewport", "refSections": [{"refs": [{"id": "ref-for-xrview-obtain-a-scaled-viewport"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-xrview-obtain-a-scaled-viewport\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['primary-view'] = {"dfnID": "primary-view", "url": "#primary-view", "dfnText": "primary view", "refSections": [{"refs": [{"id": "ref-for-primary-view"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-primary-view\u2460"}, {"id": "ref-for-primary-view\u2461"}, {"id": "ref-for-primary-view\u2462"}], "title": "7.2. Primary and Secondary Views"}], "external": false}; window.dfnpanelData['secondary-view'] = {"dfnID": "secondary-view", "url": "#secondary-view", "dfnText": "secondary view", "refSections": [{"refs": [{"id": "ref-for-secondary-view"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-secondary-view\u2460"}, {"id": "ref-for-secondary-view\u2461"}, {"id": "ref-for-secondary-view\u2462"}, {"id": "ref-for-secondary-view\u2463"}, {"id": "ref-for-secondary-view\u2464"}, {"id": "ref-for-secondary-view\u2465"}, {"id": "ref-for-secondary-view\u2466"}, {"id": "ref-for-secondary-view\u2467"}, {"id": "ref-for-secondary-view\u2468"}, {"id": "ref-for-secondary-view\u2460\u24ea"}, {"id": "ref-for-secondary-view\u2460\u2460"}], "title": "7.2. Primary and Secondary Views"}, {"refs": [{"id": "ref-for-secondary-view\u2460\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['secondary-view-secondary-views'] = {"dfnID": "secondary-view-secondary-views", "url": "#secondary-view-secondary-views", "dfnText": "secondary-views", "refSections": [{"refs": [{"id": "ref-for-secondary-view-secondary-views"}, {"id": "ref-for-secondary-view-secondary-views\u2460"}, {"id": "ref-for-secondary-view-secondary-views\u2461"}], "title": "7.2. Primary and Secondary Views"}], "external": false}; window.dfnpanelData['xrviewport'] = {"dfnID": "xrviewport", "url": "#xrviewport", "dfnText": "XRViewport", "refSections": [{"refs": [{"id": "ref-for-xrviewport"}, {"id": "ref-for-xrviewport\u2460"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-xrviewport\u2461"}, {"id": "ref-for-xrviewport\u2462"}], "title": "7.3. XRViewport"}, {"refs": [{"id": "ref-for-xrviewport\u2463"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-xrviewport\u2464"}, {"id": "ref-for-xrviewport\u2465"}, {"id": "ref-for-xrviewport\u2466"}, {"id": "ref-for-xrviewport\u2467"}, {"id": "ref-for-xrviewport\u2468"}, {"id": "ref-for-xrviewport\u2460\u24ea"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrviewport-x'] = {"dfnID": "dom-xrviewport-x", "url": "#dom-xrviewport-x", "dfnText": "x", "refSections": [{"refs": [{"id": "ref-for-dom-xrviewport-x"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-dom-xrviewport-x\u2460"}, {"id": "ref-for-dom-xrviewport-x\u2461"}, {"id": "ref-for-dom-xrviewport-x\u2462"}], "title": "7.3. XRViewport"}], "external": false}; window.dfnpanelData['dom-xrviewport-y'] = {"dfnID": "dom-xrviewport-y", "url": "#dom-xrviewport-y", "dfnText": "y", "refSections": [{"refs": [{"id": "ref-for-dom-xrviewport-y"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-dom-xrviewport-y\u2460"}, {"id": "ref-for-dom-xrviewport-y\u2461"}, {"id": "ref-for-dom-xrviewport-y\u2462"}], "title": "7.3. XRViewport"}], "external": false}; window.dfnpanelData['dom-xrviewport-width'] = {"dfnID": "dom-xrviewport-width", "url": "#dom-xrviewport-width", "dfnText": "width", "refSections": [{"refs": [{"id": "ref-for-dom-xrviewport-width"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-dom-xrviewport-width\u2460"}, {"id": "ref-for-dom-xrviewport-width\u2461"}], "title": "7.3. XRViewport"}, {"refs": [{"id": "ref-for-dom-xrviewport-width\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrviewport-height'] = {"dfnID": "dom-xrviewport-height", "url": "#dom-xrviewport-height", "dfnText": "height", "refSections": [{"refs": [{"id": "ref-for-dom-xrviewport-height"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-dom-xrviewport-height\u2460"}, {"id": "ref-for-dom-xrviewport-height\u2461"}], "title": "7.3. XRViewport"}, {"refs": [{"id": "ref-for-dom-xrviewport-height\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['matrix'] = {"dfnID": "matrix", "url": "#matrix", "dfnText": "matrices", "refSections": [{"refs": [{"id": "ref-for-matrix"}, {"id": "ref-for-matrix\u2460"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-matrix\u2461"}, {"id": "ref-for-matrix\u2462"}, {"id": "ref-for-matrix\u2463"}, {"id": "ref-for-matrix\u2464"}], "title": "8.3. XRRigidTransform"}], "external": false}; window.dfnpanelData['normalize'] = {"dfnID": "normalize", "url": "#normalize", "dfnText": "normalize", "refSections": [{"refs": [{"id": "ref-for-normalize"}], "title": "8.3. XRRigidTransform"}], "external": false}; window.dfnpanelData['xrrigidtransform-internal-matrix'] = {"dfnID": "xrrigidtransform-internal-matrix", "url": "#xrrigidtransform-internal-matrix", "dfnText": "internal matrix", "refSections": [{"refs": [{"id": "ref-for-xrrigidtransform-internal-matrix"}, {"id": "ref-for-xrrigidtransform-internal-matrix\u2460"}, {"id": "ref-for-xrrigidtransform-internal-matrix\u2461"}, {"id": "ref-for-xrrigidtransform-internal-matrix\u2462"}, {"id": "ref-for-xrrigidtransform-internal-matrix\u2463"}, {"id": "ref-for-xrrigidtransform-internal-matrix\u2464"}], "title": "8.3. XRRigidTransform"}], "external": false}; window.dfnpanelData['xrrigidtransform'] = {"dfnID": "xrrigidtransform", "url": "#xrrigidtransform", "dfnText": "XRRigidTransform", "refSections": [{"refs": [{"id": "ref-for-xrrigidtransform"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrrigidtransform\u2460"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrrigidtransform\u2461"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-xrrigidtransform\u2462"}, {"id": "ref-for-xrrigidtransform\u2463"}, {"id": "ref-for-xrrigidtransform\u2464"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-xrrigidtransform\u2465"}, {"id": "ref-for-xrrigidtransform\u2466"}, {"id": "ref-for-xrrigidtransform\u2467"}, {"id": "ref-for-xrrigidtransform\u2468"}, {"id": "ref-for-xrrigidtransform\u2460\u24ea"}, {"id": "ref-for-xrrigidtransform\u2460\u2460"}, {"id": "ref-for-xrrigidtransform\u2460\u2461"}, {"id": "ref-for-xrrigidtransform\u2460\u2462"}, {"id": "ref-for-xrrigidtransform\u2460\u2463"}, {"id": "ref-for-xrrigidtransform\u2460\u2464"}, {"id": "ref-for-xrrigidtransform\u2460\u2465"}, {"id": "ref-for-xrrigidtransform\u2460\u2466"}, {"id": "ref-for-xrrigidtransform\u2460\u2467"}, {"id": "ref-for-xrrigidtransform\u2460\u2468"}], "title": "8.3. XRRigidTransform"}, {"refs": [{"id": "ref-for-xrrigidtransform\u2461\u24ea"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-xrrigidtransform\u2461\u2460"}, {"id": "ref-for-xrrigidtransform\u2461\u2461"}], "title": "12.4. XRReferenceSpaceEvent"}], "external": false}; window.dfnpanelData['dom-xrrigidtransform-xrrigidtransform'] = {"dfnID": "dom-xrrigidtransform-xrrigidtransform", "url": "#dom-xrrigidtransform-xrrigidtransform", "dfnText": "XRRigidTransform(position, orientation)", "refSections": [{"refs": [{"id": "ref-for-dom-xrrigidtransform-xrrigidtransform"}], "title": "8.3. XRRigidTransform"}], "external": false}; window.dfnpanelData['dom-xrrigidtransform-position'] = {"dfnID": "dom-xrrigidtransform-position", "url": "#dom-xrrigidtransform-position", "dfnText": "position", "refSections": [{"refs": [{"id": "ref-for-dom-xrrigidtransform-position"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460"}, {"id": "ref-for-dom-xrrigidtransform-position\u2461"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrrigidtransform-position\u2462"}, {"id": "ref-for-dom-xrrigidtransform-position\u2463"}, {"id": "ref-for-dom-xrrigidtransform-position\u2464"}, {"id": "ref-for-dom-xrrigidtransform-position\u2465"}, {"id": "ref-for-dom-xrrigidtransform-position\u2466"}, {"id": "ref-for-dom-xrrigidtransform-position\u2467"}, {"id": "ref-for-dom-xrrigidtransform-position\u2468"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460\u24ea"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460\u2460"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460\u2461"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460\u2462"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460\u2463"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460\u2464"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460\u2465"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460\u2466"}, {"id": "ref-for-dom-xrrigidtransform-position\u2460\u2467"}], "title": "8.3. XRRigidTransform"}, {"refs": [{"id": "ref-for-dom-xrrigidtransform-position\u2460\u2468"}], "title": "9.1. XRPose"}], "external": false}; window.dfnpanelData['dom-xrrigidtransform-orientation'] = {"dfnID": "dom-xrrigidtransform-orientation", "url": "#dom-xrrigidtransform-orientation", "dfnText": "orientation", "refSections": [{"refs": [{"id": "ref-for-dom-xrrigidtransform-orientation"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2461"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrrigidtransform-orientation\u2462"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2463"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2464"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2465"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2466"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2467"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2468"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460\u24ea"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460\u2460"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460\u2461"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460\u2462"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460\u2463"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460\u2464"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460\u2465"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460\u2466"}, {"id": "ref-for-dom-xrrigidtransform-orientation\u2460\u2467"}], "title": "8.3. XRRigidTransform"}], "external": false}; window.dfnpanelData['dom-xrrigidtransform-matrix'] = {"dfnID": "dom-xrrigidtransform-matrix", "url": "#dom-xrrigidtransform-matrix", "dfnText": "matrix", "refSections": [{"refs": [{"id": "ref-for-dom-xrrigidtransform-matrix"}, {"id": "ref-for-dom-xrrigidtransform-matrix\u2460"}, {"id": "ref-for-dom-xrrigidtransform-matrix\u2461"}, {"id": "ref-for-dom-xrrigidtransform-matrix\u2462"}, {"id": "ref-for-dom-xrrigidtransform-matrix\u2463"}, {"id": "ref-for-dom-xrrigidtransform-matrix\u2464"}], "title": "8.3. XRRigidTransform"}], "external": false}; window.dfnpanelData['xrrigidtransform-obtain-the-matrix'] = {"dfnID": "xrrigidtransform-obtain-the-matrix", "url": "#xrrigidtransform-obtain-the-matrix", "dfnText": "obtain the matrix", "refSections": [{"refs": [{"id": "ref-for-xrrigidtransform-obtain-the-matrix"}], "title": "8.3. XRRigidTransform"}], "external": false}; window.dfnpanelData['dom-xrrigidtransform-inverse'] = {"dfnID": "dom-xrrigidtransform-inverse", "url": "#dom-xrrigidtransform-inverse", "dfnText": "inverse", "refSections": [{"refs": [{"id": "ref-for-dom-xrrigidtransform-inverse"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrrigidtransform-inverse\u2460"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-dom-xrrigidtransform-inverse\u2461"}, {"id": "ref-for-dom-xrrigidtransform-inverse\u2462"}, {"id": "ref-for-dom-xrrigidtransform-inverse\u2463"}], "title": "8.3. XRRigidTransform"}], "external": false}; window.dfnpanelData['identity-transform'] = {"dfnID": "identity-transform", "url": "#identity-transform", "dfnText": "identity transform", "refSections": [{"refs": [{"id": "ref-for-identity-transform"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-identity-transform\u2460"}], "title": "6.1. XRSpace"}], "external": false}; window.dfnpanelData['multiply-transforms'] = {"dfnID": "multiply-transforms", "url": "#multiply-transforms", "dfnText": "multiply two XRRigidTransforms", "refSections": [{"refs": [{"id": "ref-for-multiply-transforms"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-multiply-transforms\u2460"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-multiply-transforms\u2461"}], "title": "6.2. XRReferenceSpace"}], "external": false}; window.dfnpanelData['xrpose'] = {"dfnID": "xrpose", "url": "#xrpose", "dfnText": "XRPose", "refSections": [{"refs": [{"id": "ref-for-xrpose"}, {"id": "ref-for-xrpose\u2460"}, {"id": "ref-for-xrpose\u2461"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrpose\u2462"}, {"id": "ref-for-xrpose\u2463"}, {"id": "ref-for-xrpose\u2464"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrpose\u2465"}, {"id": "ref-for-xrpose\u2466"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-xrpose\u2467"}, {"id": "ref-for-xrpose\u2468"}, {"id": "ref-for-xrpose\u2460\u24ea"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-xrpose\u2460\u2460"}], "title": "13.1. Sensitive Information"}, {"refs": [{"id": "ref-for-xrpose\u2460\u2461"}, {"id": "ref-for-xrpose\u2460\u2462"}], "title": "13.5.2. Poses"}], "external": false}; window.dfnpanelData['dom-xrpose-transform'] = {"dfnID": "dom-xrpose-transform", "url": "#dom-xrpose-transform", "dfnText": "transform", "refSections": [{"refs": [{"id": "ref-for-dom-xrpose-transform"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-dom-xrpose-transform\u2460"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrpose-transform\u2461"}, {"id": "ref-for-dom-xrpose-transform\u2462"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-dom-xrpose-transform\u2463"}], "title": "9.2. XRViewerPose"}], "external": false}; window.dfnpanelData['dom-xrpose-linearvelocity'] = {"dfnID": "dom-xrpose-linearvelocity", "url": "#dom-xrpose-linearvelocity", "dfnText": "linearVelocity", "refSections": [{"refs": [{"id": "ref-for-dom-xrpose-linearvelocity"}, {"id": "ref-for-dom-xrpose-linearvelocity\u2460"}, {"id": "ref-for-dom-xrpose-linearvelocity\u2461"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrpose-linearvelocity\u2462"}], "title": "9.1. XRPose"}], "external": false}; window.dfnpanelData['dom-xrpose-angularvelocity'] = {"dfnID": "dom-xrpose-angularvelocity", "url": "#dom-xrpose-angularvelocity", "dfnText": "angularVelocity", "refSections": [{"refs": [{"id": "ref-for-dom-xrpose-angularvelocity"}, {"id": "ref-for-dom-xrpose-angularvelocity\u2460"}, {"id": "ref-for-dom-xrpose-angularvelocity\u2461"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrpose-angularvelocity\u2462"}], "title": "9.1. XRPose"}], "external": false}; window.dfnpanelData['dom-xrpose-emulatedposition'] = {"dfnID": "dom-xrpose-emulatedposition", "url": "#dom-xrpose-emulatedposition", "dfnText": "emulatedPosition", "refSections": [{"refs": [{"id": "ref-for-dom-xrpose-emulatedposition"}, {"id": "ref-for-dom-xrpose-emulatedposition\u2460"}, {"id": "ref-for-dom-xrpose-emulatedposition\u2461"}, {"id": "ref-for-dom-xrpose-emulatedposition\u2462"}, {"id": "ref-for-dom-xrpose-emulatedposition\u2463"}, {"id": "ref-for-dom-xrpose-emulatedposition\u2464"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrpose-emulatedposition\u2465"}], "title": "9.1. XRPose"}, {"refs": [{"id": "ref-for-dom-xrpose-emulatedposition\u2466"}, {"id": "ref-for-dom-xrpose-emulatedposition\u2467"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['xrpose-computed-offset'] = {"dfnID": "xrpose-computed-offset", "url": "#xrpose-computed-offset", "dfnText": "computed offset", "refSections": [{"refs": [{"id": "ref-for-xrpose-computed-offset"}], "title": "9.1. XRPose"}], "external": false}; window.dfnpanelData['viewer'] = {"dfnID": "viewer", "url": "#viewer", "dfnText": "viewer", "refSections": [{"refs": [{"id": "ref-for-viewer"}, {"id": "ref-for-viewer\u2460"}], "title": "3.3. XRSessionMode"}, {"refs": [{"id": "ref-for-viewer\u2461"}, {"id": "ref-for-viewer\u2462"}, {"id": "ref-for-viewer\u2463"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-viewer\u2464"}], "title": "4.3. Animation Frames"}, {"refs": [{"id": "ref-for-viewer\u2465"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-viewer\u2466"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-viewer\u2467"}, {"id": "ref-for-viewer\u2468"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-viewer\u2460\u24ea"}, {"id": "ref-for-viewer\u2460\u2460"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-viewer\u2460\u2461"}, {"id": "ref-for-viewer\u2460\u2462"}, {"id": "ref-for-viewer\u2460\u2463"}, {"id": "ref-for-viewer\u2460\u2464"}, {"id": "ref-for-viewer\u2460\u2465"}, {"id": "ref-for-viewer\u2460\u2466"}, {"id": "ref-for-viewer\u2460\u2467"}, {"id": "ref-for-viewer\u2460\u2468"}, {"id": "ref-for-viewer\u2461\u24ea"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['xrviewerpose'] = {"dfnID": "xrviewerpose", "url": "#xrviewerpose", "dfnText": "XRViewerPose", "refSections": [{"refs": [{"id": "ref-for-xrviewerpose"}, {"id": "ref-for-xrviewerpose\u2460"}, {"id": "ref-for-xrviewerpose\u2461"}, {"id": "ref-for-xrviewerpose\u2462"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-xrviewerpose\u2463"}], "title": "7.3. XRViewport"}, {"refs": [{"id": "ref-for-xrviewerpose\u2464"}, {"id": "ref-for-xrviewerpose\u2465"}, {"id": "ref-for-xrviewerpose\u2466"}, {"id": "ref-for-xrviewerpose\u2467"}], "title": "9.2. XRViewerPose"}, {"refs": [{"id": "ref-for-xrviewerpose\u2468"}, {"id": "ref-for-xrviewerpose\u2460\u24ea"}], "title": "13.5.2. Poses"}], "external": false}; window.dfnpanelData['dom-xrviewerpose-views'] = {"dfnID": "dom-xrviewerpose-views", "url": "#dom-xrviewerpose-views", "dfnText": "views", "refSections": [{"refs": [{"id": "ref-for-dom-xrviewerpose-views"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-dom-xrviewerpose-views\u2460"}, {"id": "ref-for-dom-xrviewerpose-views\u2461"}, {"id": "ref-for-dom-xrviewerpose-views\u2462"}, {"id": "ref-for-dom-xrviewerpose-views\u2463"}], "title": "7.2. Primary and Secondary Views"}, {"refs": [{"id": "ref-for-dom-xrviewerpose-views\u2464"}], "title": "9.2. XRViewerPose"}], "external": false}; window.dfnpanelData['xr-input-source'] = {"dfnID": "xr-input-source", "url": "#xr-input-source", "dfnText": "XR input source", "refSections": [{"refs": [{"id": "ref-for-xr-input-source"}], "title": "2.1. XR device"}, {"refs": [{"id": "ref-for-xr-input-source\u2460"}, {"id": "ref-for-xr-input-source\u2461"}, {"id": "ref-for-xr-input-source\u2462"}, {"id": "ref-for-xr-input-source\u2463"}, {"id": "ref-for-xr-input-source\u2464"}, {"id": "ref-for-xr-input-source\u2465"}, {"id": "ref-for-xr-input-source\u2466"}, {"id": "ref-for-xr-input-source\u2467"}, {"id": "ref-for-xr-input-source\u2468"}, {"id": "ref-for-xr-input-source\u2460\u24ea"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xr-input-source\u2460\u2460"}, {"id": "ref-for-xr-input-source\u2460\u2461"}, {"id": "ref-for-xr-input-source\u2460\u2462"}, {"id": "ref-for-xr-input-source\u2460\u2463"}, {"id": "ref-for-xr-input-source\u2460\u2464"}, {"id": "ref-for-xr-input-source\u2460\u2465"}, {"id": "ref-for-xr-input-source\u2460\u2466"}, {"id": "ref-for-xr-input-source\u2460\u2467"}, {"id": "ref-for-xr-input-source\u2460\u2468"}, {"id": "ref-for-xr-input-source\u2461\u24ea"}, {"id": "ref-for-xr-input-source\u2461\u2460"}, {"id": "ref-for-xr-input-source\u2461\u2461"}, {"id": "ref-for-xr-input-source\u2461\u2462"}, {"id": "ref-for-xr-input-source\u2461\u2463"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xr-input-source\u2461\u2464"}, {"id": "ref-for-xr-input-source\u2461\u2465"}, {"id": "ref-for-xr-input-source\u2461\u2466"}, {"id": "ref-for-xr-input-source\u2461\u2467"}, {"id": "ref-for-xr-input-source\u2461\u2468"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['enumdef-xrhandedness'] = {"dfnID": "enumdef-xrhandedness", "url": "#enumdef-xrhandedness", "dfnText": "XRHandedness", "refSections": [{"refs": [{"id": "ref-for-enumdef-xrhandedness"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['dom-xrhandedness-none'] = {"dfnID": "dom-xrhandedness-none", "url": "#dom-xrhandedness-none", "dfnText": "\"none\"", "refSections": [{"refs": [{"id": "ref-for-dom-xrhandedness-none"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['enumdef-xrtargetraymode'] = {"dfnID": "enumdef-xrtargetraymode", "url": "#enumdef-xrtargetraymode", "dfnText": "XRTargetRayMode", "refSections": [{"refs": [{"id": "ref-for-enumdef-xrtargetraymode"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['xrinputsource'] = {"dfnID": "xrinputsource", "url": "#xrinputsource", "dfnText": "XRInputSource", "refSections": [{"refs": [{"id": "ref-for-xrinputsource"}, {"id": "ref-for-xrinputsource\u2460"}, {"id": "ref-for-xrinputsource\u2461"}, {"id": "ref-for-xrinputsource\u2462"}, {"id": "ref-for-xrinputsource\u2463"}, {"id": "ref-for-xrinputsource\u2464"}, {"id": "ref-for-xrinputsource\u2465"}, {"id": "ref-for-xrinputsource\u2466"}, {"id": "ref-for-xrinputsource\u2467"}, {"id": "ref-for-xrinputsource\u2468"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrinputsource\u2460\u24ea"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-xrinputsource\u2460\u2460"}, {"id": "ref-for-xrinputsource\u2460\u2461"}, {"id": "ref-for-xrinputsource\u2460\u2462"}, {"id": "ref-for-xrinputsource\u2460\u2463"}, {"id": "ref-for-xrinputsource\u2460\u2464"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xrinputsource\u2460\u2465"}, {"id": "ref-for-xrinputsource\u2460\u2466"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-xrinputsource\u2460\u2467"}, {"id": "ref-for-xrinputsource\u2460\u2468"}, {"id": "ref-for-xrinputsource\u2461\u24ea"}, {"id": "ref-for-xrinputsource\u2461\u2460"}, {"id": "ref-for-xrinputsource\u2461\u2461"}], "title": "10.3. XRInputSourceArray"}, {"refs": [{"id": "ref-for-xrinputsource\u2461\u2462"}, {"id": "ref-for-xrinputsource\u2461\u2463"}, {"id": "ref-for-xrinputsource\u2461\u2464"}, {"id": "ref-for-xrinputsource\u2461\u2465"}, {"id": "ref-for-xrinputsource\u2461\u2466"}], "title": "12.2. XRInputSourceEvent"}, {"refs": [{"id": "ref-for-xrinputsource\u2461\u2467"}, {"id": "ref-for-xrinputsource\u2461\u2468"}, {"id": "ref-for-xrinputsource\u2462\u24ea"}, {"id": "ref-for-xrinputsource\u2462\u2460"}, {"id": "ref-for-xrinputsource\u2462\u2461"}, {"id": "ref-for-xrinputsource\u2462\u2462"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-xrinputsource\u2462\u2463"}, {"id": "ref-for-xrinputsource\u2462\u2464"}, {"id": "ref-for-xrinputsource\u2462\u2465"}, {"id": "ref-for-xrinputsource\u2462\u2466"}, {"id": "ref-for-xrinputsource\u2462\u2467"}, {"id": "ref-for-xrinputsource\u2462\u2468"}, {"id": "ref-for-xrinputsource\u2463\u24ea"}, {"id": "ref-for-xrinputsource\u2463\u2460"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['dom-xrinputsource-handedness'] = {"dfnID": "dom-xrinputsource-handedness", "url": "#dom-xrinputsource-handedness", "dfnText": "handedness", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsource-handedness"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrinputsource-handedness\u2460"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['dom-xrinputsource-targetraymode'] = {"dfnID": "dom-xrinputsource-targetraymode", "url": "#dom-xrinputsource-targetraymode", "dfnText": "targetRayMode", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsource-targetraymode"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrinputsource-targetraymode\u2460"}, {"id": "ref-for-dom-xrinputsource-targetraymode\u2461"}, {"id": "ref-for-dom-xrinputsource-targetraymode\u2462"}, {"id": "ref-for-dom-xrinputsource-targetraymode\u2463"}, {"id": "ref-for-dom-xrinputsource-targetraymode\u2464"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-dom-xrinputsource-targetraymode\u2465"}, {"id": "ref-for-dom-xrinputsource-targetraymode\u2466"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['dom-xrtargetraymode-gaze'] = {"dfnID": "dom-xrtargetraymode-gaze", "url": "#dom-xrtargetraymode-gaze", "dfnText": "gaze", "refSections": [{"refs": [{"id": "ref-for-dom-xrtargetraymode-gaze"}, {"id": "ref-for-dom-xrtargetraymode-gaze\u2460"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['dom-xrtargetraymode-tracked-pointer'] = {"dfnID": "dom-xrtargetraymode-tracked-pointer", "url": "#dom-xrtargetraymode-tracked-pointer", "dfnText": "tracked-pointer", "refSections": [{"refs": [{"id": "ref-for-dom-xrtargetraymode-tracked-pointer"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['dom-xrtargetraymode-screen'] = {"dfnID": "dom-xrtargetraymode-screen", "url": "#dom-xrtargetraymode-screen", "dfnText": "screen", "refSections": [{"refs": [{"id": "ref-for-dom-xrtargetraymode-screen"}, {"id": "ref-for-dom-xrtargetraymode-screen\u2460"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-dom-xrtargetraymode-screen\u2461"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['dom-xrtargetraymode-transient-pointer'] = {"dfnID": "dom-xrtargetraymode-transient-pointer", "url": "#dom-xrtargetraymode-transient-pointer", "dfnText": "transient-pointer", "refSections": [{"refs": [{"id": "ref-for-dom-xrtargetraymode-transient-pointer"}, {"id": "ref-for-dom-xrtargetraymode-transient-pointer\u2460"}, {"id": "ref-for-dom-xrtargetraymode-transient-pointer\u2461"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-dom-xrtargetraymode-transient-pointer\u2462"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['dom-xrinputsource-targetrayspace'] = {"dfnID": "dom-xrinputsource-targetrayspace", "url": "#dom-xrinputsource-targetrayspace", "dfnText": "targetRaySpace", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsource-targetrayspace"}, {"id": "ref-for-dom-xrinputsource-targetrayspace\u2460"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrinputsource-targetrayspace\u2461"}, {"id": "ref-for-dom-xrinputsource-targetrayspace\u2462"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['dom-xrinputsource-gripspace'] = {"dfnID": "dom-xrinputsource-gripspace", "url": "#dom-xrinputsource-gripspace", "dfnText": "gripSpace", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsource-gripspace"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrinputsource-gripspace\u2460"}, {"id": "ref-for-dom-xrinputsource-gripspace\u2461"}], "title": "6.1. XRSpace"}, {"refs": [{"id": "ref-for-dom-xrinputsource-gripspace\u2462"}, {"id": "ref-for-dom-xrinputsource-gripspace\u2463"}, {"id": "ref-for-dom-xrinputsource-gripspace\u2464"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['dom-xrinputsource-skiprendering'] = {"dfnID": "dom-xrinputsource-skiprendering", "url": "#dom-xrinputsource-skiprendering", "dfnText": "skipRendering", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsource-skiprendering"}, {"id": "ref-for-dom-xrinputsource-skiprendering\u2460"}, {"id": "ref-for-dom-xrinputsource-skiprendering\u2461"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['dom-xrinputsource-profiles'] = {"dfnID": "dom-xrinputsource-profiles", "url": "#dom-xrinputsource-profiles", "dfnText": "profiles", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsource-profiles"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrinputsource-profiles\u2460"}, {"id": "ref-for-dom-xrinputsource-profiles\u2461"}, {"id": "ref-for-dom-xrinputsource-profiles\u2462"}, {"id": "ref-for-dom-xrinputsource-profiles\u2463"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['xrinputsource-input-profile-name'] = {"dfnID": "xrinputsource-input-profile-name", "url": "#xrinputsource-input-profile-name", "dfnText": "input profile name", "refSections": [{"refs": [{"id": "ref-for-xrinputsource-input-profile-name"}, {"id": "ref-for-xrinputsource-input-profile-name\u2460"}, {"id": "ref-for-xrinputsource-input-profile-name\u2461"}, {"id": "ref-for-xrinputsource-input-profile-name\u2462"}, {"id": "ref-for-xrinputsource-input-profile-name\u2463"}, {"id": "ref-for-xrinputsource-input-profile-name\u2464"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['primary-input-source'] = {"dfnID": "primary-input-source", "url": "#primary-input-source", "dfnText": "primary input source", "refSections": [{"refs": [{"id": "ref-for-primary-input-source"}, {"id": "ref-for-primary-input-source\u2460"}, {"id": "ref-for-primary-input-source\u2461"}, {"id": "ref-for-primary-input-source\u2462"}, {"id": "ref-for-primary-input-source\u2463"}, {"id": "ref-for-primary-input-source\u2464"}, {"id": "ref-for-primary-input-source\u2465"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-primary-input-source\u2466"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-primary-input-source\u2467"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['primary-action'] = {"dfnID": "primary-action", "url": "#primary-action", "dfnText": "primary action", "refSections": [{"refs": [{"id": "ref-for-primary-action"}, {"id": "ref-for-primary-action\u2460"}, {"id": "ref-for-primary-action\u2461"}, {"id": "ref-for-primary-action\u2462"}, {"id": "ref-for-primary-action\u2463"}, {"id": "ref-for-primary-action\u2464"}, {"id": "ref-for-primary-action\u2465"}, {"id": "ref-for-primary-action\u2466"}, {"id": "ref-for-primary-action\u2467"}, {"id": "ref-for-primary-action\u2468"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-primary-action\u2460\u24ea"}, {"id": "ref-for-primary-action\u2460\u2460"}, {"id": "ref-for-primary-action\u2460\u2461"}, {"id": "ref-for-primary-action\u2460\u2462"}, {"id": "ref-for-primary-action\u2460\u2463"}, {"id": "ref-for-primary-action\u2460\u2464"}, {"id": "ref-for-primary-action\u2460\u2465"}, {"id": "ref-for-primary-action\u2460\u2466"}], "title": "10.2. Transient input"}, {"refs": [{"id": "ref-for-primary-action\u2460\u2467"}, {"id": "ref-for-primary-action\u2460\u2468"}, {"id": "ref-for-primary-action\u2461\u24ea"}, {"id": "ref-for-primary-action\u2461\u2460"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['tracked-input-source'] = {"dfnID": "tracked-input-source", "url": "#tracked-input-source", "dfnText": "tracked input source", "refSections": [{"refs": [{"id": "ref-for-tracked-input-source"}, {"id": "ref-for-tracked-input-source\u2460"}, {"id": "ref-for-tracked-input-source\u2461"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-tracked-input-source\u2462"}, {"id": "ref-for-tracked-input-source\u2463"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-tracked-input-source\u2464"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['primary-squeeze-action'] = {"dfnID": "primary-squeeze-action", "url": "#primary-squeeze-action", "dfnText": "primary squeeze action", "refSections": [{"refs": [{"id": "ref-for-primary-squeeze-action"}, {"id": "ref-for-primary-squeeze-action\u2460"}, {"id": "ref-for-primary-squeeze-action\u2461"}, {"id": "ref-for-primary-squeeze-action\u2462"}, {"id": "ref-for-primary-squeeze-action\u2463"}, {"id": "ref-for-primary-squeeze-action\u2464"}, {"id": "ref-for-primary-squeeze-action\u2465"}, {"id": "ref-for-primary-squeeze-action\u2466"}, {"id": "ref-for-primary-squeeze-action\u2467"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-primary-squeeze-action\u2468"}, {"id": "ref-for-primary-squeeze-action\u2460\u24ea"}, {"id": "ref-for-primary-squeeze-action\u2460\u2460"}, {"id": "ref-for-primary-squeeze-action\u2460\u2461"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['transient-input-sources'] = {"dfnID": "transient-input-sources", "url": "#transient-input-sources", "dfnText": "transient input sources", "refSections": [{"refs": [{"id": "ref-for-transient-input-sources"}, {"id": "ref-for-transient-input-sources\u2460"}, {"id": "ref-for-transient-input-sources\u2461"}, {"id": "ref-for-transient-input-sources\u2462"}, {"id": "ref-for-transient-input-sources\u2463"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['transient-action'] = {"dfnID": "transient-action", "url": "#transient-action", "dfnText": "transient action", "refSections": [{"refs": [{"id": "ref-for-transient-action"}, {"id": "ref-for-transient-action\u2460"}, {"id": "ref-for-transient-action\u2461"}, {"id": "ref-for-transient-action\u2462"}, {"id": "ref-for-transient-action\u2463"}, {"id": "ref-for-transient-action\u2464"}, {"id": "ref-for-transient-action\u2465"}, {"id": "ref-for-transient-action\u2466"}, {"id": "ref-for-transient-action\u2467"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['auxiliary-action'] = {"dfnID": "auxiliary-action", "url": "#auxiliary-action", "dfnText": "auxiliary action", "refSections": [{"refs": [{"id": "ref-for-auxiliary-action"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['xrinputsourcearray'] = {"dfnID": "xrinputsourcearray", "url": "#xrinputsourcearray", "dfnText": "XRInputSourceArray", "refSections": [{"refs": [{"id": "ref-for-xrinputsourcearray"}, {"id": "ref-for-xrinputsourcearray\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrinputsourcearray\u2461"}, {"id": "ref-for-xrinputsourcearray\u2462"}, {"id": "ref-for-xrinputsourcearray\u2463"}, {"id": "ref-for-xrinputsourcearray\u2464"}], "title": "10.3. XRInputSourceArray"}], "external": false}; window.dfnpanelData['dom-xrinputsourcearray-length'] = {"dfnID": "dom-xrinputsourcearray-length", "url": "#dom-xrinputsourcearray-length", "dfnText": "length", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsourcearray-length"}], "title": "10.3. XRInputSourceArray"}], "external": false}; window.dfnpanelData['xrlayer'] = {"dfnID": "xrlayer", "url": "#xrlayer", "dfnText": "XRLayer", "refSections": [{"refs": [{"id": "ref-for-xrlayer"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-xrlayer\u2460"}], "title": "11.1. XRLayer"}, {"refs": [{"id": "ref-for-xrlayer\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['typedefdef-xrwebglrenderingcontext'] = {"dfnID": "typedefdef-xrwebglrenderingcontext", "url": "#typedefdef-xrwebglrenderingcontext", "dfnText": "XRWebGLRenderingContext", "refSections": [{"refs": [{"id": "ref-for-typedefdef-xrwebglrenderingcontext"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dictdef-xrwebgllayerinit'] = {"dfnID": "dictdef-xrwebgllayerinit", "url": "#dictdef-xrwebgllayerinit", "dfnText": "XRWebGLLayerInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-xrwebgllayerinit"}, {"id": "ref-for-dictdef-xrwebgllayerinit\u2460"}, {"id": "ref-for-dictdef-xrwebgllayerinit\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayerinit-antialias'] = {"dfnID": "dom-xrwebgllayerinit-antialias", "url": "#dom-xrwebgllayerinit-antialias", "dfnText": "antialias", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayerinit-antialias"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayerinit-depth'] = {"dfnID": "dom-xrwebgllayerinit-depth", "url": "#dom-xrwebgllayerinit-depth", "dfnText": "depth", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayerinit-depth"}, {"id": "ref-for-dom-xrwebgllayerinit-depth\u2460"}, {"id": "ref-for-dom-xrwebgllayerinit-depth\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayerinit-stencil'] = {"dfnID": "dom-xrwebgllayerinit-stencil", "url": "#dom-xrwebgllayerinit-stencil", "dfnText": "stencil", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayerinit-stencil"}, {"id": "ref-for-dom-xrwebgllayerinit-stencil\u2460"}, {"id": "ref-for-dom-xrwebgllayerinit-stencil\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayerinit-alpha'] = {"dfnID": "dom-xrwebgllayerinit-alpha", "url": "#dom-xrwebgllayerinit-alpha", "dfnText": "alpha", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayerinit-alpha"}, {"id": "ref-for-dom-xrwebgllayerinit-alpha\u2460"}, {"id": "ref-for-dom-xrwebgllayerinit-alpha\u2461"}, {"id": "ref-for-dom-xrwebgllayerinit-alpha\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayerinit-ignoredepthvalues'] = {"dfnID": "dom-xrwebgllayerinit-ignoredepthvalues", "url": "#dom-xrwebgllayerinit-ignoredepthvalues", "dfnText": "ignoreDepthValues", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayerinit-ignoredepthvalues"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayerinit-framebufferscalefactor'] = {"dfnID": "dom-xrwebgllayerinit-framebufferscalefactor", "url": "#dom-xrwebgllayerinit-framebufferscalefactor", "dfnText": "framebufferScaleFactor", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayerinit-framebufferscalefactor"}, {"id": "ref-for-dom-xrwebgllayerinit-framebufferscalefactor\u2460"}, {"id": "ref-for-dom-xrwebgllayerinit-framebufferscalefactor\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['xrwebgllayer'] = {"dfnID": "xrwebgllayer", "url": "#xrwebgllayer", "dfnText": "XRWebGLLayer", "refSections": [{"refs": [{"id": "ref-for-xrwebgllayer"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrwebgllayer\u2460"}, {"id": "ref-for-xrwebgllayer\u2461"}, {"id": "ref-for-xrwebgllayer\u2462"}, {"id": "ref-for-xrwebgllayer\u2463"}], "title": "4.2. XRRenderState"}, {"refs": [{"id": "ref-for-xrwebgllayer\u2464"}, {"id": "ref-for-xrwebgllayer\u2465"}], "title": "7.3. XRViewport"}, {"refs": [{"id": "ref-for-xrwebgllayer\u2466"}], "title": "11. Layers"}, {"refs": [{"id": "ref-for-xrwebgllayer\u2467"}], "title": "11.1. XRLayer"}, {"refs": [{"id": "ref-for-xrwebgllayer\u2468"}, {"id": "ref-for-xrwebgllayer\u2460\u24ea"}, {"id": "ref-for-xrwebgllayer\u2460\u2460"}, {"id": "ref-for-xrwebgllayer\u2460\u2461"}, {"id": "ref-for-xrwebgllayer\u2460\u2462"}, {"id": "ref-for-xrwebgllayer\u2460\u2463"}, {"id": "ref-for-xrwebgllayer\u2460\u2464"}, {"id": "ref-for-xrwebgllayer\u2460\u2465"}, {"id": "ref-for-xrwebgllayer\u2460\u2466"}, {"id": "ref-for-xrwebgllayer\u2460\u2467"}, {"id": "ref-for-xrwebgllayer\u2460\u2468"}, {"id": "ref-for-xrwebgllayer\u2461\u24ea"}, {"id": "ref-for-xrwebgllayer\u2461\u2460"}, {"id": "ref-for-xrwebgllayer\u2461\u2461"}, {"id": "ref-for-xrwebgllayer\u2461\u2462"}, {"id": "ref-for-xrwebgllayer\u2461\u2463"}, {"id": "ref-for-xrwebgllayer\u2461\u2464"}, {"id": "ref-for-xrwebgllayer\u2461\u2465"}, {"id": "ref-for-xrwebgllayer\u2461\u2466"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xrwebgllayer\u2461\u2467"}, {"id": "ref-for-xrwebgllayer\u2461\u2468"}, {"id": "ref-for-xrwebgllayer\u2462\u24ea"}], "title": "11.3. WebGL Context Compatibility"}, {"refs": [{"id": "ref-for-xrwebgllayer\u2462\u2460"}, {"id": "ref-for-xrwebgllayer\u2462\u2461"}], "title": "13.7. Context Isolation"}], "external": false}; window.dfnpanelData['xrwebgllayer-context'] = {"dfnID": "xrwebgllayer-context", "url": "#xrwebgllayer-context", "dfnText": "context", "refSections": [{"refs": [{"id": "ref-for-xrwebgllayer-context"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrwebgllayer-context\u2460"}, {"id": "ref-for-xrwebgllayer-context\u2461"}, {"id": "ref-for-xrwebgllayer-context\u2462"}, {"id": "ref-for-xrwebgllayer-context\u2463"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xrwebgllayer-context\u2464"}], "title": "13.7. Context Isolation"}], "external": false}; window.dfnpanelData['xrwebgllayer-session'] = {"dfnID": "xrwebgllayer-session", "url": "#xrwebgllayer-session", "dfnText": "session", "refSections": [{"refs": [{"id": "ref-for-xrwebgllayer-session"}, {"id": "ref-for-xrwebgllayer-session\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-xrwebgllayer'] = {"dfnID": "dom-xrwebgllayer-xrwebgllayer", "url": "#dom-xrwebgllayer-xrwebgllayer", "dfnText": "XRWebGLLayer(session, context, layerInit)", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-xrwebgllayer"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-context'] = {"dfnID": "dom-xrwebgllayer-context", "url": "#dom-xrwebgllayer-context", "dfnText": "context", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-context"}, {"id": "ref-for-dom-xrwebgllayer-context\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['xrwebgllayer-composition-enabled'] = {"dfnID": "xrwebgllayer-composition-enabled", "url": "#xrwebgllayer-composition-enabled", "dfnText": "composition enabled", "refSections": [{"refs": [{"id": "ref-for-xrwebgllayer-composition-enabled"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrwebgllayer-composition-enabled\u2460"}, {"id": "ref-for-xrwebgllayer-composition-enabled\u2461"}, {"id": "ref-for-xrwebgllayer-composition-enabled\u2462"}, {"id": "ref-for-xrwebgllayer-composition-enabled\u2463"}, {"id": "ref-for-xrwebgllayer-composition-enabled\u2464"}, {"id": "ref-for-xrwebgllayer-composition-enabled\u2465"}, {"id": "ref-for-xrwebgllayer-composition-enabled\u2466"}, {"id": "ref-for-xrwebgllayer-composition-enabled\u2467"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-framebuffer'] = {"dfnID": "dom-xrwebgllayer-framebuffer", "url": "#dom-xrwebgllayer-framebuffer", "dfnText": "framebuffer", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-framebuffer"}, {"id": "ref-for-dom-xrwebgllayer-framebuffer\u2460"}, {"id": "ref-for-dom-xrwebgllayer-framebuffer\u2461"}, {"id": "ref-for-dom-xrwebgllayer-framebuffer\u2462"}, {"id": "ref-for-dom-xrwebgllayer-framebuffer\u2463"}, {"id": "ref-for-dom-xrwebgllayer-framebuffer\u2464"}, {"id": "ref-for-dom-xrwebgllayer-framebuffer\u2465"}, {"id": "ref-for-dom-xrwebgllayer-framebuffer\u2466"}, {"id": "ref-for-dom-xrwebgllayer-framebuffer\u2467"}, {"id": "ref-for-dom-xrwebgllayer-framebuffer\u2468"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['opaque-framebuffer'] = {"dfnID": "opaque-framebuffer", "url": "#opaque-framebuffer", "dfnText": "opaque framebuffer", "refSections": [{"refs": [{"id": "ref-for-opaque-framebuffer"}, {"id": "ref-for-opaque-framebuffer\u2460"}, {"id": "ref-for-opaque-framebuffer\u2461"}, {"id": "ref-for-opaque-framebuffer\u2462"}, {"id": "ref-for-opaque-framebuffer\u2463"}, {"id": "ref-for-opaque-framebuffer\u2464"}, {"id": "ref-for-opaque-framebuffer\u2465"}, {"id": "ref-for-opaque-framebuffer\u2466"}, {"id": "ref-for-opaque-framebuffer\u2467"}, {"id": "ref-for-opaque-framebuffer\u2468"}, {"id": "ref-for-opaque-framebuffer\u2460\u24ea"}, {"id": "ref-for-opaque-framebuffer\u2460\u2460"}, {"id": "ref-for-opaque-framebuffer\u2460\u2461"}, {"id": "ref-for-opaque-framebuffer\u2460\u2462"}, {"id": "ref-for-opaque-framebuffer\u2460\u2463"}, {"id": "ref-for-opaque-framebuffer\u2460\u2464"}, {"id": "ref-for-opaque-framebuffer\u2460\u2465"}, {"id": "ref-for-opaque-framebuffer\u2460\u2466"}, {"id": "ref-for-opaque-framebuffer\u2460\u2467"}, {"id": "ref-for-opaque-framebuffer\u2460\u2468"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['opaque-framebuffer-session'] = {"dfnID": "opaque-framebuffer-session", "url": "#opaque-framebuffer-session", "dfnText": "session", "refSections": [{"refs": [{"id": "ref-for-opaque-framebuffer-session"}, {"id": "ref-for-opaque-framebuffer-session\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['xrwebgllayer-target-framebuffer'] = {"dfnID": "xrwebgllayer-target-framebuffer", "url": "#xrwebgllayer-target-framebuffer", "dfnText": "target framebuffer", "refSections": [{"refs": [{"id": "ref-for-xrwebgllayer-target-framebuffer"}, {"id": "ref-for-xrwebgllayer-target-framebuffer\u2460"}, {"id": "ref-for-xrwebgllayer-target-framebuffer\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-framebufferwidth'] = {"dfnID": "dom-xrwebgllayer-framebufferwidth", "url": "#dom-xrwebgllayer-framebufferwidth", "dfnText": "framebufferWidth", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-framebufferwidth"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-framebufferheight'] = {"dfnID": "dom-xrwebgllayer-framebufferheight", "url": "#dom-xrwebgllayer-framebufferheight", "dfnText": "framebufferHeight", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-framebufferheight"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-antialias'] = {"dfnID": "dom-xrwebgllayer-antialias", "url": "#dom-xrwebgllayer-antialias", "dfnText": "antialias", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-antialias"}, {"id": "ref-for-dom-xrwebgllayer-antialias\u2460"}, {"id": "ref-for-dom-xrwebgllayer-antialias\u2461"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-ignoredepthvalues'] = {"dfnID": "dom-xrwebgllayer-ignoredepthvalues", "url": "#dom-xrwebgllayer-ignoredepthvalues", "dfnText": "ignoreDepthValues", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-ignoredepthvalues"}, {"id": "ref-for-dom-xrwebgllayer-ignoredepthvalues\u2460"}, {"id": "ref-for-dom-xrwebgllayer-ignoredepthvalues\u2461"}, {"id": "ref-for-dom-xrwebgllayer-ignoredepthvalues\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-fixedfoveation'] = {"dfnID": "dom-xrwebgllayer-fixedfoveation", "url": "#dom-xrwebgllayer-fixedfoveation", "dfnText": "fixedFoveation", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-fixedfoveation"}, {"id": "ref-for-dom-xrwebgllayer-fixedfoveation\u2460"}, {"id": "ref-for-dom-xrwebgllayer-fixedfoveation\u2461"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-dom-xrwebgllayer-fixedfoveation\u2462"}], "title": "\nChanges from the Working Draft 24 July 2020"}], "external": false}; window.dfnpanelData['list-of-full-sized-viewports'] = {"dfnID": "list-of-full-sized-viewports", "url": "#list-of-full-sized-viewports", "dfnText": "list of full-sized viewports", "refSections": [{"refs": [{"id": "ref-for-list-of-full-sized-viewports"}, {"id": "ref-for-list-of-full-sized-viewports\u2460"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-list-of-full-sized-viewports\u2461"}, {"id": "ref-for-list-of-full-sized-viewports\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['list-of-viewport-objects'] = {"dfnID": "list-of-viewport-objects", "url": "#list-of-viewport-objects", "dfnText": "list of viewport objects", "refSections": [{"refs": [{"id": "ref-for-list-of-viewport-objects"}, {"id": "ref-for-list-of-viewport-objects\u2460"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-list-of-viewport-objects\u2461"}, {"id": "ref-for-list-of-viewport-objects\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-getviewport'] = {"dfnID": "dom-xrwebgllayer-getviewport", "url": "#dom-xrwebgllayer-getviewport", "dfnText": "getViewport(view)", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-getviewport"}, {"id": "ref-for-dom-xrwebgllayer-getviewport\u2460"}, {"id": "ref-for-dom-xrwebgllayer-getviewport\u2461"}], "title": "7.1. XRView"}, {"refs": [{"id": "ref-for-dom-xrwebgllayer-getviewport\u2462"}, {"id": "ref-for-dom-xrwebgllayer-getviewport\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['native-webgl-framebuffer-resolution'] = {"dfnID": "native-webgl-framebuffer-resolution", "url": "#native-webgl-framebuffer-resolution", "dfnText": "native WebGL framebuffer resolution", "refSections": [{"refs": [{"id": "ref-for-native-webgl-framebuffer-resolution"}, {"id": "ref-for-native-webgl-framebuffer-resolution\u2460"}, {"id": "ref-for-native-webgl-framebuffer-resolution\u2461"}, {"id": "ref-for-native-webgl-framebuffer-resolution\u2462"}, {"id": "ref-for-native-webgl-framebuffer-resolution\u2463"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['recommended-webgl-framebuffer-resolution'] = {"dfnID": "recommended-webgl-framebuffer-resolution", "url": "#recommended-webgl-framebuffer-resolution", "dfnText": "recommended WebGL framebuffer resolution", "refSections": [{"refs": [{"id": "ref-for-recommended-webgl-framebuffer-resolution"}, {"id": "ref-for-recommended-webgl-framebuffer-resolution\u2460"}, {"id": "ref-for-recommended-webgl-framebuffer-resolution\u2461"}, {"id": "ref-for-recommended-webgl-framebuffer-resolution\u2462"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['dom-xrwebgllayer-getnativeframebufferscalefactor'] = {"dfnID": "dom-xrwebgllayer-getnativeframebufferscalefactor", "url": "#dom-xrwebgllayer-getnativeframebufferscalefactor", "dfnText": "getNativeFramebufferScaleFactor(session)", "refSections": [{"refs": [{"id": "ref-for-dom-xrwebgllayer-getnativeframebufferscalefactor"}, {"id": "ref-for-dom-xrwebgllayer-getnativeframebufferscalefactor\u2460"}], "title": "11.2. XRWebGLLayer"}], "external": false}; window.dfnpanelData['compatible-graphics-adapter'] = {"dfnID": "compatible-graphics-adapter", "url": "#compatible-graphics-adapter", "dfnText": "compatible graphics adapter", "refSections": [{"refs": [{"id": "ref-for-compatible-graphics-adapter"}, {"id": "ref-for-compatible-graphics-adapter\u2460"}, {"id": "ref-for-compatible-graphics-adapter\u2461"}, {"id": "ref-for-compatible-graphics-adapter\u2462"}, {"id": "ref-for-compatible-graphics-adapter\u2463"}, {"id": "ref-for-compatible-graphics-adapter\u2464"}, {"id": "ref-for-compatible-graphics-adapter\u2465"}, {"id": "ref-for-compatible-graphics-adapter\u2466"}, {"id": "ref-for-compatible-graphics-adapter\u2467"}], "title": "11.3. WebGL Context Compatibility"}], "external": false}; window.dfnpanelData['dom-webglcontextattributes-xrcompatible'] = {"dfnID": "dom-webglcontextattributes-xrcompatible", "url": "#dom-webglcontextattributes-xrcompatible", "dfnText": "xrCompatible", "refSections": [{"refs": [{"id": "ref-for-dom-webglcontextattributes-xrcompatible"}, {"id": "ref-for-dom-webglcontextattributes-xrcompatible\u2460"}, {"id": "ref-for-dom-webglcontextattributes-xrcompatible\u2461"}, {"id": "ref-for-dom-webglcontextattributes-xrcompatible\u2462"}], "title": "11.3. WebGL Context Compatibility"}], "external": false}; window.dfnpanelData['xr-compatible'] = {"dfnID": "xr-compatible", "url": "#xr-compatible", "dfnText": "XR compatible", "refSections": [{"refs": [{"id": "ref-for-xr-compatible"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-xr-compatible\u2460"}], "title": "11.2. XRWebGLLayer"}, {"refs": [{"id": "ref-for-xr-compatible\u2461"}, {"id": "ref-for-xr-compatible\u2462"}, {"id": "ref-for-xr-compatible\u2463"}, {"id": "ref-for-xr-compatible\u2464"}, {"id": "ref-for-xr-compatible\u2465"}, {"id": "ref-for-xr-compatible\u2466"}, {"id": "ref-for-xr-compatible\u2467"}, {"id": "ref-for-xr-compatible\u2468"}, {"id": "ref-for-xr-compatible\u2460\u24ea"}, {"id": "ref-for-xr-compatible\u2460\u2460"}, {"id": "ref-for-xr-compatible\u2460\u2461"}, {"id": "ref-for-xr-compatible\u2460\u2462"}], "title": "11.3. WebGL Context Compatibility"}], "external": false}; window.dfnpanelData['dom-webglrenderingcontextbase-makexrcompatible'] = {"dfnID": "dom-webglrenderingcontextbase-makexrcompatible", "url": "#dom-webglrenderingcontextbase-makexrcompatible", "dfnText": "makeXRCompatible()", "refSections": [{"refs": [{"id": "ref-for-dom-webglrenderingcontextbase-makexrcompatible"}, {"id": "ref-for-dom-webglrenderingcontextbase-makexrcompatible\u2460"}, {"id": "ref-for-dom-webglrenderingcontextbase-makexrcompatible\u2461"}, {"id": "ref-for-dom-webglrenderingcontextbase-makexrcompatible\u2462"}, {"id": "ref-for-dom-webglrenderingcontextbase-makexrcompatible\u2463"}, {"id": "ref-for-dom-webglrenderingcontextbase-makexrcompatible\u2464"}], "title": "11.3. WebGL Context Compatibility"}], "external": false}; window.dfnpanelData['xrsessionevent'] = {"dfnID": "xrsessionevent", "url": "#xrsessionevent", "dfnText": "XRSessionEvent", "refSections": [{"refs": [{"id": "ref-for-xrsessionevent"}, {"id": "ref-for-xrsessionevent\u2460"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrsessionevent\u2461"}], "title": "12.1. XRSessionEvent"}, {"refs": [{"id": "ref-for-xrsessionevent\u2462"}, {"id": "ref-for-xrsessionevent\u2463"}, {"id": "ref-for-xrsessionevent\u2464"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['dictdef-xrsessioneventinit'] = {"dfnID": "dictdef-xrsessioneventinit", "url": "#dictdef-xrsessioneventinit", "dfnText": "XRSessionEventInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-xrsessioneventinit"}], "title": "12.1. XRSessionEvent"}], "external": false}; window.dfnpanelData['dom-xrsessionevent-session'] = {"dfnID": "dom-xrsessionevent-session", "url": "#dom-xrsessionevent-session", "dfnText": "session", "refSections": [{"refs": [{"id": "ref-for-dom-xrsessionevent-session"}], "title": "12.1. XRSessionEvent"}], "external": false}; window.dfnpanelData['xrinputsourceevent'] = {"dfnID": "xrinputsourceevent", "url": "#xrinputsourceevent", "dfnText": "XRInputSourceEvent", "refSections": [{"refs": [{"id": "ref-for-xrinputsourceevent"}, {"id": "ref-for-xrinputsourceevent\u2460"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-xrinputsourceevent\u2461"}, {"id": "ref-for-xrinputsourceevent\u2462"}], "title": "12.2. XRInputSourceEvent"}, {"refs": [{"id": "ref-for-xrinputsourceevent\u2463"}, {"id": "ref-for-xrinputsourceevent\u2464"}, {"id": "ref-for-xrinputsourceevent\u2465"}, {"id": "ref-for-xrinputsourceevent\u2466"}, {"id": "ref-for-xrinputsourceevent\u2467"}, {"id": "ref-for-xrinputsourceevent\u2468"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['dictdef-xrinputsourceeventinit'] = {"dfnID": "dictdef-xrinputsourceeventinit", "url": "#dictdef-xrinputsourceeventinit", "dfnText": "XRInputSourceEventInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-xrinputsourceeventinit"}], "title": "12.2. XRInputSourceEvent"}], "external": false}; window.dfnpanelData['dom-xrinputsourceevent-inputsource'] = {"dfnID": "dom-xrinputsourceevent-inputsource", "url": "#dom-xrinputsourceevent-inputsource", "dfnText": "inputSource", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsourceevent-inputsource"}, {"id": "ref-for-dom-xrinputsourceevent-inputsource\u2460"}], "title": "12.2. XRInputSourceEvent"}], "external": false}; window.dfnpanelData['dom-xrinputsourceevent-frame'] = {"dfnID": "dom-xrinputsourceevent-frame", "url": "#dom-xrinputsourceevent-frame", "dfnText": "frame", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsourceevent-frame"}, {"id": "ref-for-dom-xrinputsourceevent-frame\u2460"}, {"id": "ref-for-dom-xrinputsourceevent-frame\u2461"}], "title": "12.2. XRInputSourceEvent"}], "external": false}; window.dfnpanelData['fire-an-input-source-event'] = {"dfnID": "fire-an-input-source-event", "url": "#fire-an-input-source-event", "dfnText": "fire an input source event", "refSections": [{"refs": [{"id": "ref-for-fire-an-input-source-event"}, {"id": "ref-for-fire-an-input-source-event\u2460"}, {"id": "ref-for-fire-an-input-source-event\u2461"}, {"id": "ref-for-fire-an-input-source-event\u2462"}, {"id": "ref-for-fire-an-input-source-event\u2463"}, {"id": "ref-for-fire-an-input-source-event\u2464"}, {"id": "ref-for-fire-an-input-source-event\u2465"}, {"id": "ref-for-fire-an-input-source-event\u2466"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-fire-an-input-source-event\u2467"}, {"id": "ref-for-fire-an-input-source-event\u2468"}, {"id": "ref-for-fire-an-input-source-event\u2460\u24ea"}, {"id": "ref-for-fire-an-input-source-event\u2460\u2460"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['xrinputsourceschangeevent'] = {"dfnID": "xrinputsourceschangeevent", "url": "#xrinputsourceschangeevent", "dfnText": "XRInputSourcesChangeEvent", "refSections": [{"refs": [{"id": "ref-for-xrinputsourceschangeevent"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-xrinputsourceschangeevent\u2460"}, {"id": "ref-for-xrinputsourceschangeevent\u2461"}, {"id": "ref-for-xrinputsourceschangeevent\u2462"}, {"id": "ref-for-xrinputsourceschangeevent\u2463"}, {"id": "ref-for-xrinputsourceschangeevent\u2464"}, {"id": "ref-for-xrinputsourceschangeevent\u2465"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-xrinputsourceschangeevent\u2466"}], "title": "12.3. XRInputSourcesChangeEvent"}, {"refs": [{"id": "ref-for-xrinputsourceschangeevent\u2467"}, {"id": "ref-for-xrinputsourceschangeevent\u2468"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['dictdef-xrinputsourceschangeeventinit'] = {"dfnID": "dictdef-xrinputsourceschangeeventinit", "url": "#dictdef-xrinputsourceschangeeventinit", "dfnText": "XRInputSourcesChangeEventInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-xrinputsourceschangeeventinit"}], "title": "12.3. XRInputSourcesChangeEvent"}], "external": false}; window.dfnpanelData['dom-xrinputsourceschangeevent-session'] = {"dfnID": "dom-xrinputsourceschangeevent-session", "url": "#dom-xrinputsourceschangeevent-session", "dfnText": "session", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsourceschangeevent-session"}], "title": "12.3. XRInputSourcesChangeEvent"}], "external": false}; window.dfnpanelData['dom-xrinputsourceschangeevent-added'] = {"dfnID": "dom-xrinputsourceschangeevent-added", "url": "#dom-xrinputsourceschangeevent-added", "dfnText": "added", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsourceschangeevent-added"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-xrinputsourceschangeevent-added\u2460"}, {"id": "ref-for-dom-xrinputsourceschangeevent-added\u2461"}, {"id": "ref-for-dom-xrinputsourceschangeevent-added\u2462"}, {"id": "ref-for-dom-xrinputsourceschangeevent-added\u2463"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrinputsourceschangeevent-added\u2464"}], "title": "12.3. XRInputSourcesChangeEvent"}], "external": false}; window.dfnpanelData['dom-xrinputsourceschangeevent-removed'] = {"dfnID": "dom-xrinputsourceschangeevent-removed", "url": "#dom-xrinputsourceschangeevent-removed", "dfnText": "removed", "refSections": [{"refs": [{"id": "ref-for-dom-xrinputsourceschangeevent-removed"}, {"id": "ref-for-dom-xrinputsourceschangeevent-removed\u2460"}, {"id": "ref-for-dom-xrinputsourceschangeevent-removed\u2461"}, {"id": "ref-for-dom-xrinputsourceschangeevent-removed\u2462"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-dom-xrinputsourceschangeevent-removed\u2463"}], "title": "12.3. XRInputSourcesChangeEvent"}], "external": false}; window.dfnpanelData['xrreferencespaceevent'] = {"dfnID": "xrreferencespaceevent", "url": "#xrreferencespaceevent", "dfnText": "XRReferenceSpaceEvent", "refSections": [{"refs": [{"id": "ref-for-xrreferencespaceevent"}], "title": "12.4. XRReferenceSpaceEvent"}, {"refs": [{"id": "ref-for-xrreferencespaceevent\u2460"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['dictdef-xrreferencespaceeventinit'] = {"dfnID": "dictdef-xrreferencespaceeventinit", "url": "#dictdef-xrreferencespaceeventinit", "dfnText": "XRReferenceSpaceEventInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-xrreferencespaceeventinit"}], "title": "12.4. XRReferenceSpaceEvent"}], "external": false}; window.dfnpanelData['dom-xrreferencespaceeventinit-referencespace'] = {"dfnID": "dom-xrreferencespaceeventinit-referencespace", "url": "#dom-xrreferencespaceeventinit-referencespace", "dfnText": "referenceSpace", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespaceeventinit-referencespace"}], "title": "12.4. XRReferenceSpaceEvent"}], "external": false}; window.dfnpanelData['dom-xrreferencespaceevent-referencespace'] = {"dfnID": "dom-xrreferencespaceevent-referencespace", "url": "#dom-xrreferencespaceevent-referencespace", "dfnText": "referenceSpace", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespaceevent-referencespace"}, {"id": "ref-for-dom-xrreferencespaceevent-referencespace\u2460"}, {"id": "ref-for-dom-xrreferencespaceevent-referencespace\u2461"}], "title": "12.4. XRReferenceSpaceEvent"}], "external": false}; window.dfnpanelData['dom-xrreferencespaceevent-transform'] = {"dfnID": "dom-xrreferencespaceevent-transform", "url": "#dom-xrreferencespaceevent-transform", "dfnText": "transform", "refSections": [{"refs": [{"id": "ref-for-dom-xrreferencespaceevent-transform"}], "title": "12.4. XRReferenceSpaceEvent"}], "external": false}; window.dfnpanelData['eventdef-xrsystem-devicechange'] = {"dfnID": "eventdef-xrsystem-devicechange", "url": "#eventdef-xrsystem-devicechange", "dfnText": "devicechange", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsystem-devicechange"}, {"id": "ref-for-eventdef-xrsystem-devicechange\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-eventdef-xrsystem-devicechange\u2461"}], "title": "13.7. Context Isolation"}, {"refs": [{"id": "ref-for-eventdef-xrsystem-devicechange\u2462"}], "title": "14.1. Permissions Policy"}], "external": false}; window.dfnpanelData['eventdef-xrsession-visibilitychange'] = {"dfnID": "eventdef-xrsession-visibilitychange", "url": "#eventdef-xrsession-visibilitychange", "dfnText": "visibilitychange", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-visibilitychange"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['eventdef-xrsession-end'] = {"dfnID": "eventdef-xrsession-end", "url": "#eventdef-xrsession-end", "dfnText": "end", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-end"}, {"id": "ref-for-eventdef-xrsession-end\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['eventdef-xrsession-inputsourceschange'] = {"dfnID": "eventdef-xrsession-inputsourceschange", "url": "#eventdef-xrsession-inputsourceschange", "dfnText": "inputsourceschange", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-inputsourceschange"}, {"id": "ref-for-eventdef-xrsession-inputsourceschange\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-eventdef-xrsession-inputsourceschange\u2461"}, {"id": "ref-for-eventdef-xrsession-inputsourceschange\u2462"}, {"id": "ref-for-eventdef-xrsession-inputsourceschange\u2463"}, {"id": "ref-for-eventdef-xrsession-inputsourceschange\u2464"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['eventdef-xrsession-trackedsourceschange'] = {"dfnID": "eventdef-xrsession-trackedsourceschange", "url": "#eventdef-xrsession-trackedsourceschange", "dfnText": "trackedsourceschange", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-trackedsourceschange"}, {"id": "ref-for-eventdef-xrsession-trackedsourceschange\u2460"}, {"id": "ref-for-eventdef-xrsession-trackedsourceschange\u2461"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['eventdef-xrsession-selectstart'] = {"dfnID": "eventdef-xrsession-selectstart", "url": "#eventdef-xrsession-selectstart", "dfnText": "selectstart", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-selectstart"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-eventdef-xrsession-selectstart\u2460"}, {"id": "ref-for-eventdef-xrsession-selectstart\u2461"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-eventdef-xrsession-selectstart\u2462"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['eventdef-xrsession-selectend'] = {"dfnID": "eventdef-xrsession-selectend", "url": "#eventdef-xrsession-selectend", "dfnText": "selectend", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-selectend"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-eventdef-xrsession-selectend\u2460"}, {"id": "ref-for-eventdef-xrsession-selectend\u2461"}, {"id": "ref-for-eventdef-xrsession-selectend\u2462"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-eventdef-xrsession-selectend\u2463"}, {"id": "ref-for-eventdef-xrsession-selectend\u2464"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['eventdef-xrsession-select'] = {"dfnID": "eventdef-xrsession-select", "url": "#eventdef-xrsession-select", "dfnText": "select", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-select"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-eventdef-xrsession-select\u2460"}], "title": "5.1. XRFrame"}, {"refs": [{"id": "ref-for-eventdef-xrsession-select\u2461"}, {"id": "ref-for-eventdef-xrsession-select\u2462"}], "title": "10.1. XRInputSource"}, {"refs": [{"id": "ref-for-eventdef-xrsession-select\u2463"}], "title": "10.2. Transient input"}], "external": false}; window.dfnpanelData['eventdef-xrsession-squeezestart'] = {"dfnID": "eventdef-xrsession-squeezestart", "url": "#eventdef-xrsession-squeezestart", "dfnText": "squeezestart", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-squeezestart"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-eventdef-xrsession-squeezestart\u2460"}, {"id": "ref-for-eventdef-xrsession-squeezestart\u2461"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['eventdef-xrsession-squeezeend'] = {"dfnID": "eventdef-xrsession-squeezeend", "url": "#eventdef-xrsession-squeezeend", "dfnText": "squeezeend", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-squeezeend"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-eventdef-xrsession-squeezeend\u2460"}, {"id": "ref-for-eventdef-xrsession-squeezeend\u2461"}, {"id": "ref-for-eventdef-xrsession-squeezeend\u2462"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['eventdef-xrsession-squeeze'] = {"dfnID": "eventdef-xrsession-squeeze", "url": "#eventdef-xrsession-squeeze", "dfnText": "squeeze", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-squeeze"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-eventdef-xrsession-squeeze\u2460"}, {"id": "ref-for-eventdef-xrsession-squeeze\u2461"}], "title": "10.1. XRInputSource"}], "external": false}; window.dfnpanelData['eventdef-xrsession-frameratechange'] = {"dfnID": "eventdef-xrsession-frameratechange", "url": "#eventdef-xrsession-frameratechange", "dfnText": "frameratechange", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrsession-frameratechange"}, {"id": "ref-for-eventdef-xrsession-frameratechange\u2460"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['eventdef-xrreferencespace-reset'] = {"dfnID": "eventdef-xrreferencespace-reset", "url": "#eventdef-xrreferencespace-reset", "dfnText": "reset", "refSections": [{"refs": [{"id": "ref-for-eventdef-xrreferencespace-reset"}], "title": "4.1. XRSession"}, {"refs": [{"id": "ref-for-eventdef-xrreferencespace-reset\u2460"}], "title": "6.2. XRReferenceSpace"}, {"refs": [{"id": "ref-for-eventdef-xrreferencespace-reset\u2461"}, {"id": "ref-for-eventdef-xrreferencespace-reset\u2462"}, {"id": "ref-for-eventdef-xrreferencespace-reset\u2463"}, {"id": "ref-for-eventdef-xrreferencespace-reset\u2464"}, {"id": "ref-for-eventdef-xrreferencespace-reset\u2465"}, {"id": "ref-for-eventdef-xrreferencespace-reset\u2466"}], "title": "12.5. Event Types"}], "external": false}; window.dfnpanelData['sensitive-information'] = {"dfnID": "sensitive-information", "url": "#sensitive-information", "dfnText": "sensitive information", "refSections": [{"refs": [{"id": "ref-for-sensitive-information"}, {"id": "ref-for-sensitive-information\u2460"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-sensitive-information\u2461"}], "title": "13.2.4. Duration of consent"}, {"refs": [{"id": "ref-for-sensitive-information\u2462"}], "title": "13.4.1. Throttling"}, {"refs": [{"id": "ref-for-sensitive-information\u2463"}], "title": "13.5. Protected functionality"}, {"refs": [{"id": "ref-for-sensitive-information\u2464"}, {"id": "ref-for-sensitive-information\u2465"}], "title": "13.5.2. Poses"}, {"refs": [{"id": "ref-for-sensitive-information\u2466"}, {"id": "ref-for-sensitive-information\u2467"}], "title": "13.5.3. Reference spaces"}, {"refs": [{"id": "ref-for-sensitive-information\u2468"}], "title": "13.8. Fingerprinting"}], "external": false}; window.dfnpanelData['user-intent'] = {"dfnID": "user-intent", "url": "#user-intent", "dfnText": "User intent", "refSections": [{"refs": [{"id": "ref-for-user-intent"}, {"id": "ref-for-user-intent\u2460"}, {"id": "ref-for-user-intent\u2461"}, {"id": "ref-for-user-intent\u2462"}, {"id": "ref-for-user-intent\u2463"}, {"id": "ref-for-user-intent\u2464"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-user-intent\u2465"}], "title": "13.2. User intention"}, {"refs": [{"id": "ref-for-user-intent\u2466"}], "title": "13.2.1. User activation"}, {"refs": [{"id": "ref-for-user-intent\u2467"}], "title": "13.2.2. Launching a web application"}, {"refs": [{"id": "ref-for-user-intent\u2468"}], "title": "13.2.4. Duration of consent"}, {"refs": [{"id": "ref-for-user-intent\u2460\u24ea"}], "title": "13.4. Data adjustments"}, {"refs": [{"id": "ref-for-user-intent\u2460\u2460"}], "title": "13.5.1. Immersiveness"}, {"refs": [{"id": "ref-for-user-intent\u2460\u2461"}], "title": "13.5.2. Poses"}, {"refs": [{"id": "ref-for-user-intent\u2460\u2462"}], "title": "13.5.3. Reference spaces"}, {"refs": [{"id": "ref-for-user-intent\u2460\u2463"}, {"id": "ref-for-user-intent\u2460\u2464"}, {"id": "ref-for-user-intent\u2460\u2465"}, {"id": "ref-for-user-intent\u2460\u2466"}, {"id": "ref-for-user-intent\u2460\u2467"}, {"id": "ref-for-user-intent\u2460\u2468"}, {"id": "ref-for-user-intent\u2461\u24ea"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['launching-a-web-application'] = {"dfnID": "launching-a-web-application", "url": "#launching-a-web-application", "dfnText": "launching a web application", "refSections": [{"refs": [{"id": "ref-for-launching-a-web-application"}, {"id": "ref-for-launching-a-web-application\u2460"}], "title": "13.5.1. Immersiveness"}, {"refs": [{"id": "ref-for-launching-a-web-application\u2461"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['implicit-consent'] = {"dfnID": "implicit-consent", "url": "#implicit-consent", "dfnText": "Implicit consent", "refSections": [{"refs": [{"id": "ref-for-implicit-consent"}, {"id": "ref-for-implicit-consent\u2460"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-implicit-consent\u2461"}], "title": "13.5.1. Immersiveness"}, {"refs": [{"id": "ref-for-implicit-consent\u2462"}], "title": "13.5.2. Poses"}, {"refs": [{"id": "ref-for-implicit-consent\u2463"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['explicit-consent'] = {"dfnID": "explicit-consent", "url": "#explicit-consent", "dfnText": "Explicit consent", "refSections": [{"refs": [{"id": "ref-for-explicit-consent"}, {"id": "ref-for-explicit-consent\u2460"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-explicit-consent\u2461"}, {"id": "ref-for-explicit-consent\u2462"}, {"id": "ref-for-explicit-consent\u2463"}], "title": "13.2.3. Implicit and Explicit consent"}, {"refs": [{"id": "ref-for-explicit-consent\u2464"}], "title": "13.2.4. Duration of consent"}, {"refs": [{"id": "ref-for-explicit-consent\u2465"}, {"id": "ref-for-explicit-consent\u2466"}], "title": "13.3. Mid-session consent"}, {"refs": [{"id": "ref-for-explicit-consent\u2467"}], "title": "13.5.1. Immersiveness"}, {"refs": [{"id": "ref-for-explicit-consent\u2468"}, {"id": "ref-for-explicit-consent\u2460\u24ea"}], "title": "13.5.2. Poses"}, {"refs": [{"id": "ref-for-explicit-consent\u2460\u2460"}], "title": "13.5.3. Reference spaces"}, {"refs": [{"id": "ref-for-explicit-consent\u2460\u2461"}, {"id": "ref-for-explicit-consent\u2460\u2462"}, {"id": "ref-for-explicit-consent\u2460\u2463"}, {"id": "ref-for-explicit-consent\u2460\u2464"}], "title": "13.8.2. Considerations for when to automatically grant \"xr-session-supported\""}, {"refs": [{"id": "ref-for-explicit-consent\u2460\u2465"}, {"id": "ref-for-explicit-consent\u2460\u2466"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['data-adjustment'] = {"dfnID": "data-adjustment", "url": "#data-adjustment", "dfnText": "data adjustment", "refSections": [{"refs": [{"id": "ref-for-data-adjustment"}], "title": "13.4. Data adjustments"}, {"refs": [{"id": "ref-for-data-adjustment\u2460"}], "title": "13.5.2. Poses"}], "external": false}; window.dfnpanelData['throttling'] = {"dfnID": "throttling", "url": "#throttling", "dfnText": "Throttling", "refSections": [{"refs": [{"id": "ref-for-throttling"}], "title": "4.1. XRSession"}], "external": false}; window.dfnpanelData['rounding'] = {"dfnID": "rounding", "url": "#rounding", "dfnText": "Rounding", "refSections": [{"refs": [{"id": "ref-for-rounding"}, {"id": "ref-for-rounding\u2460"}], "title": "6.2. XRReferenceSpace"}], "external": false}; window.dfnpanelData['quantization'] = {"dfnID": "quantization", "url": "#quantization", "dfnText": "Quantization", "refSections": [{"refs": [{"id": "ref-for-quantization"}, {"id": "ref-for-quantization\u2460"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-quantization\u2461"}], "title": "7.1. XRView"}], "external": false}; window.dfnpanelData['limiting'] = {"dfnID": "limiting", "url": "#limiting", "dfnText": "Limiting", "refSections": [{"refs": [{"id": "ref-for-limiting"}, {"id": "ref-for-limiting\u2460"}], "title": "6.3. XRBoundedReferenceSpace"}, {"refs": [{"id": "ref-for-limiting\u2461"}, {"id": "ref-for-limiting\u2462"}], "title": "13.5.3. Reference spaces"}], "external": false}; window.dfnpanelData['immersive-session-request-is-allowed'] = {"dfnID": "immersive-session-request-is-allowed", "url": "#immersive-session-request-is-allowed", "dfnText": "immersive session request is allowed", "refSections": [{"refs": [{"id": "ref-for-immersive-session-request-is-allowed"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['inline-session-request-is-allowed'] = {"dfnID": "inline-session-request-is-allowed", "url": "#inline-session-request-is-allowed", "dfnText": "inline session request is allowed", "refSections": [{"refs": [{"id": "ref-for-inline-session-request-is-allowed"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['poses-may-be-reported'] = {"dfnID": "poses-may-be-reported", "url": "#poses-may-be-reported", "dfnText": "poses may be reported", "refSections": [{"refs": [{"id": "ref-for-poses-may-be-reported"}], "title": "6.1. XRSpace"}], "external": false}; window.dfnpanelData['poses-must-be-limited'] = {"dfnID": "poses-must-be-limited", "url": "#poses-must-be-limited", "dfnText": "poses must be limited", "refSections": [{"refs": [{"id": "ref-for-poses-must-be-limited"}], "title": "6.1. XRSpace"}], "external": false}; window.dfnpanelData['trusted-ui'] = {"dfnID": "trusted-ui", "url": "#trusted-ui", "dfnText": "Trusted UI", "refSections": [{"refs": [{"id": "ref-for-trusted-ui"}, {"id": "ref-for-trusted-ui\u2460"}, {"id": "ref-for-trusted-ui\u2461"}, {"id": "ref-for-trusted-ui\u2462"}, {"id": "ref-for-trusted-ui\u2463"}, {"id": "ref-for-trusted-ui\u2464"}, {"id": "ref-for-trusted-ui\u2465"}, {"id": "ref-for-trusted-ui\u2466"}, {"id": "ref-for-trusted-ui\u2467"}, {"id": "ref-for-trusted-ui\u2468"}, {"id": "ref-for-trusted-ui\u2460\u24ea"}, {"id": "ref-for-trusted-ui\u2460\u2460"}, {"id": "ref-for-trusted-ui\u2460\u2461"}, {"id": "ref-for-trusted-ui\u2460\u2462"}], "title": "13.6. Trusted Environment"}], "external": false}; window.dfnpanelData['trusted-immersive-ui'] = {"dfnID": "trusted-immersive-ui", "url": "#trusted-immersive-ui", "dfnText": "trusted immersive UI", "refSections": [{"refs": [{"id": "ref-for-trusted-immersive-ui"}, {"id": "ref-for-trusted-immersive-ui\u2460"}, {"id": "ref-for-trusted-immersive-ui\u2461"}], "title": "13.6. Trusted Environment"}], "external": false}; window.dfnpanelData['permissiondef-xr-session-supported'] = {"dfnID": "permissiondef-xr-session-supported", "url": "#permissiondef-xr-session-supported", "dfnText": "\"xr-session-supported\"", "refSections": [{"refs": [{"id": "ref-for-permissiondef-xr-session-supported"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-permissiondef-xr-session-supported\u2460"}, {"id": "ref-for-permissiondef-xr-session-supported\u2461"}], "title": "13.8.1. Fingerprinting considerations of isSessionSupported()"}, {"refs": [{"id": "ref-for-permissiondef-xr-session-supported\u2462"}, {"id": "ref-for-permissiondef-xr-session-supported\u2463"}, {"id": "ref-for-permissiondef-xr-session-supported\u2464"}, {"id": "ref-for-permissiondef-xr-session-supported\u2465"}, {"id": "ref-for-permissiondef-xr-session-supported\u2466"}, {"id": "ref-for-permissiondef-xr-session-supported\u2467"}, {"id": "ref-for-permissiondef-xr-session-supported\u2468"}, {"id": "ref-for-permissiondef-xr-session-supported\u2460\u24ea"}], "title": "13.8.2. Considerations for when to automatically grant \"xr-session-supported\""}], "external": false}; window.dfnpanelData['dictdef-xrsessionsupportedpermissiondescriptor'] = {"dfnID": "dictdef-xrsessionsupportedpermissiondescriptor", "url": "#dictdef-xrsessionsupportedpermissiondescriptor", "dfnText": "XRSessionSupportedPermissionDescriptor", "refSections": [{"refs": [{"id": "ref-for-dictdef-xrsessionsupportedpermissiondescriptor"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['dom-xrsessionsupportedpermissiondescriptor-mode'] = {"dfnID": "dom-xrsessionsupportedpermissiondescriptor-mode", "url": "#dom-xrsessionsupportedpermissiondescriptor-mode", "dfnText": "mode", "refSections": [{"refs": [{"id": "ref-for-dom-xrsessionsupportedpermissiondescriptor-mode"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['indistinguishable-by-user-agent-string'] = {"dfnID": "indistinguishable-by-user-agent-string", "url": "#indistinguishable-by-user-agent-string", "dfnText": "indistinguishable by user agent string", "refSections": [{"refs": [{"id": "ref-for-indistinguishable-by-user-agent-string"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-indistinguishable-by-user-agent-string\u2460"}, {"id": "ref-for-indistinguishable-by-user-agent-string\u2461"}, {"id": "ref-for-indistinguishable-by-user-agent-string\u2462"}, {"id": "ref-for-indistinguishable-by-user-agent-string\u2463"}], "title": "13.8.2. Considerations for when to automatically grant \"xr-session-supported\""}], "external": false}; window.dfnpanelData['never-support'] = {"dfnID": "never-support", "url": "#never-support", "dfnText": "never support", "refSections": [{"refs": [{"id": "ref-for-never-support"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['usually-support'] = {"dfnID": "usually-support", "url": "#usually-support", "dfnText": "usually support", "refSections": [{"refs": [{"id": "ref-for-usually-support"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['permissiondef-xr'] = {"dfnID": "permissiondef-xr", "url": "#permissiondef-xr", "dfnText": "\"xr\"", "refSections": [{"refs": [{"id": "ref-for-permissiondef-xr"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['dictdef-xrpermissiondescriptor'] = {"dfnID": "dictdef-xrpermissiondescriptor", "url": "#dictdef-xrpermissiondescriptor", "dfnText": "XRPermissionDescriptor", "refSections": [{"refs": [{"id": "ref-for-dictdef-xrpermissiondescriptor"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dictdef-xrpermissiondescriptor\u2460"}], "title": "13.8.1. Fingerprinting considerations of isSessionSupported()"}, {"refs": [{"id": "ref-for-dictdef-xrpermissiondescriptor\u2461"}, {"id": "ref-for-dictdef-xrpermissiondescriptor\u2462"}, {"id": "ref-for-dictdef-xrpermissiondescriptor\u2463"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['dom-xrpermissiondescriptor-mode'] = {"dfnID": "dom-xrpermissiondescriptor-mode", "url": "#dom-xrpermissiondescriptor-mode", "dfnText": "mode", "refSections": [{"refs": [{"id": "ref-for-dom-xrpermissiondescriptor-mode"}, {"id": "ref-for-dom-xrpermissiondescriptor-mode\u2460"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['dom-xrpermissiondescriptor-requiredfeatures'] = {"dfnID": "dom-xrpermissiondescriptor-requiredfeatures", "url": "#dom-xrpermissiondescriptor-requiredfeatures", "dfnText": "requiredFeatures", "refSections": [{"refs": [{"id": "ref-for-dom-xrpermissiondescriptor-requiredfeatures"}, {"id": "ref-for-dom-xrpermissiondescriptor-requiredfeatures\u2460"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['dom-xrpermissiondescriptor-optionalfeatures'] = {"dfnID": "dom-xrpermissiondescriptor-optionalfeatures", "url": "#dom-xrpermissiondescriptor-optionalfeatures", "dfnText": "optionalFeatures", "refSections": [{"refs": [{"id": "ref-for-dom-xrpermissiondescriptor-optionalfeatures"}, {"id": "ref-for-dom-xrpermissiondescriptor-optionalfeatures\u2460"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['xrpermissionstatus'] = {"dfnID": "xrpermissionstatus", "url": "#xrpermissionstatus", "dfnText": "XRPermissionStatus", "refSections": [{"refs": [{"id": "ref-for-xrpermissionstatus"}, {"id": "ref-for-xrpermissionstatus\u2460"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-xrpermissionstatus\u2461"}, {"id": "ref-for-xrpermissionstatus\u2462"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['dom-xrpermissionstatus-granted'] = {"dfnID": "dom-xrpermissionstatus-granted", "url": "#dom-xrpermissionstatus-granted", "dfnText": "granted", "refSections": [{"refs": [{"id": "ref-for-dom-xrpermissionstatus-granted"}], "title": "3.2. XRSystem"}, {"refs": [{"id": "ref-for-dom-xrpermissionstatus-granted\u2460"}, {"id": "ref-for-dom-xrpermissionstatus-granted\u2461"}, {"id": "ref-for-dom-xrpermissionstatus-granted\u2462"}, {"id": "ref-for-dom-xrpermissionstatus-granted\u2463"}, {"id": "ref-for-dom-xrpermissionstatus-granted\u2464"}], "title": "14.2. Permissions API Integration"}], "external": false}; window.dfnpanelData['request-the-xr-permission'] = {"dfnID": "request-the-xr-permission", "url": "#request-the-xr-permission", "dfnText": "request the \"xr\" permission", "refSections": [{"refs": [{"id": "ref-for-request-the-xr-permission"}], "title": "3.2. XRSystem"}], "external": false}; window.dfnpanelData['resolve-the-requested-features'] = {"dfnID": "resolve-the-requested-features", "url": "#resolve-the-requested-features", "dfnText": "resolve the requested features", "refSections": [{"refs": [{"id": "ref-for-resolve-the-requested-features"}], "title": "3.4. Feature Dependencies"}, {"refs": [{"id": "ref-for-resolve-the-requested-features\u2460"}, {"id": "ref-for-resolve-the-requested-features\u2461"}], "title": "14.2. Permissions API Integration"}], "external": false}; </script> <script>/* Boilerplate: script-dom-helper */ function query(sel) { return document.querySelector(sel); } function queryAll(sel) { return [...document.querySelectorAll(sel)]; } function iter(obj) { if(!obj) return []; var it = obj[Symbol.iterator]; if(it) return it; return Object.entries(obj); } function mk(tagname, attrs, ...children) { const el = document.createElement(tagname); for(const [k,v] of iter(attrs)) { if(k.slice(0,3) == "_on") { const eventName = k.slice(3); el.addEventListener(eventName, v); } else if(k[0] == "_") { // property, not attribute el[k.slice(1)] = v; } else { if(v === false || v == null) { continue; } else if(v === true) { el.setAttribute(k, ""); continue; } else { el.setAttribute(k, v); } } } append(el, children); return el; } /* Create shortcuts for every known HTML element */ [ "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "head", "header", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "link", "main", "map", "mark", "meta", "meter", "nav", "nobr", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "pre", "progress", "q", "s", "samp", "script", "section", "select", "small", "source", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "u", "ul", "var", "video", "wbr", "xmp", ].forEach(tagname=>{ mk[tagname] = (...args) => mk(tagname, ...args); }); function* nodesFromChildList(children) { for(const child of children.flat(Infinity)) { if(child instanceof Node) { yield child; } else { yield new Text(child); } } } function append(el, ...children) { for(const child of nodesFromChildList(children)) { if(el instanceof Node) el.appendChild(child); else el.push(child); } return el; } function insertAfter(el, ...children) { for(const child of nodesFromChildList(children)) { el.parentNode.insertBefore(child, el.nextSibling); } return el; } function clearContents(el) { el.innerHTML = ""; return el; } function parseHTML(markup) { if(markup.toLowerCase().trim().indexOf('<!doctype') === 0) { const doc = document.implementation.createHTMLDocument(""); doc.documentElement.innerHTML = markup; return doc; } else { const el = mk.template({}); el.innerHTML = markup; return el.content; } } </script> <script>/* Boilerplate: script-position-annos */ "use strict"; { function repositionAnnoPanels(){ const panels = [...document.querySelectorAll("[data-anno-for]")]; const main = document.querySelector("main"); let mainRect; if(main) mainRect = main.getBoundingClientRect(); for(const panel of panels) { const dfn = document.getElementById(panel.getAttribute("data-anno-for")); if(!dfn) { console.log("Can't find the annotation panel target:", panel); continue; } const rect = dfn.getBoundingClientRect(); const top = window.scrollY + rect.top panel.style.top = top + "px"; panel.top = top; panel.height = rect.height; panel.classList.remove("unpositioned"); const panelRect = panel.getBoundingClientRect() if(main) { panel.classList.toggle("overlapping-main", panelRect.left < mainRect.right) } } let vSoFar = 0; for(const panel of panels.sort(cmpTops)) { if(panel.top < vSoFar) { panel.top = vSoFar; panel.style.top = vSoFar + "px"; } vSoFar = panel.top + panel.height + 15; } } function cmpTops(a,b) { return a.top - b.top; } window.addEventListener("load", repositionAnnoPanels); window.addEventListener("resize", repositionAnnoPanels); } </script> <script>/* Boilerplate: script-var-click-highlighting */ /* Color-choosing design: Colors are ordered by goodness. Each color has a usage count (initially zero). Each variable has a last-used color. * If the var has a last-used color, and that color's usage is 0, return that color. * Otherwise, return the lowest-indexed color with the lowest usage. Increment the color's usage and set it as the last-used color for that var. * On unclicking, decrement usage of the color. */ "use strict"; { document.addEventListener("click", e=>{ if(e.target.nodeName == "VAR") { highlightSameAlgoVars(e.target); } }); const indexCounts = new Map(); const indexNames = new Map(); function highlightSameAlgoVars(v) { // Find the algorithm container. let algoContainer = null; let searchEl = v; while(algoContainer == null && searchEl != document.body) { searchEl = searchEl.parentNode; if(searchEl.hasAttribute("data-algorithm")) { algoContainer = searchEl; } } // Not highlighting document-global vars, // too likely to be unrelated. if(algoContainer == null) return; const algoName = algoContainer.getAttribute("data-algorithm"); const varName = getVarName(v); const addClass = !v.classList.contains("selected"); let highlightClass = null; if(addClass) { const index = chooseHighlightIndex(algoName, varName); indexCounts.get(algoName)[index] += 1; indexNames.set(algoName+"///"+varName, index); highlightClass = nameFromIndex(index); } else { const index = previousHighlightIndex(algoName, varName); indexCounts.get(algoName)[index] -= 1; highlightClass = nameFromIndex(index); } // Find all same-name vars, and toggle their class appropriately. for(const el of algoContainer.querySelectorAll("var")) { if(getVarName(el) == varName) { el.classList.toggle("selected", addClass); el.classList.toggle(highlightClass, addClass); } } } function getVarName(el) { return el.textContent.replace(/(\s|\xa0)+/, " ").trim(); } function chooseHighlightIndex(algoName, varName) { let indexes = null; if(indexCounts.has(algoName)) { indexes = indexCounts.get(algoName); } else { // 7 classes right now indexes = [0,0,0,0,0,0,0]; indexCounts.set(algoName, indexes); } // If the element was recently unclicked, // *and* that color is still unclaimed, // give it back the same color. const lastIndex = previousHighlightIndex(algoName, varName); if(indexes[lastIndex] === 0) return lastIndex; // Find the earliest index with the lowest count. const minCount = Math.min.apply(null, indexes); let index = null; for(var i = 0; i < indexes.length; i++) { if(indexes[i] == minCount) { return i; } } } function previousHighlightIndex(algoName, varName) { return indexNames.get(algoName+"///"+varName); } function nameFromIndex(index) { return "selected" + index; } } </script>