CINXE.COM
Indexed Database API 3.0
<!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>Indexed Database API 3.0</title> <meta content="WD" name="w3c-status"> <meta content="Bikeshed version 742f3d674, updated Mon Nov 4 14:56:54 2024 -0800" name="generator"> <link href="https://www.w3.org/TR/IndexedDB/" rel="canonical"> <meta content="1dd072dfaf448831f21c4a387d17996834c6e949" name="revision"> <meta content="dark light" name="color-scheme"> <style> /* Default ED/WD stylesheets set "both"; not needed for logo floated right */ div.head h1 { clear: left; } table.props { border-collapse: collapse; border-style: hidden hidden none hidden; } table.props thead, table.props tbody { border-bottom: solid; } table.props td, table.props th { border-bottom: solid thin; border-left: solid; border-right: solid; padding: 0.5em; text-align: left; vertical-align: top; } .domintro::before { content: 'For web developers (non-normative)'; text-transform: initial; } .domintro dt { font-family: Menlo, Consolas, "DejaVu Sans Mono", Monaco, monospace; padding-top: 0.5em; padding-bottom: 1em; } .domintro dt a { color: inherit; border-bottom-style: none; } .domintro dt code { font-size: inherit; } </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); --dfnpanel-target-bg: #ffc; --dfnpanel-target-outline: orange; } @media (prefers-color-scheme: dark) { :root { --dfnpanel-bg: #222; --dfnpanel-text: var(--text); --dfnpanel-target-bg: #333; --dfnpanel-target-outline: silver; } } .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 a:focus { outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color; } .dfn-panel > b + b { margin-top: 0.25em; } .dfn-panel ul { padding: 0 0 0 1em; list-style: none; } .dfn-panel li a { max-width: calc(300px - 1.5em - 1em); overflow: hidden; text-overflow: ellipsis; } .dfn-panel.activated { display: inline-block; position: fixed; left: 8px; bottom: 2em; margin: 0 auto; max-width: calc(100vw - 1.5em - .4em - .5em); max-height: 30vh; transition: left 1s ease-out, bottom 1s ease-out; } .dfn-panel .link-item:hover { text-decoration: underline; } .dfn-panel .link-item .copy-icon { opacity: 0; } .dfn-panel .link-item:hover .copy-icon, .dfn-panel .link-item .copy-icon:focus { opacity: 1; } .dfn-panel .copy-icon { display: inline-block; margin-right: 0.5em; width: 0.85em; height: 1em; border-radius: 3px; background-color: #ccc; cursor: pointer; } .dfn-panel .copy-icon .icon { width: 100%; height: 100%; background-color: #fff; display: flex; justify-content: center; align-items: center; position: relative; } .dfn-panel .copy-icon .icon::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px solid black; background-color: #ccc; opacity: 0.25; transform: translate(3px, -3px); } .dfn-panel .copy-icon:active .icon::before { opacity: 1; } .dfn-paneled[role="button"] { cursor: help; } .highlighted { animation: target-fade 3s; } @keyframes target-fade { from { background-color: var(--dfnpanel-target-bg); outline: 5px solid var(--dfnpanel-target-outline); } to { color: var(--a-normal-text); background-color: transparent; outline: transparent; } } </style> <style>/* Boilerplate: style-idl-highlighting */ pre.idl.highlight { background: var(--borderedblock-bg, var(--def-bg)); } </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; --mdn-pass: green; --mdn-fail: red; } @media (prefers-color-scheme: dark) { :root { --mdn-bg: #222; --mdn-shadow: #444; --mdn-nosupport-text: #666; --mdn-pass: #690; --mdn-fail: #d22; } } .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: var(--mdn-fail); padding-right: 2px; } .mdn-anno > summary > .all-engines-flag { color: var(--mdn-pass); 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: var(--mdn-fail); } .mdn-anno > .feature > .all-engines-text { color: var(--mdn-pass); } .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-ref-hints */ :root { --ref-hint-bg: #ddd; --ref-hint-text: var(--text); } @media (prefers-color-scheme: dark) { :root { --ref-hint-bg: #222; --ref-hint-text: var(--text); } } .ref-hint { display: inline-block; position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.5em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--ref-hint-bg); color: var(--ref-hint-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .ref-hint * { margin: 0; padding: 0; text-indent: 0; } .ref-hint ul { padding: 0 0 0 1em; list-style: none; } </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 */ 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) For darkmode: 0 = oklab(50% 0% 108%) 1 = oklab(50% -51% 51%) 2 = oklab(50% -64% -20%) 3 = oklab(50% 6% 19%) 4 = oklab(50% -12% -64%) 5 = oklab(50% 44% -19%) 6 = oklab(50% 102% 38%) */ [data-algorithm] var { cursor: pointer; } var[data-var-color] { background-color: var(--var-bg); box-shadow: 0 0 0 2px var(--var-bg); } var[data-var-color] { --var-bg: #F4D200; } var[data-var-color="1"] { --var-bg: #FF87A2; } var[data-var-color="2"] { --var-bg: #96E885; } var[data-var-color="3"] { --var-bg: #3EEED2; } var[data-var-color="4"] { --var-bg: #EACFB6; } var[data-var-color="5"] { --var-bg: #82DDFF; } var[data-var-color="6"] { --var-vg: #FFBCF2; } @media (prefers-color-scheme: dark) { var[data-var-color] { --var-bg: #bc1a00; } var[data-var-color="1"] { --var-bg: #007f00; } var[data-var-color="2"] { --var-bg: #008698; } var[data-var-color="3"] { --var-bg: #7f5b2b; } var[data-var-color="4"] { --var-bg: #004df3; } var[data-var-color="5"] { --var-bg: #a1248a; } var[data-var-color="6"] { --var-vg: #ff0000; } } </style> <link href="https://www.w3.org/StyleSheets/TR/2021/W3C-WD" rel="stylesheet"> <link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css"> <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">Indexed Database API 3.0</h1> <p id="w3c-state"><a href="https://www.w3.org/standards/types/#WD">W3C Working Draft</a>, <time class="dt-updated" datetime="2024-11-07">7 November 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/WD-IndexedDB-3-20241107/">https://www.w3.org/TR/2024/WD-IndexedDB-3-20241107/</a> <dt>Latest published version: <dd><a href="https://www.w3.org/TR/IndexedDB/">https://www.w3.org/TR/IndexedDB/</a> <dt>Editor's Draft: <dd><a href="https://w3c.github.io/IndexedDB/">https://w3c.github.io/IndexedDB/</a> <dt>Previous Versions: <dd><a href="https://www.w3.org/TR/2024/WD-IndexedDB-3-20241015/" rel="prev">https://www.w3.org/TR/2024/WD-IndexedDB-3-20241015/</a> <dd><a href="https://www.w3.org/TR/2024/WD-IndexedDB-3-20241015/" rel="prev">https://www.w3.org/TR/2024/WD-IndexedDB-3-20241015/</a> <dt>History: <dd><a class="u-url" href="https://www.w3.org/standards/history/IndexedDB-3/">https://www.w3.org/standards/history/IndexedDB-3/</a> <dt>Test Suite: <dd><a href="https://github.com/web-platform-tests/wpt/tree/master/IndexedDB">https://github.com/web-platform-tests/wpt/tree/master/IndexedDB</a> <dt>Feedback: <dd><a href="https://github.com/w3c/IndexedDB/issues/">GitHub</a> <dt class="editor">Editor: <dd class="editor p-author h-card vcard" data-editor-id="61302"><a class="p-name fn u-email email" href="mailto:jsbell@google.com">Joshua Bell</a> (<a class="p-org org" href="https://google.com">Google</a>) <dt class="editor">Former Editor: <dd class="editor p-author h-card vcard" data-editor-id="70376"><span class="p-name fn">Ali Alabbas</span> (<span class="p-org org">Formerly of Microsoft</span>) </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 document defines APIs for a database of records holding simple values and hierarchical objects. Each record consists of a key and some value. Moreover, the database maintains indexes over records it stores. An application developer directly uses an API to locate records either by their key or by using an index. A query language can be layered on this API. An indexed database can be implemented using a persistent B-tree data structure.</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> This document was published by the <a href="https://www.w3.org/groups/wg/webapps">Web Applications Working Group</a> as a Working Draft. This document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation. </p> <p></p> <p> This document was published by the <a href="https://www.w3.org/groups/wg/webapps">Web Applications Working Group</a> as a Working Draft using the <a href="https://www.w3.org/policies/process/20231103/#recs-and-notes">Recommendation track</a>. Feedback and comments on this specification are welcome. Please use <a href="https://github.com/w3c/IndexedDB/issues">GitHub issues</a> Historical discussions can be found in the <a href="https://lists.w3.org/Archives/Public/public-webapps/">public-webapps@w3.org archives</a>. </p> <p> Publication as a Working Draft does not imply endorsement by <abbr title="World Wide Web Consortium">W3C</abbr> and its Members. 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> This document was produced by a group operating under the <a href="https://www.w3.org/policies/patent-policy/20200915/"><abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>. <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="https://www.w3.org/2004/01/pp-impl/114929/status" 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/20200915/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/policies/patent-policy/20200915/#sec-Disclosure">section 6 of the <abbr title="World Wide Web Consortium">W3C</abbr> 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> </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="#introduction"><span class="secno">1</span> <span class="content">Introduction</span></a> <li> <a href="#constructs"><span class="secno">2</span> <span class="content">Constructs</span></a> <ol class="toc"> <li> <a href="#database-construct"><span class="secno">2.1</span> <span class="content">Database</span></a> <ol class="toc"> <li><a href="#database-connection"><span class="secno">2.1.1</span> <span class="content">Database connection</span></a> </ol> <li> <a href="#object-store-construct"><span class="secno">2.2</span> <span class="content">Object store</span></a> <ol class="toc"> <li><a href="#object-store-handle-construct"><span class="secno">2.2.1</span> <span class="content">Object store handle</span></a> </ol> <li><a href="#value-construct"><span class="secno">2.3</span> <span class="content">Values</span></a> <li><a href="#key-construct"><span class="secno">2.4</span> <span class="content">Keys</span></a> <li><a href="#key-path-construct"><span class="secno">2.5</span> <span class="content">Key path</span></a> <li> <a href="#index-construct"><span class="secno">2.6</span> <span class="content">Index</span></a> <ol class="toc"> <li><a href="#index-handle-construct"><span class="secno">2.6.1</span> <span class="content">Index handle</span></a> </ol> <li> <a href="#transaction-construct"><span class="secno">2.7</span> <span class="content">Transactions</span></a> <ol class="toc"> <li><a href="#transaction-lifecycle"><span class="secno">2.7.1</span> <span class="content">Transaction lifecycle</span></a> <li><a href="#transaction-scheduling"><span class="secno">2.7.2</span> <span class="content">Transaction scheduling</span></a> <li><a href="#upgrade-transaction-construct"><span class="secno">2.7.3</span> <span class="content">Upgrade transactions</span></a> </ol> <li> <a href="#request-construct"><span class="secno">2.8</span> <span class="content">Requests</span></a> <ol class="toc"> <li><a href="#open-requests"><span class="secno">2.8.1</span> <span class="content">Open requests</span></a> <li><a href="#connection-queues"><span class="secno">2.8.2</span> <span class="content">Connection queues</span></a> </ol> <li><a href="#range-construct"><span class="secno">2.9</span> <span class="content">Key range</span></a> <li><a href="#cursor-construct"><span class="secno">2.10</span> <span class="content">Cursor</span></a> <li><a href="#key-generator-construct"><span class="secno">2.11</span> <span class="content">Key generators</span></a> </ol> <li><a href="#exceptions"><span class="secno">3</span> <span class="content">Exceptions</span></a> <li> <a href="#async-api"><span class="secno">4</span> <span class="content">API</span></a> <ol class="toc"> <li><a href="#request-api"><span class="secno">4.1</span> <span class="content">The <code class="idl"><span>IDBRequest</span></code> interface</span></a> <li><a href="#events"><span class="secno">4.2</span> <span class="content">Event interfaces</span></a> <li><a href="#factory-interface"><span class="secno">4.3</span> <span class="content">The <code class="idl"><span>IDBFactory</span></code> interface</span></a> <li><a href="#database-interface"><span class="secno">4.4</span> <span class="content">The <code class="idl"><span>IDBDatabase</span></code> interface</span></a> <li><a href="#object-store-interface"><span class="secno">4.5</span> <span class="content">The <code class="idl"><span>IDBObjectStore</span></code> interface</span></a> <li><a href="#index-interface"><span class="secno">4.6</span> <span class="content">The <code class="idl"><span>IDBIndex</span></code> interface</span></a> <li><a href="#keyrange"><span class="secno">4.7</span> <span class="content">The <code class="idl"><span>IDBKeyRange</span></code> interface</span></a> <li><a href="#cursor-interface"><span class="secno">4.8</span> <span class="content">The <code class="idl"><span>IDBCursor</span></code> interface</span></a> <li><a href="#transaction"><span class="secno">4.9</span> <span class="content">The <code class="idl"><span>IDBTransaction</span></code> interface</span></a> </ol> <li> <a href="#algorithms"><span class="secno">5</span> <span class="content">Algorithms</span></a> <ol class="toc"> <li><a href="#opening"><span class="secno">5.1</span> <span class="content">Opening a database connection</span></a> <li><a href="#closing-connection"><span class="secno">5.2</span> <span class="content">Closing a database connection</span></a> <li><a href="#deleting-a-database"><span class="secno">5.3</span> <span class="content">Deleting a database</span></a> <li><a href="#commit-transaction"><span class="secno">5.4</span> <span class="content">Committing a transaction</span></a> <li><a href="#abort-transaction"><span class="secno">5.5</span> <span class="content">Aborting a transaction</span></a> <li><a href="#async-execute-request"><span class="secno">5.6</span> <span class="content">Asynchronously executing a <span>request</span></span></a> <li><a href="#upgrade-transaction-steps"><span class="secno">5.7</span> <span class="content">Upgrading a database</span></a> <li><a href="#abort-upgrade-transaction"><span class="secno">5.8</span> <span class="content">Aborting an upgrade transaction</span></a> <li><a href="#fire-success-event"><span class="secno">5.9</span> <span class="content">Firing a success event</span></a> <li><a href="#fire-error-event"><span class="secno">5.10</span> <span class="content">Firing an error event</span></a> <li><a href="#clone-value"><span class="secno">5.11</span> <span class="content">Clone a value</span></a> </ol> <li> <a href="#database-operations"><span class="secno">6</span> <span class="content">Database operations</span></a> <ol class="toc"> <li><a href="#object-store-storage-operation"><span class="secno">6.1</span> <span class="content">Object store storage operation</span></a> <li><a href="#object-store-retrieval-operation"><span class="secno">6.2</span> <span class="content">Object store retrieval operations</span></a> <li><a href="#index-retrieval-operation"><span class="secno">6.3</span> <span class="content">Index retrieval operations</span></a> <li><a href="#object-store-deletion-operation"><span class="secno">6.4</span> <span class="content">Object store deletion operation</span></a> <li><a href="#record-counting-operation"><span class="secno">6.5</span> <span class="content">Record counting operation</span></a> <li><a href="#object-store-clear-operation"><span class="secno">6.6</span> <span class="content">Object store clear operation</span></a> <li><a href="#cursor-iteration-operation"><span class="secno">6.7</span> <span class="content">Cursor iteration operation</span></a> </ol> <li> <a href="#binding"><span class="secno">7</span> <span class="content">ECMAScript binding</span></a> <ol class="toc"> <li><a href="#extract-key-from-value"><span class="secno">7.1</span> <span class="content">Extract a key from a value</span></a> <li><a href="#inject-key-into-value"><span class="secno">7.2</span> <span class="content">Inject a key into a value</span></a> <li><a href="#convert-key-to-value"><span class="secno">7.3</span> <span class="content">Convert a key to a value</span></a> <li><a href="#convert-value-to-key"><span class="secno">7.4</span> <span class="content">Convert a value to a key</span></a> </ol> <li> <a href="#privacy"><span class="secno">8</span> <span class="content">Privacy considerations</span></a> <ol class="toc"> <li><a href="#user-tracking"><span class="secno">8.1</span> <span class="content">User tracking</span></a> <li><a href="#cookie-resurrection"><span class="secno">8.2</span> <span class="content">Cookie resurrection</span></a> <li><a href="#sensitivity-of-data"><span class="secno">8.3</span> <span class="content">Sensitivity of data</span></a> </ol> <li> <a href="#security"><span class="secno">9</span> <span class="content">Security considerations</span></a> <ol class="toc"> <li><a href="#dns-spoofing-attacks"><span class="secno">9.1</span> <span class="content">DNS spoofing attacks</span></a> <li><a href="#cross-directory-attacks"><span class="secno">9.2</span> <span class="content">Cross-directory attacks</span></a> <li><a href="#implementation-risks"><span class="secno">9.3</span> <span class="content">Implementation risks</span></a> <li><a href="#persistence-risks"><span class="secno">9.4</span> <span class="content">Persistence risks</span></a> </ol> <li><a href="#accessibility"><span class="secno">10</span> <span class="content">Accessibility considerations</span></a> <li><a href="#revision-history"><span class="secno">11</span> <span class="content">Revision history</span></a> <li><a href="#acknowledgements"><span class="secno">12</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> <p>This is the Third Edition of Indexed Database API. The <a href="https://www.w3.org/TR/2015/REC-IndexedDB-20150108/">First Edition</a>, simply titled "Indexed Database API", became a W3C Recommendation on 8 January 2015. The <a href="https://www.w3.org/TR/2018/REC-IndexedDB-2-20180130/">Second Edition</a>, titled "Indexed Database API 2.0", became a W3C Recommendation on 30 January 2018.</p> <p>Indexed Database API 3.0 is intended to supersede Indexed Database API 2.0.</p> <h2 class="heading settled" data-level="1" id="introduction"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#introduction"></a></h2> <p>User agents need to store large numbers of objects locally in order to satisfy off-line data requirements of Web applications. <a data-link-type="biblio" href="#biblio-webstorage" title="Web Storage (Second Edition)">[WEBSTORAGE]</a> is useful for storing pairs of keys and their corresponding values. However, it does not provide in-order retrieval of keys, efficient searching over values, or storage of duplicate values for a key.</p> <p>This specification provides a concrete API to perform advanced key-value data management that is at the heart of most sophisticated query processors. It does so by using transactional databases to store keys and their corresponding values (one or more per key), and providing a means of traversing keys in a deterministic order. This is often implemented through the use of persistent B-tree data structures that are considered efficient for insertion and deletion as well as in-order traversal of very large numbers of data records.</p> <div class="example" id="example-open-connection"> <a class="self-link" href="#example-open-connection"></a> The following example uses the API to access a <code>"library"</code> database. It has a <code>"books"</code> object store that holds books records stored by their <code>"isbn"</code> property as the primary key. <p>Book records have a <code>"title"</code> property. This example artificially requires that book titles are unique. The code enforces this by creating an index named <code>"by_title"</code> with the <code class="idl"><a data-link-type="idl" href="#dom-idbindexparameters-unique" id="ref-for-dom-idbindexparameters-unique">unique</a></code> option set. This index is used to look up books by title, and will prevent adding books with non-unique titles.</p> <p>Book records also have an <code>"author"</code> property, which is not <span class="allow-2119">required</span> to be unique. The code creates another index named <code>"by_author"</code> to allow look-ups by this property.</p> <p>The code first opens a connection to the database. The <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded">upgradeneeded</a></code> event handler code creates the object store and indexes, if needed. The <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success">success</a></code> event handler code saves the opened connection for use in later examples.</p> <pre class="language-js highlight"><c- a>const</c-> request <c- o>=</c-> indexedDB<c- p>.</c->open<c- p>(</c-><c- u>"library"</c-><c- p>);</c-> <c- a>let</c-> db<c- p>;</c-> request<c- p>.</c->onupgradeneeded <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> <c- c1>// The database did not previously exist, so create object stores and indexes.</c-> <c- a>const</c-> db <c- o>=</c-> request<c- p>.</c->result<c- p>;</c-> <c- a>const</c-> store <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"books"</c-><c- p>,</c-> <c- p>{</c->keyPath<c- o>:</c-> <c- u>"isbn"</c-><c- p>});</c-> <c- a>const</c-> titleIndex <c- o>=</c-> store<c- p>.</c->createIndex<c- p>(</c-><c- u>"by_title"</c-><c- p>,</c-> <c- u>"title"</c-><c- p>,</c-> <c- p>{</c->unique<c- o>:</c-> <c- kc>true</c-><c- p>});</c-> <c- a>const</c-> authorIndex <c- o>=</c-> store<c- p>.</c->createIndex<c- p>(</c-><c- u>"by_author"</c-><c- p>,</c-> <c- u>"author"</c-><c- p>);</c-> <c- c1>// Populate with initial data.</c-> store<c- p>.</c->put<c- p>({</c->title<c- o>:</c-> <c- u>"Quarry Memories"</c-><c- p>,</c-> author<c- o>:</c-> <c- u>"Fred"</c-><c- p>,</c-> isbn<c- o>:</c-> <c- mf>123456</c-><c- p>});</c-> store<c- p>.</c->put<c- p>({</c->title<c- o>:</c-> <c- u>"Water Buffaloes"</c-><c- p>,</c-> author<c- o>:</c-> <c- u>"Fred"</c-><c- p>,</c-> isbn<c- o>:</c-> <c- mf>234567</c-><c- p>});</c-> store<c- p>.</c->put<c- p>({</c->title<c- o>:</c-> <c- u>"Bedrock Nights"</c-><c- p>,</c-> author<c- o>:</c-> <c- u>"Barney"</c-><c- p>,</c-> isbn<c- o>:</c-> <c- mf>345678</c-><c- p>});</c-> <c- p>};</c-> request<c- p>.</c->onsuccess <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> db <c- o>=</c-> request<c- p>.</c->result<c- p>;</c-> <c- p>};</c-> </pre> <p>The following example populates the database using a transaction.</p> <pre class="language-js highlight"><c- a>const</c-> tx <c- o>=</c-> db<c- p>.</c->transaction<c- p>(</c-><c- u>"books"</c-><c- p>,</c-> <c- u>"readwrite"</c-><c- p>);</c-> <c- a>const</c-> store <c- o>=</c-> tx<c- p>.</c->objectStore<c- p>(</c-><c- u>"books"</c-><c- p>);</c-> store<c- p>.</c->put<c- p>({</c->title<c- o>:</c-> <c- u>"Quarry Memories"</c-><c- p>,</c-> author<c- o>:</c-> <c- u>"Fred"</c-><c- p>,</c-> isbn<c- o>:</c-> <c- mf>123456</c-><c- p>});</c-> store<c- p>.</c->put<c- p>({</c->title<c- o>:</c-> <c- u>"Water Buffaloes"</c-><c- p>,</c-> author<c- o>:</c-> <c- u>"Fred"</c-><c- p>,</c-> isbn<c- o>:</c-> <c- mf>234567</c-><c- p>});</c-> store<c- p>.</c->put<c- p>({</c->title<c- o>:</c-> <c- u>"Bedrock Nights"</c-><c- p>,</c-> author<c- o>:</c-> <c- u>"Barney"</c-><c- p>,</c-> isbn<c- o>:</c-> <c- mf>345678</c-><c- p>});</c-> tx<c- p>.</c->oncomplete <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> <c- c1>// All requests have succeeded and the transaction has committed.</c-> <c- p>};</c-> </pre> <p>The following example looks up a single book in the database by title using an index.</p> <pre class="language-js highlight"><c- a>const</c-> tx <c- o>=</c-> db<c- p>.</c->transaction<c- p>(</c-><c- u>"books"</c-><c- p>,</c-> <c- u>"readonly"</c-><c- p>);</c-> <c- a>const</c-> store <c- o>=</c-> tx<c- p>.</c->objectStore<c- p>(</c-><c- u>"books"</c-><c- p>);</c-> <c- a>const</c-> index <c- o>=</c-> store<c- p>.</c->index<c- p>(</c-><c- u>"by_title"</c-><c- p>);</c-> <c- a>const</c-> request <c- o>=</c-> index<c- p>.</c->get<c- p>(</c-><c- u>"Bedrock Nights"</c-><c- p>);</c-> request<c- p>.</c->onsuccess <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> <c- a>const</c-> matching <c- o>=</c-> request<c- p>.</c->result<c- p>;</c-> <c- k>if</c-> <c- p>(</c->matching <c- o>!==</c-> <c- kc>undefined</c-><c- p>)</c-> <c- p>{</c-> <c- c1>// A match was found.</c-> report<c- p>(</c->matching<c- p>.</c->isbn<c- p>,</c-> matching<c- p>.</c->title<c- p>,</c-> matching<c- p>.</c->author<c- p>);</c-> <c- p>}</c-> <c- k>else</c-> <c- p>{</c-> <c- c1>// No match was found.</c-> report<c- p>(</c-><c- kc>null</c-><c- p>);</c-> <c- p>}</c-> <c- p>};</c-> </pre> <p>The following example looks up all books in the database by author using an index and a cursor.</p> <pre class="language-js highlight"><c- a>const</c-> tx <c- o>=</c-> db<c- p>.</c->transaction<c- p>(</c-><c- u>"books"</c-><c- p>,</c-> <c- u>"readonly"</c-><c- p>);</c-> <c- a>const</c-> store <c- o>=</c-> tx<c- p>.</c->objectStore<c- p>(</c-><c- u>"books"</c-><c- p>);</c-> <c- a>const</c-> index <c- o>=</c-> store<c- p>.</c->index<c- p>(</c-><c- u>"by_author"</c-><c- p>);</c-> <c- a>const</c-> request <c- o>=</c-> index<c- p>.</c->openCursor<c- p>(</c->IDBKeyRange<c- p>.</c->only<c- p>(</c-><c- u>"Fred"</c-><c- p>));</c-> request<c- p>.</c->onsuccess <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> <c- a>const</c-> cursor <c- o>=</c-> request<c- p>.</c->result<c- p>;</c-> <c- k>if</c-> <c- p>(</c->cursor<c- p>)</c-> <c- p>{</c-> <c- c1>// Called for each matching record.</c-> report<c- p>(</c->cursor<c- p>.</c->value<c- p>.</c->isbn<c- p>,</c-> cursor<c- p>.</c->value<c- p>.</c->title<c- p>,</c-> cursor<c- p>.</c->value<c- p>.</c->author<c- p>);</c-> cursor<c- p>.</c-><c- k>continue</c-><c- p>();</c-> <c- p>}</c-> <c- k>else</c-> <c- p>{</c-> <c- c1>// No more matching records.</c-> report<c- p>(</c-><c- kc>null</c-><c- p>);</c-> <c- p>}</c-> <c- p>};</c-> </pre> <p>The following example shows one way to handle errors when a request fails.</p> <pre class="language-js highlight"><c- a>const</c-> tx <c- o>=</c-> db<c- p>.</c->transaction<c- p>(</c-><c- u>"books"</c-><c- p>,</c-> <c- u>"readwrite"</c-><c- p>);</c-> <c- a>const</c-> store <c- o>=</c-> tx<c- p>.</c->objectStore<c- p>(</c-><c- u>"books"</c-><c- p>);</c-> <c- a>const</c-> request <c- o>=</c-> store<c- p>.</c->put<c- p>({</c->title<c- o>:</c-> <c- u>"Water Buffaloes"</c-><c- p>,</c-> author<c- o>:</c-> <c- u>"Slate"</c-><c- p>,</c-> isbn<c- o>:</c-> <c- mf>987654</c-><c- p>});</c-> request<c- p>.</c->onerror <c- o>=</c-> <c- a>function</c-><c- p>(</c->event<c- p>)</c-> <c- p>{</c-> <c- c1>// The uniqueness constraint of the "by_title" index failed.</c-> report<c- p>(</c->request<c- p>.</c->error<c- p>);</c-> <c- c1>// Could call event.preventDefault() to prevent the transaction from aborting.</c-> <c- p>};</c-> tx<c- p>.</c->onabort <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> <c- c1>// Otherwise the transaction will automatically abort due the failed request.</c-> report<c- p>(</c->tx<c- p>.</c->error<c- p>);</c-> <c- p>};</c-> </pre> <p>The database connection can be closed when it is no longer needed.</p> <pre class="language-js highlight">db<c- p>.</c->close<c- p>();</c-> </pre> <p>In the future, the database might have grown to contain other object stores and indexes. The following example shows one way to handle migrating from an older version.</p> <pre class="language-js highlight"><c- a>const</c-> request <c- o>=</c-> indexedDB<c- p>.</c->open<c- p>(</c-><c- u>"library"</c-><c- p>,</c-> <c- mf>3</c-><c- p>);</c-> <c- c1>// Request version 3.</c-> <c- a>let</c-> db<c- p>;</c-> request<c- p>.</c->onupgradeneeded <c- o>=</c-> <c- a>function</c-><c- p>(</c->event<c- p>)</c-> <c- p>{</c-> <c- a>const</c-> db <c- o>=</c-> request<c- p>.</c->result<c- p>;</c-> <c- k>if</c-> <c- p>(</c->event<c- p>.</c->oldVersion <c- o><</c-> <c- mf>1</c-><c- p>)</c-> <c- p>{</c-> <c- c1>// Version 1 is the first version of the database.</c-> <c- a>const</c-> store <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"books"</c-><c- p>,</c-> <c- p>{</c->keyPath<c- o>:</c-> <c- u>"isbn"</c-><c- p>});</c-> <c- a>const</c-> titleIndex <c- o>=</c-> store<c- p>.</c->createIndex<c- p>(</c-><c- u>"by_title"</c-><c- p>,</c-> <c- u>"title"</c-><c- p>,</c-> <c- p>{</c->unique<c- o>:</c-> <c- kc>true</c-><c- p>});</c-> <c- a>const</c-> authorIndex <c- o>=</c-> store<c- p>.</c->createIndex<c- p>(</c-><c- u>"by_author"</c-><c- p>,</c-> <c- u>"author"</c-><c- p>);</c-> <c- p>}</c-> <c- k>if</c-> <c- p>(</c->event<c- p>.</c->oldVersion <c- o><</c-> <c- mf>2</c-><c- p>)</c-> <c- p>{</c-> <c- c1>// Version 2 introduces a new index of books by year.</c-> <c- a>const</c-> bookStore <c- o>=</c-> request<c- p>.</c->transaction<c- p>.</c->objectStore<c- p>(</c-><c- u>"books"</c-><c- p>);</c-> <c- a>const</c-> yearIndex <c- o>=</c-> bookStore<c- p>.</c->createIndex<c- p>(</c-><c- u>"by_year"</c-><c- p>,</c-> <c- u>"year"</c-><c- p>);</c-> <c- p>}</c-> <c- k>if</c-> <c- p>(</c->event<c- p>.</c->oldVersion <c- o><</c-> <c- mf>3</c-><c- p>)</c-> <c- p>{</c-> <c- c1>// Version 3 introduces a new object store for magazines with two indexes.</c-> <c- a>const</c-> magazines <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"magazines"</c-><c- p>);</c-> <c- a>const</c-> publisherIndex <c- o>=</c-> magazines<c- p>.</c->createIndex<c- p>(</c-><c- u>"by_publisher"</c-><c- p>,</c-> <c- u>"publisher"</c-><c- p>);</c-> <c- a>const</c-> frequencyIndex <c- o>=</c-> magazines<c- p>.</c->createIndex<c- p>(</c-><c- u>"by_frequency"</c-><c- p>,</c-> <c- u>"frequency"</c-><c- p>);</c-> <c- p>}</c-> <c- p>};</c-> request<c- p>.</c->onsuccess <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> db <c- o>=</c-> request<c- p>.</c->result<c- p>;</c-> <c- c1>// db.version will be 3.</c-> <c- p>};</c-> </pre> </div> <div class="example" id="handling-versionchange"> <a class="self-link" href="#handling-versionchange"></a> A single database can be used by multiple clients (pages and workers) simultaneously — transactions ensure they don’t clash while reading and writing. If a new client wants to upgrade the database (via the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded①">upgradeneeded</a></code> event), it cannot do so until all other clients close their connection to the current version of the database. <p>To avoid blocking a new client from upgrading, clients can listen for the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange">versionchange</a></code> event. This fires when another client is wanting to upgrade the database. To allow this to continue, react to the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange①">versionchange</a></code> event by doing something that ultimately closes this client’s <a data-link-type="dfn" href="#connection" id="ref-for-connection">connection</a> to the database.</p> <p>One way of doing this is to reload the page:</p> <pre class="language-js highlight">db<c- p>.</c->onversionchange <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> <c- c1>// First, save any unsaved data:</c-> saveUnsavedData<c- p>().</c->then<c- p>(</c-><c- a>function</c-><c- p>()</c-> <c- p>{</c-> <c- c1>// If the document isn't being actively used, it could be appropriate to reload</c-> <c- c1>// the page without the user's interaction.</c-> <c- k>if</c-> <c- p>(</c-><c- o>!</c->document<c- p>.</c->hasFocus<c- p>())</c-> <c- p>{</c-> location<c- p>.</c->reload<c- p>();</c-> <c- c1>// Reloading will close the database, and also reload with the new JavaScript</c-> <c- c1>// and database definitions.</c-> <c- p>}</c-> <c- k>else</c-> <c- p>{</c-> <c- c1>// If the document has focus, it can be too disruptive to reload the page.</c-> <c- c1>// Maybe ask the user to do it manually:</c-> displayMessage<c- p>(</c-><c- u>"Please reload this page for the latest version."</c-><c- p>);</c-> <c- p>}</c-> <c- p>});</c-> <c- p>};</c-> <c- a>function</c-> saveUnsavedData<c- p>()</c-> <c- p>{</c-> <c- c1>// How you do this depends on your app.</c-> <c- p>}</c-> <c- a>function</c-> displayMessage<c- p>()</c-> <c- p>{</c-> <c- c1>// Show a non-modal message to the user.</c-> <c- p>}</c-> </pre> <p>Another way is to call the <a data-link-type="dfn" href="#connection" id="ref-for-connection①">connection</a>'s <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-close" id="ref-for-dom-idbdatabase-close">close()</a></code> method. However, you need to make sure your app is aware of this, as subsequent attempts to access the database will fail.</p> <pre class="language-js highlight">db<c- p>.</c->onversionchange <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> saveUnsavedData<c- p>().</c->then<c- p>(</c-><c- a>function</c-><c- p>()</c-> <c- p>{</c-> db<c- p>.</c->close<c- p>();</c-> stopUsingTheDatabase<c- p>();</c-> <c- p>});</c-> <c- p>};</c-> <c- a>function</c-> stopUsingTheDatabase<c- p>()</c-> <c- p>{</c-> <c- c1>// Put the app into a state where it no longer uses the database.</c-> <c- p>}</c-> </pre> <p>The new client (the one attempting the upgrade) can use the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-blocked" id="ref-for-eventdef-idbopendbrequest-blocked">blocked</a></code> event to detect if other clients are preventing the upgrade from happening. The <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-blocked" id="ref-for-eventdef-idbopendbrequest-blocked①">blocked</a></code> event fires if other clients still hold a connection to the database after their <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange②">versionchange</a></code> events have fired.</p> <pre class="language-js highlight"><c- a>const</c-> request <c- o>=</c-> indexedDB<c- p>.</c->open<c- p>(</c-><c- u>"library"</c-><c- p>,</c-> <c- mf>4</c-><c- p>);</c-> <c- c1>// Request version 4.</c-> <c- a>let</c-> blockedTimeout<c- p>;</c-> request<c- p>.</c->onblocked <c- o>=</c-> <c- a>function</c-><c- p>()</c-> <c- p>{</c-> <c- c1>// Give the other clients time to save data asynchronously.</c-> blockedTimeout <c- o>=</c-> setTimeout<c- p>(</c-><c- a>function</c-><c- p>()</c-> <c- p>{</c-> displayMessage<c- p>(</c-><c- u>"Upgrade blocked - Please close other tabs displaying this site."</c-><c- p>);</c-> <c- p>},</c-> <c- mf>1000</c-><c- p>);</c-> <c- p>};</c-> request<c- p>.</c->onupgradeneeded <c- o>=</c-> <c- a>function</c-><c- p>(</c->event<c- p>)</c-> <c- p>{</c-> clearTimeout<c- p>(</c->blockedTimeout<c- p>);</c-> hideMessage<c- p>();</c-> <c- c1>// ...</c-> <c- p>};</c-> <c- a>function</c-> hideMessage<c- p>()</c-> <c- p>{</c-> <c- c1>// Hide a previously displayed message.</c-> <c- p>}</c-> </pre> <p>The user will only see the above message if another client fails to disconnect from the database. Ideally the user will never see this.</p> </div> <h2 class="heading settled" data-level="2" id="constructs"><span class="secno">2. </span><span class="content">Constructs</span><a class="self-link" href="#constructs"></a></h2> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="name">name</dfn> is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#string" id="ref-for-string">string</a> equivalent to a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString">DOMString</a></code>; that is, an arbitrary sequence of 16-bit code units of any length, including the empty string. <a data-link-type="dfn" href="#name" id="ref-for-name">Names</a> are always compared as opaque sequences of 16-bit code units.</p> <div class="note" role="note"> <span class="marker">NOTE:</span> As a result, <a data-link-type="dfn" href="#name" id="ref-for-name①">name</a> comparison is sensitive to variations in case as well as other minor variations such as normalization form, the inclusion or omission of controls, and other variations in Unicode text. <a data-link-type="biblio" href="#biblio-charmod-norm" title="Character Model for the World Wide Web: String Matching">[Charmod-Norm]</a> <p>If an implementation uses a storage mechanism which does not support arbitrary strings, the implementation can use an escaping mechanism or something similar to map the provided name to a string that it can store.</p> </div> <div class="algorithm" data-algorithm="create a sorted name list"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="create-a-sorted-name-list">create a sorted name list</dfn> from a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list">list</a> <var>names</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>sorted</var> be <var>names</var> <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-sort-in-ascending-order" id="ref-for-list-sort-in-ascending-order">sorted in ascending order</a> with the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#code-unit-less-than" id="ref-for-code-unit-less-than">code unit less than</a> algorithm.</p> <li data-md> <p>Return a new <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist" id="ref-for-domstringlist">DOMStringList</a></code> associated with <var>sorted</var>.</p> </ol> </div> <details class="note"> <summary>Details</summary> This matches the <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.sort" id="ref-for-sec-array.prototype.sort">sort()</a></code> method on an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects">Array</a></code> of <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/text-processing.html#sec-string-objects" id="ref-for-sec-string-objects">String</a></code>. This ordering compares the 16-bit code units in each string, producing a highly efficient, consistent, and deterministic sort order. The resulting list will not match any particular alphabet or lexicographical order, particularly for code points represented by a surrogate pair. </details> <h3 class="heading settled" data-level="2.1" id="database-construct"><span class="secno">2.1. </span><span class="content">Database</span><a class="self-link" href="#database-construct"></a></h3> <p>Each <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-key" id="ref-for-storage-key">storage key</a> has an associated set of <a data-link-type="dfn" href="#database" id="ref-for-database">databases</a>. A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="database">database</dfn> has zero or more <a data-link-type="dfn" href="#object-store" id="ref-for-object-store">object stores</a> which hold the data stored in the database.</p> <div> <p>A <a data-link-type="dfn" href="#database" id="ref-for-database①">database</a> has a <dfn class="dfn-paneled" data-dfn-for="database" data-dfn-type="dfn" data-noexport id="database-name">name</dfn> which identifies it within a specific <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-key" id="ref-for-storage-key①">storage key</a>. The name is a <a data-link-type="dfn" href="#name" id="ref-for-name②">name</a>, and stays constant for the lifetime of the database.</p> <p>A <a data-link-type="dfn" href="#database" id="ref-for-database②">database</a> has a <dfn class="dfn-paneled" data-dfn-for="database" data-dfn-type="dfn" data-noexport id="database-version">version</dfn>. When a database is first created, its <a data-link-type="dfn" href="#database-version" id="ref-for-database-version">version</a> is 0 (zero).</p> <p class="note" role="note"><span class="marker">NOTE:</span> Each <a data-link-type="dfn" href="#database" id="ref-for-database③">database</a> has one version at a time; a <a data-link-type="dfn" href="#database" id="ref-for-database④">database</a> can’t exist in multiple versions at once. The only way to change the version is using an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction">upgrade transaction</a>.</p> <p>A <a data-link-type="dfn" href="#database" id="ref-for-database⑤">database</a> has at most one associated <dfn class="dfn-paneled" data-dfn-for="database" data-dfn-type="dfn" data-noexport id="database-upgrade-transaction">upgrade transaction</dfn>, which is either null or an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①">upgrade transaction</a>, and is initially null.</p> </div> <h4 class="heading settled" data-level="2.1.1" id="database-connection"><span class="secno">2.1.1. </span><span class="content">Database connection</span><a class="self-link" href="#database-connection"></a></h4> <p>Script does not interact with <a data-link-type="dfn" href="#database" id="ref-for-database⑥">databases</a> directly. Instead, script has indirect access via a <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="connection|connected" data-noexport id="connection">connection</dfn>. A <a data-link-type="dfn" href="#connection" id="ref-for-connection②">connection</a> object can be used to manipulate the objects of that <a data-link-type="dfn" href="#database" id="ref-for-database⑦">database</a>. It is also the only way to obtain a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept">transaction</a> for that <a data-link-type="dfn" href="#database" id="ref-for-database⑧">database</a>.</p> <p>The act of opening a <a data-link-type="dfn" href="#database" id="ref-for-database⑨">database</a> creates a <a data-link-type="dfn" href="#connection" id="ref-for-connection③">connection</a>. There may be multiple <a data-link-type="dfn" href="#connection" id="ref-for-connection④">connections</a> to a given <a data-link-type="dfn" href="#database" id="ref-for-database①⓪">database</a> at any given time.</p> <p>A <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤">connection</a> can only access <a data-link-type="dfn" href="#database" id="ref-for-database①①">databases</a> associated with the <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-key" id="ref-for-storage-key②">storage key</a> of the global scope from which the <a data-link-type="dfn" href="#connection" id="ref-for-connection⑥">connection</a> is opened.</p> <p class="note" role="note"><span class="marker">NOTE:</span> This is not affected by changes to the <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#document" id="ref-for-document">Document</a></code>'s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/browsers.html#dom-document-domain" id="ref-for-dom-document-domain">domain</a></code>.</p> <div> <p>A <a data-link-type="dfn" href="#connection" id="ref-for-connection⑦">connection</a> has a <dfn class="dfn-paneled" data-dfn-for="connection" data-dfn-type="dfn" data-noexport id="connection-version">version</dfn>, which is set when the <a data-link-type="dfn" href="#connection" id="ref-for-connection⑧">connection</a> is created. It remains constant for the lifetime of the <a data-link-type="dfn" href="#connection" id="ref-for-connection⑨">connection</a> unless an <a data-link-type="dfn" href="#abort-an-upgrade-transaction" id="ref-for-abort-an-upgrade-transaction">upgrade is aborted</a>, in which case it is set to the previous version of the <a data-link-type="dfn" href="#database" id="ref-for-database①②">database</a>. Once the <a data-link-type="dfn" href="#connection" id="ref-for-connection①⓪">connection</a> is closed the <a data-link-type="dfn" href="#connection-version" id="ref-for-connection-version">version</a> does not change.</p> <p>Each connection has a <dfn class="dfn-paneled" data-dfn-for="connection" data-dfn-type="dfn" data-noexport id="connection-close-pending-flag">close pending flag</dfn> which is initially false.</p> <p>When a <a data-link-type="dfn" href="#connection" id="ref-for-connection①①">connection</a> is initially created it is in an opened state. The connection can be <dfn class="dfn-paneled" data-dfn-for="connection" data-dfn-type="dfn" data-noexport id="connection-closed">closed</dfn> through several means. If the execution context where the <a data-link-type="dfn" href="#connection" id="ref-for-connection①②">connection</a> was created is destroyed (for example due to the user navigating away from that page), the connection is closed. The connection can also be closed explicitly using the steps to <a data-link-type="dfn" href="#close-a-database-connection" id="ref-for-close-a-database-connection">close a database connection</a>. When the connection is closed its <a data-link-type="dfn" href="#connection-close-pending-flag" id="ref-for-connection-close-pending-flag">close pending flag</a> is always set to true if it hasn’t already been.</p> <p>A <a data-link-type="dfn" href="#connection" id="ref-for-connection①③">connection</a> may be closed by a user agent in exceptional circumstances, for example due to loss of access to the file system, a permission change, or clearing of the <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-key" id="ref-for-storage-key③">storage key</a>'s storage. If this occurs the user agent must run <a data-link-type="dfn" href="#close-a-database-connection" id="ref-for-close-a-database-connection①">close a database connection</a> with the <a data-link-type="dfn" href="#connection" id="ref-for-connection①④">connection</a> and with the <var>forced flag</var> set to true.</p> <p>A <a data-link-type="dfn" href="#connection" id="ref-for-connection①⑤">connection</a> has an <dfn class="dfn-paneled" data-dfn-for="connection" data-dfn-type="dfn" data-noexport id="connection-object-store-set">object store set</dfn>, which is initialized to the set of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①">object stores</a> in the associated <a data-link-type="dfn" href="#database" id="ref-for-database①③">database</a> when the <a data-link-type="dfn" href="#connection" id="ref-for-connection①⑥">connection</a> is created. The contents of the set will remain constant except when an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②">upgrade transaction</a> is <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live">live</a>.</p> <p>A <a data-link-type="dfn" href="#connection" id="ref-for-connection①⑦">connection</a>'s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#get-the-parent" id="ref-for-get-the-parent">get the parent</a> algorithm returns null.</p> <p>An event with type <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="event" data-export id="eventdef-idbdatabase-versionchange"><code>versionchange</code></dfn> will be fired at an open <a data-link-type="dfn" href="#connection" id="ref-for-connection①⑧">connection</a> if an attempt is made to upgrade or delete the <a data-link-type="dfn" href="#database" id="ref-for-database①④">database</a>. This gives the <a data-link-type="dfn" href="#connection" id="ref-for-connection①⑨">connection</a> the opportunity to close to allow the upgrade or delete to proceed.</p> <p>An event with type <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="event" data-export id="eventdef-idbdatabase-close"><code>close</code></dfn> will be fired at a <a data-link-type="dfn" href="#connection" id="ref-for-connection②⓪">connection</a> if the connection is <a data-link-type="dfn" href="#close-a-database-connection" id="ref-for-close-a-database-connection②">closed</a> abnormally.</p> </div> <h3 class="heading settled" data-level="2.2" id="object-store-construct"><span class="secno">2.2. </span><span class="content">Object store</span><a class="self-link" href="#object-store-construct"></a></h3> <p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="object-store">object store</dfn> is the primary storage mechanism for storing data in a <a data-link-type="dfn" href="#database" id="ref-for-database①⑤">database</a>.</p> <div> <p>Each database has a set of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②">object stores</a>. The set of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③">object stores</a> can be changed, but only using an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③">upgrade transaction</a>, i.e. in response to an <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded②">upgradeneeded</a></code> event. When a new database is created it doesn’t contain any <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④">object stores</a>.</p> <p>An <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤">object store</a> has a <dfn class="dfn-paneled" data-dfn-for="object-store" data-dfn-type="dfn" data-noexport id="object-store-list-of-records">list of records</dfn> which hold the data stored in the object store. Each <dfn class="dfn-paneled" data-dfn-for="object-store" data-dfn-type="dfn" data-noexport id="object-store-record">record</dfn> consists of a <a data-link-type="dfn" href="#key" id="ref-for-key">key</a> and a <a data-link-type="dfn" href="#value" id="ref-for-value">value</a>. The list is sorted according to key in <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than">ascending</a> order. There can never be multiple records in a given object store with the same key.</p> <p>An <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥">object store</a> has a <dfn class="dfn-paneled" data-dfn-for="object-store" data-dfn-type="dfn" data-noexport id="object-store-name">name</dfn>, which is a <a data-link-type="dfn" href="#name" id="ref-for-name③">name</a>. At any one time, the name is unique within the <a data-link-type="dfn" href="#database" id="ref-for-database①⑥">database</a> to which it belongs.</p> <p>An <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦">object store</a> optionally has a <dfn class="dfn-paneled" data-dfn-for="object-store" data-dfn-type="dfn" data-noexport id="object-store-key-path">key path</dfn>. If the object store has a key path it is said to use <dfn class="dfn-paneled" data-dfn-for="object-store" data-dfn-type="dfn" data-noexport id="object-store-in-line-keys">in-line keys</dfn>. Otherwise it is said to use <dfn class="dfn-paneled" data-dfn-for="object-store" data-dfn-type="dfn" data-noexport id="object-store-out-of-line-keys">out-of-line keys</dfn>.</p> <p>An <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧">object store</a> optionally has a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator">key generator</a>.</p> <p>An object store can derive a <a data-link-type="dfn" href="#key" id="ref-for-key①">key</a> for a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record">record</a> from one of three sources:</p> <ol> <li data-md> <p>A <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①">key generator</a>. A key generator generates a monotonically increasing numbers every time a key is needed.</p> <li data-md> <p>Keys can be derived via a <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path">key path</a>.</p> <li data-md> <p>Keys can also be explicitly specified when a <a data-link-type="dfn" href="#value" id="ref-for-value①">value</a> is stored in the object store.</p> </ol> </div> <h4 class="heading settled" data-level="2.2.1" id="object-store-handle-construct"><span class="secno">2.2.1. </span><span class="content">Object store handle</span><a class="self-link" href="#object-store-handle-construct"></a></h4> <p>Script does not interact with <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨">object stores</a> directly. Instead, within a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①">transaction</a>, script has indirect access via an <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="object-store-handle">object store handle</dfn>.</p> <div> <p>An <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle">object store handle</a> has an associated <dfn class="dfn-paneled" data-dfn-for="object-store-handle" data-dfn-type="dfn" data-noexport id="object-store-handle-object-store">object store</dfn> and an associated <dfn class="dfn-paneled" data-dfn-for="object-store-handle" data-dfn-type="dfn" data-noexport id="object-store-handle-transaction">transaction</dfn>. Multiple handles may be associated with the same <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⓪">object store</a> in different <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②">transactions</a>, but there must be only one <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle①">object store handle</a> associated with a particular <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①①">object store</a> within a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③">transaction</a>.</p> <p>An <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle②">object store handle</a> has an <dfn class="dfn-paneled" data-dfn-for="object-store-handle" data-dfn-type="dfn" data-noexport id="object-store-handle-index-set">index set</dfn>, which is initialized to the set of <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept">indexes</a> that reference the associated <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store">object store</a> when the <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle③">object store handle</a> is created. The contents of the set will remain constant except when an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④">upgrade transaction</a> is <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live①">live</a>.</p> <p>An <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle④">object store handle</a> has a <dfn class="dfn-paneled" data-dfn-for="object-store-handle" data-dfn-type="dfn" data-noexport id="object-store-handle-name">name</dfn>, which is initialized to the <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name">name</a> of the associated <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①">object store</a> when the <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle⑤">object store handle</a> is created. The name will remain constant except when an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑤">upgrade transaction</a> is <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live②">live</a>.</p> </div> <h3 class="heading settled" data-level="2.3" id="value-construct"><span class="secno">2.3. </span><span class="content">Values</span><a class="self-link" href="#value-construct"></a></h3> <p>Each record is associated with a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="value">value</dfn>. User agents must support any <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/structured-data.html#serializable-objects" id="ref-for-serializable-objects">serializable object</a>. This includes simple types such as <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/text-processing.html#sec-string-objects" id="ref-for-sec-string-objects①">String</a></code> primitive values and <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-objects" id="ref-for-sec-date-objects">Date</a></code> objects as well as <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object-objects" id="ref-for-sec-object-objects">Object</a></code> and <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①">Array</a></code> instances, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-file" id="ref-for-dfn-file">File</a></code> objects, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-Blob" id="ref-for-dfn-Blob">Blob</a></code> objects, <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/canvas.html#imagedata" id="ref-for-imagedata">ImageData</a></code> objects, and so on. Record <a data-link-type="dfn" href="#value" id="ref-for-value②">values</a> are stored and retrieved by value rather than by reference; later changes to a value have no effect on the record stored in the database.</p> <p>Record <a data-link-type="dfn" href="#value" id="ref-for-value③">values</a> are <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-record" id="ref-for-idl-record">Records</a> output by the <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage" id="ref-for-structuredserializeforstorage">StructuredSerializeForStorage</a> operation.</p> <h3 class="heading settled" data-level="2.4" id="key-construct"><span class="secno">2.4. </span><span class="content">Keys</span><a class="self-link" href="#key-construct"></a></h3> <p>In order to efficiently retrieve <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①">records</a> stored in an indexed database, each <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②">record</a> is organized according to its <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="key">key</dfn>.</p> <div> <p>A <a data-link-type="dfn" href="#key" id="ref-for-key②">key</a> has an associated <dfn class="dfn-paneled" data-dfn-for="key" data-dfn-type="dfn" data-noexport id="key-type">type</dfn> which is one of: <em>number</em>, <em>date</em>, <em>string</em>, <em>binary</em>, or <em>array</em>.</p> <p>A <a data-link-type="dfn" href="#key" id="ref-for-key③">key</a> also has an associated <dfn class="dfn-paneled" data-dfn-for="key" data-dfn-type="dfn" data-noexport id="key-value">value</dfn>, which will be either: an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-unrestricted-double" id="ref-for-idl-unrestricted-double">unrestricted double</a></code> if type is <em>number</em> or <em>date</em>, a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①">DOMString</a></code> if type is <em>string</em>, a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#byte-sequence" id="ref-for-byte-sequence">byte sequence</a> if type is <em>binary</em>, or a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①">list</a> of other <a data-link-type="dfn" href="#key" id="ref-for-key④">keys</a> if type is <em>array</em>.</p> </div> <p>An ECMAScript <a data-link-type="biblio" href="#biblio-ecma-262" title="ECMAScript Language Specification">[ECMA-262]</a> value can be converted to a <a data-link-type="dfn" href="#key" id="ref-for-key⑤">key</a> by following the steps to <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key">convert a value to a key</a>.</p> <div class="note" role="note"> <span class="marker">NOTE:</span> The following ECMAScript types are valid keys: <ul> <li data-md> <p><code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number-objects" id="ref-for-sec-number-objects">Number</a></code> primitive values, except NaN. This includes Infinity and -Infinity.</p> <li data-md> <p><code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-objects" id="ref-for-sec-date-objects①">Date</a></code> objects, except where the [[DateValue]] internal slot is NaN.</p> <li data-md> <p><code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/text-processing.html#sec-string-objects" id="ref-for-sec-string-objects②">String</a></code> primitive values.</p> <li data-md> <p><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-ArrayBuffer" id="ref-for-idl-ArrayBuffer">ArrayBuffer</a></code> objects (or views on buffers such as <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-Uint8Array" id="ref-for-idl-Uint8Array">Uint8Array</a></code>).</p> <li data-md> <p><code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects②">Array</a></code> objects, where every item is defined, is itself a valid key, and does not directly or indirectly contain itself. This includes empty arrays. Arrays can contain other arrays.</p> </ul> <p>Attempting to convert other ECMAScript values to a <a data-link-type="dfn" href="#key" id="ref-for-key⑥">key</a> will fail.</p> </div> <p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="array-key">array key</dfn> is a <a data-link-type="dfn" href="#key" id="ref-for-key⑦">key</a> with <a data-link-type="dfn" href="#key-type" id="ref-for-key-type">type</a> <em>array</em>. The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="subkeys">subkeys</dfn> of an <a data-link-type="dfn" href="#array-key" id="ref-for-array-key">array key</a> are the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-item" id="ref-for-list-item">items</a> of the <a data-link-type="dfn" href="#array-key" id="ref-for-array-key①">array key</a>'s <a data-link-type="dfn" href="#key-value" id="ref-for-key-value">value</a>.</p> <div class="algorithm" data-algorithm="compare two keys"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="compare-two-keys">compare two keys</dfn> <var>a</var> and <var>b</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>ta</var> be the <a data-link-type="dfn" href="#key-type" id="ref-for-key-type①">type</a> of <var>a</var>.</p> <li data-md> <p>Let <var>tb</var> be the <a data-link-type="dfn" href="#key-type" id="ref-for-key-type②">type</a> of <var>b</var>.</p> <li data-md> <p>If <var>ta</var> does not equal <var>tb</var>, then run these steps:</p> <ol> <li data-md> <p>If <var>ta</var> is <em>array</em>, then return 1.</p> <li data-md> <p>If <var>tb</var> is <em>array</em>, then return -1.</p> <li data-md> <p>If <var>ta</var> is <em>binary</em>, then return 1.</p> <li data-md> <p>If <var>tb</var> is <em>binary</em>, then return -1.</p> <li data-md> <p>If <var>ta</var> is <em>string</em>, then return 1.</p> <li data-md> <p>If <var>tb</var> is <em>string</em>, then return -1.</p> <li data-md> <p>If <var>ta</var> is <em>date</em>, then return 1.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert">Assert</a>: <var>tb</var> is <em>date</em>.</p> <li data-md> <p>Return -1.</p> </ol> <li data-md> <p>Let <var>va</var> be the <a data-link-type="dfn" href="#key-value" id="ref-for-key-value①">value</a> of <var>a</var>.</p> <li data-md> <p>Let <var>vb</var> be the <a data-link-type="dfn" href="#key-value" id="ref-for-key-value②">value</a> of <var>b</var>.</p> <li data-md> <p>Switch on <var>ta</var>:</p> <dl class="switch"> <dt data-md><em>number</em> <dt data-md><em>date</em> <dd data-md> <ol> <li data-md> <p>If <var>va</var> is greater than <var>vb</var>, then return 1.</p> <li data-md> <p>If <var>va</var> is less than <var>vb</var>, then return -1.</p> <li data-md> <p>Return 0.</p> </ol> <dt data-md><em>string</em> <dd data-md> <ol> <li data-md> <p>If <var>va</var> is <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#code-unit-less-than" id="ref-for-code-unit-less-than①">code unit less than</a> <var>vb</var>, then return -1.</p> <li data-md> <p>If <var>vb</var> is <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#code-unit-less-than" id="ref-for-code-unit-less-than②">code unit less than</a> <var>va</var>, then return 1.</p> <li data-md> <p>Return 0.</p> </ol> <dt data-md><em>binary</em> <dd data-md> <ol> <li data-md> <p>If <var>va</var> is <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#byte-less-than" id="ref-for-byte-less-than">byte less than</a> <var>vb</var>, then return -1.</p> <li data-md> <p>If <var>vb</var> is <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#byte-less-than" id="ref-for-byte-less-than①">byte less than</a> <var>va</var>, then return 1.</p> <li data-md> <p>Return 0.</p> </ol> <dt data-md><em>array</em> <dd data-md> <ol> <li data-md> <p>Let <var>length</var> be the lesser of <var>va</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size">size</a> and <var>vb</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size①">size</a>.</p> <li data-md> <p>Let <var>i</var> be 0.</p> <li data-md> <p>While <var>i</var> is less than <var>length</var>, then:</p> <ol> <li data-md> <p>Let <var>c</var> be the result of recursively <a data-link-type="dfn" href="#compare-two-keys" id="ref-for-compare-two-keys">comparing two keys</a> with <var>va</var>[<var>i</var>] and <var>vb</var>[<var>i</var>].</p> <li data-md> <p>If <var>c</var> is not 0, return <var>c</var>.</p> <li data-md> <p>Increase <var>i</var> by 1.</p> </ol> <li data-md> <p>If <var>va</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size②">size</a> is greater than <var>vb</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size③">size</a>, then return 1.</p> <li data-md> <p>If <var>va</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size④">size</a> is less than <var>vb</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size⑤">size</a>, then return -1.</p> <li data-md> <p>Return 0.</p> </ol> </dl> </ol> </div> <p>The <a data-link-type="dfn" href="#key" id="ref-for-key⑧">key</a> <var>a</var> is <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="greater than|ascending" data-noexport id="greater-than">greater than</dfn> the <a data-link-type="dfn" href="#key" id="ref-for-key⑨">key</a> <var>b</var> if the result of <a data-link-type="dfn" href="#compare-two-keys" id="ref-for-compare-two-keys①">comparing two keys</a> with <var>a</var> and <var>b</var> is 1.</p> <p>The <a data-link-type="dfn" href="#key" id="ref-for-key①⓪">key</a> <var>a</var> is <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="less-than">less than</dfn> the <a data-link-type="dfn" href="#key" id="ref-for-key①①">key</a> <var>b</var> if the result of <a data-link-type="dfn" href="#compare-two-keys" id="ref-for-compare-two-keys②">comparing two keys</a> with <var>a</var> and <var>b</var> is -1.</p> <p>The <a data-link-type="dfn" href="#key" id="ref-for-key①②">key</a> <var>a</var> is <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="equal-to">equal to</dfn> the <a data-link-type="dfn" href="#key" id="ref-for-key①③">key</a> <var>b</var> if the result of <a data-link-type="dfn" href="#compare-two-keys" id="ref-for-compare-two-keys③">comparing two keys</a> with <var>a</var> and <var>b</var> is 0.</p> <p class="note" role="note"><span class="marker">NOTE:</span> As a result of the above rules, negative infinity is the lowest possible value for a <a data-link-type="dfn" href="#key" id="ref-for-key①④">key</a>. <em>Number</em> keys are less than <em>date</em> keys. <em>Date</em> keys are less than <em>string</em> keys. <em>String</em> keys are less than <em>binary</em> keys. <em>Binary</em> keys are less than <em>array</em> keys. There is no highest possible <a data-link-type="dfn" href="#key" id="ref-for-key①⑤">key</a> value. This is because an array of any candidate highest <a data-link-type="dfn" href="#key" id="ref-for-key①⑥">key</a> followed by another <a data-link-type="dfn" href="#key" id="ref-for-key①⑦">key</a> is even higher.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Members of <em>binary</em> keys are compared as unsigned <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#byte" id="ref-for-byte">byte</a> values (in the range 0 to 255 inclusive) rather than signed <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-byte" id="ref-for-idl-byte">byte</a></code> values (in the range -128 to 127 inclusive).</p> <h3 class="heading settled" data-level="2.5" id="key-path-construct"><span class="secno">2.5. </span><span class="content">Key path</span><a class="self-link" href="#key-path-construct"></a></h3> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="key-path">key path</dfn> is a string or list of strings that defines how to extract a <a data-link-type="dfn" href="#key" id="ref-for-key①⑧">key</a> from a <a data-link-type="dfn" href="#value" id="ref-for-value④">value</a>. A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="valid-key-path">valid key path</dfn> is one of:</p> <ul> <li data-md> <p>An empty string.</p> <li data-md> <p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="identifier">identifier</dfn>, which is a string matching the <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#prod-IdentifierName" id="ref-for-prod-IdentifierName">IdentifierName</a> production from the ECMAScript Language Specification <a data-link-type="biblio" href="#biblio-ecma-262" title="ECMAScript Language Specification">[ECMA-262]</a>.</p> <li data-md> <p>A string consisting of two or more <a data-link-type="dfn" href="#identifier" id="ref-for-identifier">identifiers</a> separated by periods (U+002E FULL STOP).</p> <li data-md> <p>A non-empty list containing only strings conforming to the above requirements.</p> </ul> <p class="note" role="note"><span class="marker">NOTE:</span> Spaces are not allowed within a key path.</p> <p><a data-link-type="dfn" href="#key-path" id="ref-for-key-path">Key path</a> values can only be accessed from properties explicitly copied by <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage" id="ref-for-structuredserializeforstorage①">StructuredSerializeForStorage</a>, as well as the following type-specific properties:</p> <table class="props"> <tbody> <tr> <th>Type <th>Properties <tr> <td><code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-Blob" id="ref-for-dfn-Blob①">Blob</a></code> <td><code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-size" id="ref-for-dfn-size">size</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-type" id="ref-for-dfn-type">type</a></code> <tr> <td><code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-file" id="ref-for-dfn-file①">File</a></code> <td><code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-name" id="ref-for-dfn-name">name</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-lastModified" id="ref-for-dfn-lastModified">lastModified</a></code> <tr> <td><code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects③">Array</a></code> <td><code>length</code> <tr> <td><code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/text-processing.html#sec-string-objects" id="ref-for-sec-string-objects③">String</a></code> <td><code>length</code> </table> <h3 class="heading settled" data-level="2.6" id="index-construct"><span class="secno">2.6. </span><span class="content">Index</span><a class="self-link" href="#index-construct"></a></h3> <p>It is sometimes useful to retrieve <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③">records</a> in an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①②">object store</a> through other means than their <a data-link-type="dfn" href="#key" id="ref-for-key①⑨">key</a>. An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="index-concept">index</dfn> allows looking up <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④">records</a> in an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①③">object store</a> using properties of the <a data-link-type="dfn" href="#value" id="ref-for-value⑤">values</a> in the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①④">object stores</a> <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤">records</a>.</p> <div> <p>An index is a specialized persistent key-value storage and has a <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-lt="referenced|references" data-noexport id="index-referenced">referenced</dfn> <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⑤">object store</a>. The index has a <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-noexport id="index-list-of-records">list of records</dfn> which hold the data stored in the index. The <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-noexport id="index-records">records</dfn> in an index are automatically populated whenever records in the <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced">referenced</a> object store are inserted, updated or deleted. There can be several <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①">indexes</a> referencing the same <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⑥">object store</a>, in which changes to the object store cause all such indexes to get updated.</p> <p>The <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-noexport id="index-values">values</dfn> in the index’s <a data-link-type="dfn" href="#index-records" id="ref-for-index-records">records</a> are always values of <a data-link-type="dfn" href="#key" id="ref-for-key②⓪">keys</a> in the index’s <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced①">referenced</a> object store. The <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-noexport id="index-keys">keys</dfn> are derived from the referenced object store’s <a data-link-type="dfn" href="#value" id="ref-for-value⑥">values</a> using a <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-noexport id="index-key-path">key path</dfn>. If a given <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥">record</a> with key <var>X</var> in the object store referenced by the index has the value <var>A</var>, and <a data-link-type="dfn" href="#extract-a-key-from-a-value-using-a-key-path" id="ref-for-extract-a-key-from-a-value-using-a-key-path">evaluating</a> the index’s <a data-link-type="dfn" href="#index-key-path" id="ref-for-index-key-path">key path</a> on <var>A</var> yields the result <var>Y</var>, then the index will contain a record with key <var>Y</var> and value <var>X</var>.</p> <div class="example" id="example-index-entries"><a class="self-link" href="#example-index-entries"></a> For example, if an index’s <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced②">referenced</a> object store contains a record with the key <code>123</code> and the value <code>{ name: "Alice", title: "CEO" }</code>, and the index’s <a data-link-type="dfn" href="#index-key-path" id="ref-for-index-key-path①">key path</a> is "<code>name</code>" then the index would contain a record with the key "<code>Alice</code>" and the value <code>123</code>. </div> <p>Records in an index are said to have a <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-noexport id="index-referenced-value">referenced value</dfn>. This is the value of the record in the index’s referenced object store which has a key equal to the index’s record’s value. So in the example above, the record in the index whose <a data-link-type="dfn" href="#index-keys" id="ref-for-index-keys">key</a> is <var>Y</var> and value is <var>X</var> has a <a data-link-type="dfn" href="#index-referenced-value" id="ref-for-index-referenced-value">referenced value</a> of <var>A</var>.</p> <div class="example" id="example-index-referenced-values"><a class="self-link" href="#example-index-referenced-values"></a> In the preceding example, the record in the index with key "<code>Alice</code>" and value <code>123</code> would have a <a data-link-type="dfn" href="#index-referenced-value" id="ref-for-index-referenced-value①">referenced value</a> of <code>{ name: "Alice", title: "CEO" }</code>. </div> <p class="note" role="note"><span class="marker">NOTE:</span> Each record in an index references one and only one record in the index’s <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced③">referenced</a> object store. However there can be multiple records in an index which reference the same record in the object store. And there can also be no records in an index which reference a given record in an object store.</p> <p>The <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦">records</a> in an index are always sorted according to the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧">record</a>'s key. However unlike object stores, a given index can contain multiple records with the same key. Such records are additionally sorted according to the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②">index</a>'s <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑨">record</a>'s value (meaning the key of the record in the referenced <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⑦">object store</a>).</p> <p>An <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③">index</a> has a <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-noexport id="index-name">name</dfn>, which is a <a data-link-type="dfn" href="#name" id="ref-for-name④">name</a>. At any one time, the name is unique within index’s <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced④">referenced</a> <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⑧">object store</a>.</p> <p>An <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④">index</a> has a <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-noexport id="index-unique-flag">unique flag</dfn>. When true, the index enforces that no two <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①⓪">records</a> in the index has the same key. If a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①①">record</a> in the index’s referenced object store is attempted to be inserted or modified such that evaluating the index’s key path on the records new value yields a result which already exists in the index, then the attempted modification to the object store fails.</p> <p>An <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑤">index</a> has a <dfn class="dfn-paneled" data-dfn-for="index" data-dfn-type="dfn" data-noexport id="index-multientry-flag">multiEntry flag</dfn>. This flag affects how the index behaves when the result of evaluating the index’s <a data-link-type="dfn" href="#index-key-path" id="ref-for-index-key-path②">key path</a> yields an <a data-link-type="dfn" href="#array-key" id="ref-for-array-key②">array key</a>. If its <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag">multiEntry flag</a> is false, then a single <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①②">record</a> whose <a data-link-type="dfn" href="#key" id="ref-for-key②①">key</a> is an <a data-link-type="dfn" href="#array-key" id="ref-for-array-key③">array key</a> is added to the index. If its <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag①">multiEntry flag</a> is true, then one <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①③">record</a> is added to the index for each of the <a data-link-type="dfn" href="#subkeys" id="ref-for-subkeys">subkeys</a>.</p> </div> <h4 class="heading settled" data-level="2.6.1" id="index-handle-construct"><span class="secno">2.6.1. </span><span class="content">Index handle</span><a class="self-link" href="#index-handle-construct"></a></h4> <p>Script does not interact with <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑥">indexes</a> directly. Instead, within a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④">transaction</a>, script has indirect access via an <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="index handle" data-noexport id="index-handle">index handle</dfn>.</p> <div> <p>An <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle">index handle</a> has an associated <dfn class="dfn-paneled" data-dfn-for="index-handle" data-dfn-type="dfn" data-noexport id="index-handle-index">index</dfn> and an associated <dfn class="dfn-paneled" data-dfn-for="index-handle" data-dfn-type="dfn" data-noexport id="index-handle-object-store-handle">object store handle</dfn>. The <dfn class="dfn-paneled" data-dfn-for="index-handle" data-dfn-type="dfn" data-noexport id="index-handle-transaction">transaction</dfn> of an <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle①">index handle</a> is the <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction">transaction</a> of its associated <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle⑥">object store handle</a>. Multiple handles may be associated with the same <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑦">index</a> in different <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤">transactions</a>, but there must be only one <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle②">index handle</a> associated with a particular <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑧">index</a> within a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥">transaction</a>.</p> <p>An <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle③">index handle</a> has a <dfn class="dfn-paneled" data-dfn-for="index-handle" data-dfn-type="dfn" data-noexport id="index-handle-name">name</dfn>, which is initialized to the <a data-link-type="dfn" href="#index-name" id="ref-for-index-name">name</a> of the associated <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index">index</a> when the <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle④">index handle</a> is created. The name will remain constant except when an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑥">upgrade transaction</a> is <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live③">live</a>.</p> </div> <h3 class="heading settled" data-level="2.7" id="transaction-construct"><span class="secno">2.7. </span><span class="content">Transactions</span><a class="self-link" href="#transaction-construct"></a></h3> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="transaction-concept">transaction</dfn> is used to interact with the data in a <a data-link-type="dfn" href="#database" id="ref-for-database①⑦">database</a>. Whenever data is read or written to the database it is done by using a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦">transaction</a>.</p> <div> <p><a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑧">Transactions</a> offer some protection from application and system failures. A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑨">transaction</a> may be used to store multiple data records or to conditionally modify certain data records. A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①⓪">transaction</a> represents an atomic and durable set of data access and data mutation operations.</p> <p>All transactions are created through a <a data-link-type="dfn" href="#connection" id="ref-for-connection②①">connection</a>, which is the transaction’s <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-connection">connection</dfn>.</p> <p>A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①①">transaction</a> has a <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-scope">scope</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 <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⑨">object stores</a> that the transaction may interact with.</p> <p class="note" role="note"><span class="marker">NOTE:</span> A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①②">transaction</a>'s <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope">scope</a> remains fixed unless the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①③">transaction</a> is an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑦">upgrade transaction</a>.</p> <p>Two <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①④">transactions</a> have <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-lt="overlap|overlapping scope" data-noexport id="transaction-overlap">overlapping scope</dfn> if any <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②⓪">object store</a> is in both transactions' <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope①">scope</a>.</p> <p>A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①⑤">transaction</a> has a <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-mode">mode</dfn> that determines which types of interactions can be performed upon that transaction. The <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode">mode</a> is set when the transaction is created and remains fixed for the life of the transaction. A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①⑥">transaction</a>'s <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode①">mode</a> is one of the following:</p> <dl> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readonly" id="ref-for-dom-idbtransactionmode-readonly">readonly</a></code>" <dd data-md> <p>The transaction is only allowed to read data. No modifications can be done by this type of transaction. This has the advantage that several <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction">read-only transactions</a> can be <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start">started</a> at the same time even if their <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope②">scopes</a> are <a data-link-type="dfn" href="#transaction-overlap" id="ref-for-transaction-overlap">overlapping</a>, i.e. if they are using the same object stores. This type of transaction can be created any time once a database has been opened.</p> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readwrite" id="ref-for-dom-idbtransactionmode-readwrite">readwrite</a></code>" <dd data-md> <p>The transaction is allowed to read, modify and delete data from existing object stores. However object stores and indexes can’t be added or removed. Multiple "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readwrite" id="ref-for-dom-idbtransactionmode-readwrite①">readwrite</a></code>" transactions can’t be <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start①">started</a> at the same time if their <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope③">scopes</a> are <a data-link-type="dfn" href="#transaction-overlap" id="ref-for-transaction-overlap①">overlapping</a> since that would mean that they can modify each other’s data in the middle of the transaction. This type of transaction can be created any time once a database has been opened.</p> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-versionchange" id="ref-for-dom-idbtransactionmode-versionchange">versionchange</a></code>" <dd data-md> <p>The transaction is allowed to read, modify and delete data from existing object stores, and can also create and remove object stores and indexes. It is the only type of transaction that can do so. This type of transaction can’t be manually created, but instead is created automatically when an <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded③">upgradeneeded</a></code> event is fired.</p> </dl> <p>A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①⑦">transaction</a> has a <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-durability-hint">durability hint</dfn>. This is a hint to the user agent of whether to prioritize performance or durability when committing the transaction. The <a data-link-type="dfn" href="#transaction-durability-hint" id="ref-for-transaction-durability-hint">durability hint</a> is one of the following:</p> <dl> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-strict" id="ref-for-dom-idbtransactiondurability-strict">strict</a></code>" <dd data-md> <p>The user agent may consider that the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①⑧">transaction</a> has successfully <a data-link-type="dfn" href="#transaction-commit" id="ref-for-transaction-commit">committed</a> only after verifying that all outstanding changes have been successfully written to a persistent storage medium.</p> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-relaxed" id="ref-for-dom-idbtransactiondurability-relaxed">relaxed</a></code>" <dd data-md> <p>The user agent may consider that the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept①⑨">transaction</a> has successfully <a data-link-type="dfn" href="#transaction-commit" id="ref-for-transaction-commit①">committed</a> as soon as all outstanding changes have been written to the operating system, without subsequent verification.</p> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-default" id="ref-for-dom-idbtransactiondurability-default">default</a></code>" <dd data-md> <p>The user agent should use its default durability behavior for the <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-bucket" id="ref-for-storage-bucket">storage bucket</a>. This is the default for <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②⓪">transactions</a> if not otherwise specified.</p> </dl> <div class="note" role="note"> <span class="marker">NOTE:</span> In a typical implementation, "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-strict" id="ref-for-dom-idbtransactiondurability-strict①">strict</a></code>" is a hint to the user agent to flush any operating system I/O buffers before a <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbtransaction-complete" id="ref-for-eventdef-idbtransaction-complete">complete</a></code> event is fired. While this provides greater confidence that the changes will be persisted in case of subsequent operating system crash or power loss, flushing buffers can take significant time and consume battery life on portable devices. <p>Web applications are encouraged to use "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-relaxed" id="ref-for-dom-idbtransactiondurability-relaxed①">relaxed</a></code>" for ephemeral data such as caches or quickly changing records, and "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-strict" id="ref-for-dom-idbtransactiondurability-strict②">strict</a></code>" in cases where reducing the risk of data loss outweighs the impact to performance and power. Implementations are encouraged to weigh the durability hint from applications against the impact to users and devices.</p> </div> <p>A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②①">transaction</a> optionally has a <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-cleanup-event-loop">cleanup event loop</dfn> which is an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop" id="ref-for-event-loop">event loop</a>.</p> <p>A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②②">transaction</a> has a <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-request-list">request list</dfn> of pending <a data-link-type="dfn" href="#request" id="ref-for-request">requests</a> which have been made against the transaction.</p> <p>A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②③">transaction</a> has a <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-error">error</dfn> which is set if the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②④">transaction</a> is <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort">aborted</a>.</p> <p>A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②⑤">transaction</a>'s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#get-the-parent" id="ref-for-get-the-parent①">get the parent</a> algorithm returns the transaction’s <a data-link-type="dfn" href="#transaction-connection" id="ref-for-transaction-connection">connection</a>.</p> <p>A <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-read-only-transaction">read-only transaction</dfn> is a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②⑥">transaction</a> with <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode②">mode</a> "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readonly" id="ref-for-dom-idbtransactionmode-readonly①">readonly</a></code>".</p> <p>A <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-read-write-transaction">read/write transaction</dfn> is a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②⑦">transaction</a> with <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode③">mode</a> "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readwrite" id="ref-for-dom-idbtransactionmode-readwrite②">readwrite</a></code>".</p> <h4 class="heading settled" data-level="2.7.1" id="transaction-lifecycle"><span class="secno">2.7.1. </span><span class="content">Transaction lifecycle</span><a class="self-link" href="#transaction-lifecycle"></a></h4> <p>A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②⑧">transaction</a> has a <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-state">state</dfn>, which is one of the following:</p> <dl> <dt data-md><dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-active">active</dfn> <dd data-md> <p>A transaction is in this state when it is first <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created">created</a>, and during dispatch of an event from a <a data-link-type="dfn" href="#request" id="ref-for-request①">request</a> associated with the transaction.</p> <p>New <a data-link-type="dfn" href="#request" id="ref-for-request②">requests</a> can be made against the transaction when it is in this state.</p> <dt data-md><dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-inactive">inactive</dfn> <dd data-md> <p>A transaction is in this state after control returns to the event loop after its creation, and when events are not being dispatched.</p> <p>No <a data-link-type="dfn" href="#request" id="ref-for-request③">requests</a> can be made against the transaction when it is in this state.</p> <dt data-md><dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-committing">committing</dfn> <dd data-md> <p>Once all <a data-link-type="dfn" href="#request" id="ref-for-request④">requests</a> associated with a transaction have completed, the transaction will enter this state as it attempts to <a data-link-type="dfn" href="#transaction-commit" id="ref-for-transaction-commit②">commit</a>.</p> <p>No <a data-link-type="dfn" href="#request" id="ref-for-request⑤">requests</a> can be made against the transaction when it is in this state.</p> <dt data-md><dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-finished">finished</dfn> <dd data-md> <p>Once a transaction has committed or aborted, it enters this state.</p> <p>No <a data-link-type="dfn" href="#request" id="ref-for-request⑥">requests</a> can be made against the transaction when it is in this state.</p> </dl> <p>Transactions are expected to be short lived. This is encouraged by the <a data-link-type="dfn" href="#transaction-commit" id="ref-for-transaction-commit③">automatic committing</a> functionality described below.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Authors can still cause transactions to stay <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live④">alive</a> for a long time; however, this usage pattern is not advised as it can lead to a poor user experience.</p> <p>The <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-lifetime">lifetime</dfn> of a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept②⑨">transaction</a> is as follows:</p> <ol> <li data-md> <p>A transaction is <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-created">created</dfn> with a <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope④">scope</a> and a <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode④">mode</a>. When a transaction is created its <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state">state</a> is initially <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active">active</a>.</p> <li data-md> <p>When an implementation is able to enforce the constraints for the transaction’s <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope⑤">scope</a> and <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode⑤">mode</a>, defined <a href="#transaction-scheduling">below</a>, the implementation must <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 <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-lt="start|started" data-noexport id="transaction-start">start</dfn> the transaction asynchronously.</p> <p>Once the transaction has been <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start②">started</a> the implementation can begin executing the <a data-link-type="dfn" href="#request" id="ref-for-request⑦">requests</a> placed against the transaction. Requests must be executed in the order in which they were made against the transaction. Likewise, their results must be returned in the order the requests were placed against a specific transaction. There is no guarantee about the order that results from requests in different transactions are returned.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Transaction <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode⑥">modes</a> ensure that two requests placed against different transactions can execute in any order without affecting what resulting data is stored in the database.</p> <li data-md> <p>When each <a data-link-type="dfn" href="#request" id="ref-for-request⑧">request</a> associated with a transaction is <a data-link-type="dfn" href="#request-processed" id="ref-for-request-processed">processed</a>, a <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success①">success</a></code> or <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error">error</a></code> <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event" id="ref-for-concept-event">event</a> will be fired. While the event is being <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-dispatch" id="ref-for-concept-event-dispatch">dispatched</a>, the transaction <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①">state</a> is set to <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①">active</a>, allowing additional requests to be made against the transaction. Once the event dispatch is complete, the transaction’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②">state</a> is set to <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive">inactive</a> again.</p> <li data-md> <p>A transaction can be <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-lt="abort|aborting|aborted" data-noexport id="transaction-abort">aborted</dfn> at any time before it is <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished">finished</a>, even if the transaction isn’t currently <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②">active</a> or hasn’t yet <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start③">started</a>.</p> <p>An explicit call to <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-abort" id="ref-for-dom-idbtransaction-abort">abort()</a></code> will initiate an <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort①">abort</a>. An abort will also be initiated following a failed request that is not handled by script.</p> <p>When a transaction is aborted the implementation must undo (roll back) any changes that were made to the <a data-link-type="dfn" href="#database" id="ref-for-database①⑧">database</a> during that transaction. This includes both changes to the contents of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②①">object stores</a> as well as additions and removals of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②②">object stores</a> and <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑨">indexes</a>.</p> <li data-md> <p>The implementation must attempt to <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-lt="commit|committed" data-noexport id="transaction-commit">commit</dfn> a transaction when all <a data-link-type="dfn" href="#request" id="ref-for-request⑨">requests</a> placed against the transaction have completed and their returned results handled, no new requests have been placed against the transaction, and the transaction has not been <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort②">aborted</a></p> <p>An explicit call to <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-commit" id="ref-for-dom-idbtransaction-commit">commit()</a></code> will initiate a <a data-link-type="dfn" href="#transaction-commit" id="ref-for-transaction-commit④">commit</a> without waiting for request results to be handled by script.</p> <p>When committing, the transaction <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③">state</a> is set to <a data-link-type="dfn" href="#transaction-committing" id="ref-for-transaction-committing">committing</a>. The implementation must atomically write any changes to the <a data-link-type="dfn" href="#database" id="ref-for-database①⑨">database</a> made by requests placed against the transaction. That is, either all of the changes must be written, or if an error occurs, such as a disk write error, the implementation must not write any of the changes to the database, and the steps to <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction">abort a transaction</a> will be followed.</p> <li data-md> <p>When a transaction is <a data-link-type="dfn" href="#transaction-commit" id="ref-for-transaction-commit⑤">committed</a> or <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort③">aborted</a>, its <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④">state</a> is set to <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①">finished</a>.</p> </ol> <p>The implementation must allow <a data-link-type="dfn" href="#request" id="ref-for-request①⓪">requests</a> to be <a data-link-type="dfn" href="#request-placed" id="ref-for-request-placed">placed</a> against the transaction whenever it is <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③">active</a>. This is the case even if the transaction has not yet been <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start④">started</a>. Until the transaction is <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start⑤">started</a> the implementation must not execute these requests; however, the implementation must keep track of the <a data-link-type="dfn" href="#request" id="ref-for-request①①">requests</a> and their order.</p> <p>A <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③⓪">transaction</a> is said to be <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-noexport id="transaction-live">live</dfn> from when it is <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created①">created</a> until its <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤">state</a> is set to <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished②">finished</a>.</p> <div class="algorithm" data-algorithm="cleanup Indexed Database transactions"> <p>To <dfn class="dfn-paneled" data-dfn-for="transaction" data-dfn-type="dfn" data-export id="cleanup-indexed-database-transactions">cleanup Indexed Database transactions</dfn>, run the following steps. They will return true if any transactions were cleaned up, or false otherwise.</p> <ol> <li data-md> <p>If there are no <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③①">transactions</a> with <a data-link-type="dfn" href="#transaction-cleanup-event-loop" id="ref-for-transaction-cleanup-event-loop">cleanup event loop</a> matching the current <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop" id="ref-for-event-loop①">event loop</a>, return false.</p> <li data-md> <p>For each <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③②">transaction</a> <var>transaction</var> with <a data-link-type="dfn" href="#transaction-cleanup-event-loop" id="ref-for-transaction-cleanup-event-loop①">cleanup event loop</a> matching the current <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop" id="ref-for-event-loop②">event loop</a>:</p> <ol> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑥">state</a> to <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive①">inactive</a>.</p> <li data-md> <p>Clear <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-cleanup-event-loop" id="ref-for-transaction-cleanup-event-loop②">cleanup event loop</a>.</p> </ol> <li data-md> <p>Return true.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> These steps are invoked by <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a>. They ensure that <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③③">transactions</a> created by a script call to <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-transaction" id="ref-for-dom-idbdatabase-transaction">transaction()</a></code> are deactivated once the task that invoked the script has completed. The steps are run at most once for each <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③④">transaction</a>.</p> <p>An event with type <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="event" data-export id="eventdef-idbtransaction-complete"><code>complete</code></dfn> is fired at a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③⑤">transaction</a> that has successfully <a data-link-type="dfn" href="#transaction-commit" id="ref-for-transaction-commit⑥">committed</a>.</p> <p>An event with type <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="event" data-export id="eventdef-idbtransaction-abort"><code>abort</code></dfn> is fired at a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③⑥">transaction</a> that has <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort④">aborted</a>.</p> <h4 class="heading settled" data-level="2.7.2" id="transaction-scheduling"><span class="secno">2.7.2. </span><span class="content">Transaction scheduling</span><a class="self-link" href="#transaction-scheduling"></a></h4> <p>The following constraints define when a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③⑦">transaction</a> can be <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start⑥">started</a>:</p> <ul> <li data-md> <p>A <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction①">read-only transactions</a> <var>tx</var> can <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start⑦">start</a> when there are no <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction">read/write transactions</a> which:</p> <ul> <li data-md> <p>Were <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created②">created</a> before <var>tx</var>; and</p> <li data-md> <p>have <a data-link-type="dfn" href="#transaction-overlap" id="ref-for-transaction-overlap②">overlapping scopes</a> with <var>tx</var>; and</p> <li data-md> <p>are not <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished③">finished</a>.</p> </ul> <li data-md> <p>A <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction①">read/write transaction</a> <var>tx</var> can <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start⑧">start</a> when there are no <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③⑧">transactions</a> which:</p> <ul> <li data-md> <p>Were <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created③">created</a> before <var>tx</var>; and</p> <li data-md> <p>have <a data-link-type="dfn" href="#transaction-overlap" id="ref-for-transaction-overlap③">overlapping scopes</a> with <var>tx</var>; and</p> <li data-md> <p>are not <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished④">finished</a>.</p> </ul> </ul> <p>Implementations may impose additional constraints. For example, implementations are not required to <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start⑨">start</a> non-<a data-link-type="dfn" href="#transaction-overlap" id="ref-for-transaction-overlap④">overlapping</a> <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction②">read/write transactions</a> in parallel, or may impose limits on the number of <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start①⓪">started</a> transactions.</p> <div class="note" role="note"> <span class="marker">NOTE:</span> These constraints imply the following: <ul> <li data-md> <p>Any number of <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction②">read-only transactions</a> are allowed to be <a data-link-type="dfn" href="#transaction-start" id="ref-for-transaction-start①①">started</a> concurrently, even if they have <a data-link-type="dfn" href="#transaction-overlap" id="ref-for-transaction-overlap⑤">overlapping scopes</a>.</p> <li data-md> <p>As long as a <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction③">read-only transaction</a> is <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live⑤">live</a>, the data that the implementation returns through <a data-link-type="dfn" href="#request" id="ref-for-request①②">requests</a> created with that transaction remains constant. That is, two requests to read the same piece of data yield the same result both for the case when data is found and the result is that data, and for the case when data is not found and a lack of data is indicated.</p> <li data-md> <p>A <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction③">read/write transaction</a> is only affected by changes to <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②③">object stores</a> that are made using the transaction itself. The implementation ensures that another transaction does not modify the contents of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②④">object stores</a> in the <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction④">read/write transaction</a>’s <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope⑥">scope</a>. The implementation also ensures that if the <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction⑤">read/write transaction</a> completes successfully, the changes written to <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②⑤">object stores</a> using the transaction can be committed to the <a data-link-type="dfn" href="#database" id="ref-for-database②⓪">database</a> without merge conflicts.</p> <li data-md> <p>If multiple <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction⑥">read/write transactions</a> are attempting to access the same object store (i.e. if they have <a data-link-type="dfn" href="#transaction-overlap" id="ref-for-transaction-overlap⑥">overlapping scopes</a>), the transaction that was <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created④">created</a> first is the transaction which gets access to the object store first, and it is the only transaction which has access to the object store until the transaction is <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished⑤">finished</a>.</p> <li data-md> <p>Any transaction <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created⑤">created</a> after a <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction⑦">read/write transaction</a> sees the changes written by the <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction⑧">read/write transaction</a>. For example, if a <a data-link-type="dfn" href="#transaction-read-write-transaction" id="ref-for-transaction-read-write-transaction⑨">read/write transaction</a> A, is created, and later another transaction B, is created, and the two transactions have <a data-link-type="dfn" href="#transaction-overlap" id="ref-for-transaction-overlap⑦">overlapping scopes</a>, then transaction B sees any changes made to any <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②⑥">object stores</a> that are part of that <a data-link-type="dfn" href="#transaction-overlap" id="ref-for-transaction-overlap⑧">overlapping scope</a>. This also means that transaction B does not have access to any <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②⑦">object stores</a> in that overlapping <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope⑦">scope</a> until transaction A is <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished⑥">finished</a>.</p> </ul> </div> </div> <h4 class="heading settled" data-level="2.7.3" id="upgrade-transaction-construct"><span class="secno">2.7.3. </span><span class="content">Upgrade transactions</span><a class="self-link" href="#upgrade-transaction-construct"></a></h4> <p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="upgrade-transaction">upgrade transaction</dfn> is a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept③⑨">transaction</a> with <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode⑦">mode</a> "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-versionchange" id="ref-for-dom-idbtransactionmode-versionchange①">versionchange</a></code>".</p> <p>An <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑧">upgrade transaction</a> is automatically created when running the steps to <a data-link-type="dfn" href="#upgrade-a-database" id="ref-for-upgrade-a-database">upgrade a database</a> after a <a data-link-type="dfn" href="#connection" id="ref-for-connection②②">connection</a> is opened to a <a data-link-type="dfn" href="#database" id="ref-for-database②①">database</a>, if a <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①">version</a> greater than the current <a data-link-type="dfn" href="#database-version" id="ref-for-database-version②">version</a> is specified. This <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④⓪">transaction</a> will be active inside the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded④">upgradeneeded</a></code> event handler.</p> <div class="note" role="note"> <span class="marker">NOTE:</span> An <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑨">upgrade transaction</a> enables the creation, renaming, and deletion of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②⑧">object stores</a> and <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①⓪">indexes</a> in a <a data-link-type="dfn" href="#database" id="ref-for-database②②">database</a>. <p>An <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①⓪">upgrade transaction</a> is exclusive. The steps to <a data-link-type="dfn" href="#open-a-database-connection" id="ref-for-open-a-database-connection">open a database connection</a> ensure that only one <a data-link-type="dfn" href="#connection" id="ref-for-connection②③">connection</a> to the database is open when an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①①">upgrade transaction</a> is <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live⑥">live</a>. The <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded⑤">upgradeneeded</a></code> event isn’t fired, and thus the <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①②">upgrade transaction</a> isn’t started, until all other <a data-link-type="dfn" href="#connection" id="ref-for-connection②④">connections</a> to the same <a data-link-type="dfn" href="#database" id="ref-for-database②③">database</a> are closed. This ensures that all previous transactions are <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished⑦">finished</a>.</p> <p>As long as an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①③">upgrade transaction</a> is <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live⑦">live</a>, attempts to open more <a data-link-type="dfn" href="#connection" id="ref-for-connection②⑤">connections</a> to the same <a data-link-type="dfn" href="#database" id="ref-for-database②④">database</a> are delayed, and any attempts to use the same <a data-link-type="dfn" href="#connection" id="ref-for-connection②⑥">connection</a> to start additional transactions by calling <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-transaction" id="ref-for-dom-idbdatabase-transaction①">transaction()</a></code> will throw an exception. This ensures that no other transactions are <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live⑧">live</a> concurrently, and also ensures that no new transactions are queued against the same <a data-link-type="dfn" href="#database" id="ref-for-database②⑤">database</a> as long as the <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①④">upgrade transaction</a> is <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live⑨">live</a>.</p> <p>This further ensures that once an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①⑤">upgrade transaction</a> is complete, the set of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store②⑨">object stores</a> and <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①①">indexes</a> in a <a data-link-type="dfn" href="#database" id="ref-for-database②⑥">database</a> remain constant for the lifetime of all subsequent <a data-link-type="dfn" href="#connection" id="ref-for-connection②⑦">connections</a> and <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④①">transactions</a>.</p> </div> <h3 class="heading settled" data-level="2.8" id="request-construct"><span class="secno">2.8. </span><span class="content">Requests</span><a class="self-link" href="#request-construct"></a></h3> <p>Each asynchronous operation on a <a data-link-type="dfn" href="#database" id="ref-for-database②⑦">database</a> is done using a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="request">request</dfn>. Every request represents one operation.</p> <div> <p>A <a data-link-type="dfn" href="#request" id="ref-for-request①③">request</a> has a <dfn class="dfn-paneled" data-dfn-for="request" data-dfn-type="dfn" data-noexport id="request-processed-flag">processed flag</dfn> which is initially false. This flag is set to true when the operation associated with the request has been executed.</p> <p>A <a data-link-type="dfn" href="#request" id="ref-for-request①④">request</a> is said to be <dfn class="dfn-paneled" data-dfn-for="request" data-dfn-type="dfn" data-noexport id="request-processed">processed</dfn> when its <a data-link-type="dfn" href="#request-processed-flag" id="ref-for-request-processed-flag">processed flag</a> is true.</p> <p>A <a data-link-type="dfn" href="#request" id="ref-for-request①⑤">request</a> has a <dfn class="dfn-paneled" data-dfn-for="request" data-dfn-type="dfn" data-noexport id="request-done-flag">done flag</dfn> which is initially false. This flag is set to true when the result of the operation associated with the request is available.</p> <p>A <a data-link-type="dfn" href="#request" id="ref-for-request①⑥">request</a> has a <dfn class="dfn-paneled" data-dfn-for="request" data-dfn-type="dfn" data-noexport id="request-source">source</dfn> object.</p> <p>A <a data-link-type="dfn" href="#request" id="ref-for-request①⑦">request</a> has a <dfn class="dfn-paneled" data-dfn-for="request" data-dfn-type="dfn" data-noexport id="request-result">result</dfn> and an <dfn class="dfn-paneled" data-dfn-for="request" data-dfn-type="dfn" data-noexport id="request-error">error</dfn>, neither of which are accessible until its <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag">done flag</a> is true.</p> <p>A <a data-link-type="dfn" href="#request" id="ref-for-request①⑧">request</a> has a <dfn class="dfn-paneled" data-dfn-for="request" data-dfn-type="dfn" data-noexport id="request-transaction">transaction</dfn> which is initially null. This will be set when a request is <dfn class="dfn-paneled" data-dfn-for="request" data-dfn-type="dfn" data-noexport id="request-placed">placed</dfn> against a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④②">transaction</a> using the steps to <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request">asynchronously execute a request</a>.</p> <p>When a request is made, a new <a data-link-type="dfn" href="#request" id="ref-for-request①⑨">request</a> is returned with its <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①">done flag</a> set to false. If a request completes successfully, its <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag②">done flag</a> is set to true, its <a data-link-type="dfn" href="#request-result" id="ref-for-request-result">result</a> is set to the result of the request, and an event with type <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequest" data-dfn-type="event" data-export id="eventdef-idbrequest-success"><code>success</code></dfn> is fired at the <a data-link-type="dfn" href="#request" id="ref-for-request②⓪">request</a>.</p> <p>If an error occurs while performing the operation, the request’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag③">done flag</a> is set to true, the request’s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error">error</a> is set to the error, and an event with type <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequest" data-dfn-type="event" data-export id="eventdef-idbrequest-error"><code>error</code></dfn> is fired at the request.</p> <p>A <a data-link-type="dfn" href="#request" id="ref-for-request②①">request</a>'s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#get-the-parent" id="ref-for-get-the-parent②">get the parent</a> algorithm returns the request’s <a data-link-type="dfn" href="#request-transaction" id="ref-for-request-transaction">transaction</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Requests are not typically re-used, but there are exceptions. When a <a data-link-type="dfn" href="#cursor" id="ref-for-cursor">cursor</a> is iterated, the success of the iteration is reported on the same <a data-link-type="dfn" href="#request" id="ref-for-request②②">request</a> object used to open the cursor. And when an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①⑥">upgrade transaction</a> is necessary, the same <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request">open request</a> is used for both the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded⑥">upgradeneeded</a></code> event and final result of the open operation itself. In some cases, the request’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag④">done flag</a> will be set to false, then set to true again, and the <a data-link-type="dfn" href="#request-result" id="ref-for-request-result①">result</a> can change or <a data-link-type="dfn" href="#request-error" id="ref-for-request-error①">error</a> could be set instead.</p> <h4 class="heading settled" data-level="2.8.1" id="open-requests"><span class="secno">2.8.1. </span><span class="content">Open requests</span><a class="self-link" href="#open-requests"></a></h4> <p>An <dfn class="dfn-paneled" data-dfn-for="request" data-dfn-type="dfn" data-noexport id="request-open-request">open request</dfn> is a special type of <a data-link-type="dfn" href="#request" id="ref-for-request②③">request</a> used when opening a <a data-link-type="dfn" href="#connection" id="ref-for-connection②⑧">connection</a> or deleting a <a data-link-type="dfn" href="#database" id="ref-for-database②⑧">database</a>. In addition to <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success②">success</a></code> and <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error①">error</a></code> events, <dfn class="dfn-paneled idl-code" data-dfn-for="IDBOpenDBRequest" data-dfn-type="event" data-export id="eventdef-idbopendbrequest-blocked"><code>blocked</code></dfn> and <dfn class="dfn-paneled idl-code" data-dfn-for="IDBOpenDBRequest" data-dfn-type="event" data-export id="eventdef-idbopendbrequest-upgradeneeded"><code>upgradeneeded</code></dfn> events may be fired at an <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request①">open request</a> to indicate progress.</p> <p>The <a data-link-type="dfn" href="#request-source" id="ref-for-request-source">source</a> of an <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request②">open request</a> is always null.</p> <p>The <a data-link-type="dfn" href="#request-transaction" id="ref-for-request-transaction①">transaction</a> of an <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request③">open request</a> is null unless an <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded⑦">upgradeneeded</a></code> event has been fired.</p> <p>An <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request④">open request</a>'s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#get-the-parent" id="ref-for-get-the-parent③">get the parent</a> algorithm returns null.</p> </div> <h4 class="heading settled" data-level="2.8.2" id="connection-queues"><span class="secno">2.8.2. </span><span class="content">Connection queues</span><a class="self-link" href="#connection-queues"></a></h4> <p><a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request⑤">Open requests</a> are processed in a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="connection-queue">connection queue</dfn>. The queue contains all <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request⑥">open requests</a> associated with an <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-key" id="ref-for-storage-key④">storage key</a> and a <a data-link-type="dfn" href="#database-name" id="ref-for-database-name">name</a>. Requests added to the <a data-link-type="dfn" href="#connection-queue" id="ref-for-connection-queue">connection queue</a> processed in order and each request must run to completion before the next request is processed. An open request may be blocked on other <a data-link-type="dfn" href="#connection" id="ref-for-connection②⑨">connections</a>, requiring those connections to <a data-link-type="dfn" href="#connection-closed" id="ref-for-connection-closed">close</a> before the request can complete and allow further requests to be processed.</p> <p class="note" role="note"><span class="marker">NOTE:</span> A <a data-link-type="dfn" href="#connection-queue" id="ref-for-connection-queue①">connection queue</a> is not a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#task-queue" id="ref-for-task-queue">task queue</a> associated with an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop" id="ref-for-event-loop③">event loop</a>, as the requests are processed outside any specific <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#browsing-context" id="ref-for-browsing-context">browsing context</a>. The delivery of events to completed <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request⑦">open request</a> still goes through a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#task-queue" id="ref-for-task-queue①">task queue</a> associated with the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop" id="ref-for-event-loop④">event loop</a> of the context where the request was made.</p> <h3 class="heading settled" data-level="2.9" id="range-construct"><span class="secno">2.9. </span><span class="content">Key range</span><a class="self-link" href="#range-construct"></a></h3> <p>Records can be retrieved from <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③⓪">object stores</a> and <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①②">indexes</a> using either <a data-link-type="dfn" href="#key" id="ref-for-key②②">keys</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range">key ranges</a>. A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="key-range">key range</dfn> is a continuous interval over some data type used for keys.</p> <div> <p>A <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①">key range</a> has an associated <dfn class="dfn-paneled" data-dfn-for="key range" data-dfn-type="dfn" data-noexport id="key-range-lower-bound">lower bound</dfn> (null or a <a data-link-type="dfn" href="#key" id="ref-for-key②③">key</a>).</p> <p>A <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②">key range</a> has an associated <dfn class="dfn-paneled" data-dfn-for="key range" data-dfn-type="dfn" data-noexport id="key-range-upper-bound">upper bound</dfn> (null or a <a data-link-type="dfn" href="#key" id="ref-for-key②④">key</a>).</p> <p>A <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③">key range</a> has an associated <dfn class="dfn-paneled" data-dfn-for="key range" data-dfn-type="dfn" data-noexport id="key-range-lower-open-flag">lower open flag</dfn>. Unless otherwise stated it is false.</p> <p>A <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④">key range</a> has an associated <dfn class="dfn-paneled" data-dfn-for="key range" data-dfn-type="dfn" data-noexport id="key-range-upper-open-flag">upper open flag</dfn>. Unless otherwise stated it is false.</p> <p>A <a data-link-type="dfn" href="#key-range" id="ref-for-key-range⑤">key range</a> may have a <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound">lower bound</a> <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to">equal to</a> its <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound">upper bound</a>. A <a data-link-type="dfn" href="#key-range" id="ref-for-key-range⑥">key range</a> must not have a <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound①">lower bound</a> <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①">greater than</a> its <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound①">upper bound</a>.</p> </div> <p>A <a data-link-type="dfn" href="#key-range" id="ref-for-key-range⑦">key range</a> <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="containing-only">containing only</dfn> <var>key</var> has both <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound②">lower bound</a> and <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound②">upper bound</a> equal to <var>key</var>.</p> <p>A <var>key</var> is <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="in" data-noexport id="in">in a key range</dfn> <var>range</var> if both of the following conditions are fulfilled:</p> <ul> <li data-md> <p>The <var>range</var>’s <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound③">lower bound</a> is null, or it is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than">less than</a> <var>key</var>, or it is both <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①">equal to</a> <var>key</var> and the <var>range</var>’s <a data-link-type="dfn" href="#key-range-lower-open-flag" id="ref-for-key-range-lower-open-flag">lower open flag</a> is false.</p> <li data-md> <p>The <var>range</var>’s <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound③">upper bound</a> is null, or it is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than②">greater than</a> <var>key</var>, or it is both <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to②">equal to</a> <var>key</var> and the <var>range</var>’s <a data-link-type="dfn" href="#key-range-upper-open-flag" id="ref-for-key-range-upper-open-flag">upper open flag</a> is false.</p> </ul> <div class="note" role="note"> <span class="marker">NOTE:</span> <ul> <li data-md> <p>If a <a data-link-type="dfn" href="#key-range" id="ref-for-key-range⑧">key range</a>'s <a data-link-type="dfn" href="#key-range-lower-open-flag" id="ref-for-key-range-lower-open-flag①">lower open flag</a> is false, the <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound④">lower bound</a> <a data-link-type="dfn" href="#key" id="ref-for-key②⑤">key</a> of the <a data-link-type="dfn" href="#key-range" id="ref-for-key-range⑨">key range</a> is included in the range itself.</p> <li data-md> <p>If a <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①⓪">key range</a>'s <a data-link-type="dfn" href="#key-range-lower-open-flag" id="ref-for-key-range-lower-open-flag②">lower open flag</a> is true, the <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound⑤">lower bound</a> <a data-link-type="dfn" href="#key" id="ref-for-key②⑥">key</a> of the <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①①">key range</a> is excluded from the range itself.</p> <li data-md> <p>If a <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①②">key range</a>'s <a data-link-type="dfn" href="#key-range-upper-open-flag" id="ref-for-key-range-upper-open-flag①">upper open flag</a> is false, the <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound④">upper bound</a> <a data-link-type="dfn" href="#key" id="ref-for-key②⑦">key</a> of the <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①③">key range</a> is included in the range itself.</p> <li data-md> <p>If a <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①④">key range</a>'s <a data-link-type="dfn" href="#key-range-upper-open-flag" id="ref-for-key-range-upper-open-flag②">upper open flag</a> is true, the <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound⑤">upper bound</a> <a data-link-type="dfn" href="#key" id="ref-for-key②⑧">key</a> of the <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①⑤">key range</a> is excluded from the range itself.</p> </ul> </div> <p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="unbounded-key-range">unbounded key range</dfn> is a <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①⑥">key range</a> that has both <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound⑥">lower bound</a> and <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound⑥">upper bound</a> equal to null. All <a data-link-type="dfn" href="#key" id="ref-for-key②⑨">keys</a> are <a data-link-type="dfn" href="#in" id="ref-for-in">in</a> an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range">unbounded key range</a>.</p> <div class="algorithm" data-algorithm="convert a value to a key range"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="convert-a-value-to-a-key-range">convert a value to a key range</dfn> with <var>value</var> and optional <var>null disallowed flag</var>, run these steps:</p> <ol> <li data-md> <p>If <var>value</var> is a <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①⑦">key range</a>, return <var>value</var>.</p> <li data-md> <p>If <var>value</var> is undefined or is null, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror">DataError</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> if <var>null disallowed flag</var> is true, or return an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range①">unbounded key range</a> otherwise.</p> <li data-md> <p>Let <var>key</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①">converting a value to a key</a> with <var>value</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>key</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①">DataError</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>Return a <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①⑧">key range</a> <a data-link-type="dfn" href="#containing-only" id="ref-for-containing-only">containing only</a> <var>key</var>.</p> </ol> </div> <h3 class="heading settled" data-level="2.10" id="cursor-construct"><span class="secno">2.10. </span><span class="content">Cursor</span><a class="self-link" href="#cursor-construct"></a></h3> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="cursor">cursor</dfn> is used to iterate over a range of records in an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①③">index</a> or an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③①">object store</a> in a specific direction.</p> <div> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①">cursor</a> has a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-transaction">transaction</dfn>, the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④③">transaction</a> that was <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④">active</a> when the cursor was created.</p> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②">cursor</a> has a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-range">range</dfn> of records in either an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①④">index</a> or an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③②">object store</a>.</p> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor③">cursor</a> has a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-source">source</dfn> that indicates which <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①⑤">index</a> or an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③③">object store</a> is associated with the records over which the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor④">cursor</a> is iterating.</p> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor⑤">cursor</a> has a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-direction">direction</dfn> that determines whether it moves in monotonically increasing or decreasing order of the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①④">record</a> keys when iterated, and if it skips duplicated values when iterating indexes. The direction of a cursor also determines if the cursor initial position is at the start of its <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source">source</a> or at its end. A cursor’s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction">direction</a> is one of the following:</p> <dl> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-next" id="ref-for-dom-idbcursordirection-next">next</a></code>" <dd data-md> <p>This direction causes the cursor to be opened at the start of the <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①">source</a>. When iterated, the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor⑥">cursor</a> should yield all records, including duplicates, in monotonically increasing order of keys.</p> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-nextunique" id="ref-for-dom-idbcursordirection-nextunique">nextunique</a></code>" <dd data-md> <p>This direction causes the cursor to be opened at the start of the <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source②">source</a>. When iterated, the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor⑦">cursor</a> should not yield records with the same key, but otherwise yield all records, in monotonically increasing order of keys. For every key with duplicate values, only the first record is yielded. When the <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source③">source</a> is an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③④">object store</a> or an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①⑥">index</a> with its <a data-link-type="dfn" href="#index-unique-flag" id="ref-for-index-unique-flag">unique flag</a> set to true, this direction has exactly the same behavior as "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-next" id="ref-for-dom-idbcursordirection-next①">next</a></code>".</p> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prev" id="ref-for-dom-idbcursordirection-prev">prev</a></code>" <dd data-md> <p>This direction causes the cursor to be opened at the end of the <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source④">source</a>. When iterated, the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor⑧">cursor</a> should yield all records, including duplicates, in monotonically decreasing order of keys.</p> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prevunique" id="ref-for-dom-idbcursordirection-prevunique">prevunique</a></code>" <dd data-md> <p>This direction causes the cursor to be opened at the end of the <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source⑤">source</a>. When iterated, the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor⑨">cursor</a> should not yield records with the same key, but otherwise yield all records, in monotonically decreasing order of keys. For every key with duplicate values, only the first record is yielded. When the <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source⑥">source</a> is an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③⑤">object store</a> or an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①⑦">index</a> with its <a data-link-type="dfn" href="#index-unique-flag" id="ref-for-index-unique-flag①">unique flag</a> set to true, this direction has exactly the same behavior as "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prev" id="ref-for-dom-idbcursordirection-prev①">prev</a></code>".</p> </dl> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①⓪">cursor</a> has a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-position">position</dfn> within its range. It is possible for the list of records which the cursor is iterating over to change before the full <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range">range</a> of the cursor has been iterated. In order to handle this, cursors maintain their <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position">position</a> not as an index, but rather as a <a data-link-type="dfn" href="#key" id="ref-for-key③⓪">key</a> of the previously returned record. For a forward iterating cursor, the next time the cursor is asked to iterate to the next record it returns the record with the lowest <a data-link-type="dfn" href="#key" id="ref-for-key③①">key</a> <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than③">greater than</a> the one previously returned. For a backwards iterating cursor, the situation is opposite and it returns the record with the highest <a data-link-type="dfn" href="#key" id="ref-for-key③②">key</a> <a data-link-type="dfn" href="#less-than" id="ref-for-less-than①">less than</a> the one previously returned.</p> <p>For cursors iterating indexes the situation is a little bit more complicated since multiple records can have the same key and are therefore also sorted by <a data-link-type="dfn" href="#value" id="ref-for-value⑦">value</a>. When iterating indexes the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①①">cursor</a> also has an <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-object-store-position">object store position</dfn>, which indicates the <a data-link-type="dfn" href="#value" id="ref-for-value⑧">value</a> of the previously found <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①⑤">record</a> in the index. Both <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position①">position</a> and the <a data-link-type="dfn" href="#cursor-object-store-position" id="ref-for-cursor-object-store-position">object store position</a> are used when finding the next appropriate record.</p> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①②">cursor</a> has a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-key">key</dfn> and a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-value">value</dfn> which represent the <a data-link-type="dfn" href="#key" id="ref-for-key③③">key</a> and the <a data-link-type="dfn" href="#value" id="ref-for-value⑨">value</a> of the last iterated <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①⑥">record</a>.</p> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①③">cursor</a> has a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-got-value-flag">got value flag</dfn>. When this flag is false, the cursor is either in the process of loading the next value or it has reached the end of its <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range①">range</a>. When it is true, it indicates that the cursor is currently holding a value and that it is ready to iterate to the next one.</p> <p>If the <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source⑦">source</a> of a cursor is an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③⑥">object store</a>, the <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-effective-object-store">effective object store</dfn> of the cursor is that object store and the <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-effective-key">effective key</dfn> of the cursor is the cursor’s <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position②">position</a>. If the <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source⑧">source</a> of a cursor is an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①⑧">index</a>, the <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store">effective object store</a> of the cursor is that index’s <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced⑤">referenced</a> object store and the <a data-link-type="dfn" href="#cursor-effective-key" id="ref-for-cursor-effective-key">effective key</a> is the cursor’s <a data-link-type="dfn" href="#cursor-object-store-position" id="ref-for-cursor-object-store-position①">object store position</a>.</p> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①④">cursor</a> has a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-request">request</dfn>, which is the <a data-link-type="dfn" href="#request" id="ref-for-request②④">request</a> used to open the cursor.</p> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①⑤">cursor</a> also has a <dfn class="dfn-paneled" data-dfn-for="cursor" data-dfn-type="dfn" data-noexport id="cursor-key-only-flag">key only flag</dfn>, that indicates whether the cursor’s <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value">value</a> is exposed via the API.</p> </div> <h3 class="heading settled" data-level="2.11" id="key-generator-construct"><span class="secno">2.11. </span><span class="content">Key generators</span><a class="self-link" href="#key-generator-construct"></a></h3> <p>When a <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③⑦">object store</a> is created it can be specified to use a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="key-generator">key generator</dfn>. A key generator is used to generate keys for records inserted into an object store if not otherwise specified.</p> <div> <p>A <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator②">key generator</a> has a <dfn class="dfn-paneled" data-dfn-for="key generator" data-dfn-type="dfn" data-noexport id="key-generator-current-number">current number</dfn>. The <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number">current number</a> is always a positive integer less than or equal to 2<sup>53</sup> (9007199254740992) + 1. The initial value of a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator③">key generator</a>'s <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number①">current number</a> is 1, set when the associated <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③⑧">object store</a> is created. The <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number②">current number</a> is incremented as keys are generated, and may be updated to a specific value by using explicit keys.</p> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Every object store that uses key generators uses a separate generator. That is, interacting with one object store never affects the key generator of any other object store.</p> <p>Modifying a key generator’s <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number③">current number</a> is considered part of a database operation. This means that if the operation fails and the operation is reverted, the <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number④">current number</a> is reverted to the value it had before the operation started. This applies both to modifications that happen due to the <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number⑤">current number</a> getting increased by 1 when the key generator is used, and to modifications that happen due to a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①⑦">record</a> being stored with a key value specified in the call to store the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①⑧">record</a>.</p> <p>Likewise, if a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④④">transaction</a> is aborted, the <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number⑥">current number</a> of the key generator for each <a data-link-type="dfn" href="#object-store" id="ref-for-object-store③⑨">object store</a> in the transaction’s <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope⑧">scope</a> is reverted to the value it had before the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④⑤">transaction</a> was started.</p> <p>The <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number⑦">current number</a> for a key generator never decreases, other than as a result of database operations being reverted. Deleting a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record①⑨">record</a> from an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④⓪">object store</a> never affects the object store’s key generator. Even clearing all records from an object store, for example using the <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-clear" id="ref-for-dom-idbobjectstore-clear">clear()</a></code> method, does not affect the <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number⑧">current number</a> of the object store’s key generator.</p> <p>When a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②⓪">record</a> is stored and a <a data-link-type="dfn" href="#key" id="ref-for-key③④">key</a> is not specified in the call to store the record, a key is generated.</p> <div class="algorithm" data-algorithm="generate a key"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="generate-a-key">generate a key</dfn> for an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④①">object store</a> <var>store</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>generator</var> be <var>store</var>’s <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator④">key generator</a>.</p> <li data-md> <p>Let <var>key</var> be <var>generator</var>’s <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number⑨">current number</a>.</p> <li data-md> <p>If <var>key</var> is greater than 2<sup>53</sup> (9007199254740992), then return failure.</p> <li data-md> <p>Increase <var>generator</var>’s <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number①⓪">current number</a> by 1.</p> <li data-md> <p>Return <var>key</var>.</p> </ol> </div> <p>When a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②①">record</a> is stored and a <a data-link-type="dfn" href="#key" id="ref-for-key③⑤">key</a> is specified in the call to store the record, the associated <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator⑤">key generator</a> may be updated.</p> <div class="algorithm" data-algorithm="possibly update the key generator"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="possibly-update-the-key-generator">possibly update the key generator</dfn> for an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④②">object store</a> <var>store</var> with <var>key</var>, run these steps:</p> <ol> <li data-md> <p>If the <a data-link-type="dfn" href="#key-type" id="ref-for-key-type③">type</a> of <var>key</var> is not <em>number</em>, abort these steps.</p> <li data-md> <p>Let <var>value</var> be the <a data-link-type="dfn" href="#key-value" id="ref-for-key-value③">value</a> of <var>key</var>.</p> <li data-md> <p>Set <var>value</var> to the minimum of <var>value</var> and 2<sup>53</sup> (9007199254740992).</p> <li data-md> <p>Set <var>value</var> to the largest integer not greater than <var>value</var>.</p> <li data-md> <p>Let <var>generator</var> be <var>store</var>’s <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator⑥">key generator</a>.</p> <li data-md> <p>If <var>value</var> is greater than or equal to <var>generator</var>’s <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number①①">current number</a>, then set <var>generator</var>’s <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number①②">current number</a> to <var>value</var> + 1.</p> </ol> </div> <div class="note" role="note"> <span class="marker">NOTE:</span> A key can be specified both for object stores which use <a data-link-type="dfn" href="#object-store-in-line-keys" id="ref-for-object-store-in-line-keys">in-line keys</a>, by setting the property on the stored value which the object store’s <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①">key path</a> points to, and for object stores which use <a data-link-type="dfn" href="#object-store-out-of-line-keys" id="ref-for-object-store-out-of-line-keys">out-of-line keys</a>, by passing a key argument to the call to store the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②②">record</a>. <p>Only specified keys of <a data-link-type="dfn" href="#key-type" id="ref-for-key-type④">type</a> <em>number</em> can affect the <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number①③">current number</a> of the key generator. Keys of <a data-link-type="dfn" href="#key-type" id="ref-for-key-type⑤">type</a> <em>date</em>, <em>array</em> (regardless of the other keys they contain), <em>binary</em>, or <em>string</em> (regardless of whether they could be parsed as numbers) have no effect on the <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number①④">current number</a> of the key generator. Keys of <a data-link-type="dfn" href="#key-type" id="ref-for-key-type⑥">type</a> <em>number</em> with <a data-link-type="dfn" href="#key-value" id="ref-for-key-value④">value</a> less than 1 do not affect the <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number①⑤">current number</a> since they are always lower than the <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number①⑥">current number</a>.</p> </div> <p>When the <a data-link-type="dfn" href="#key-generator-current-number" id="ref-for-key-generator-current-number①⑦">current number</a> of a key generator reaches above the value 2<sup>53</sup> (9007199254740992) any subsequent attempts to use the key generator to generate a new <a data-link-type="dfn" href="#key" id="ref-for-key③⑥">key</a> will result in a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror">ConstraintError</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>. It is still possible to insert <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②③">records</a> into the object store by specifying an explicit key, however the only way to use a key generator again for such records is to delete the object store and create a new one.</p> <div class="note" role="note"> <span class="marker">NOTE:</span> This limit arises because integers greater than 9007199254740992 cannot be uniquely represented as ECMAScript <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number-objects" id="ref-for-sec-number-objects①">Number</a></code>s. As an example, <code>9007199254740992 + 1 === 9007199254740992</code> in ECMAScript. <p>As long as key generators are used in a normal fashion this limit will not be a problem. If you generate a new key 1000 times per second day and night, you won’t run into this limit for over 285000 years.</p> </div> <p>A practical result of this is that the first key generated for an object store is always 1 (unless a higher numeric key is inserted first) and the key generated for an object store is always a positive integer higher than the highest numeric key in the store. The same key is never generated twice for the same object store unless a transaction is rolled back.</p> <div class="example" id="example-key-generator"> <a class="self-link" href="#example-key-generator"></a> <p>Each object store gets its own key generator:</p> <pre class="language-js highlight">store1 <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store1"</c-><c- p>,</c-> <c- p>{</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> store1<c- p>.</c->put<c- p>(</c-><c- u>"a"</c-><c- p>);</c-> <c- c1>// Will get key 1</c-> store2 <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store2"</c-><c- p>,</c-> <c- p>{</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> store2<c- p>.</c->put<c- p>(</c-><c- u>"a"</c-><c- p>);</c-> <c- c1>// Will get key 1</c-> store1<c- p>.</c->put<c- p>(</c-><c- u>"b"</c-><c- p>);</c-> <c- c1>// Will get key 2</c-> store2<c- p>.</c->put<c- p>(</c-><c- u>"b"</c-><c- p>);</c-> <c- c1>// Will get key 2</c-> </pre> <p>If an insertion fails due to constraint violations or IO error, the key generator is not updated.</p> <pre class="language-js highlight">transaction<c- p>.</c->onerror <c- o>=</c-> <c- a>function</c-><c- p>(</c->e<c- p>)</c-> <c- p>{</c-> e<c- p>.</c->preventDefault<c- p>()</c-> <c- p>};</c-> store <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store1"</c-><c- p>,</c-> <c- p>{</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> index <c- o>=</c-> store<c- p>.</c->createIndex<c- p>(</c-><c- u>"index1"</c-><c- p>,</c-> <c- u>"ix"</c-><c- p>,</c-> <c- p>{</c-> unique<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> store<c- p>.</c->put<c- p>({</c-> ix<c- o>:</c-> <c- u>"a"</c-><c- p>});</c-> <c- c1>// Will get key 1</c-> store<c- p>.</c->put<c- p>({</c-> ix<c- o>:</c-> <c- u>"a"</c-><c- p>});</c-> <c- c1>// Will fail</c-> store<c- p>.</c->put<c- p>({</c-> ix<c- o>:</c-> <c- u>"b"</c-><c- p>});</c-> <c- c1>// Will get key 2</c-> </pre> <p>Removing items from an objectStore never affects the key generator. Including when <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-clear" id="ref-for-dom-idbobjectstore-clear①">clear()</a></code> is called.</p> <pre class="language-js highlight">store <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store1"</c-><c- p>,</c-> <c- p>{</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"a"</c-><c- p>);</c-> <c- c1>// Will get key 1</c-> store<c- p>.</c-><c- ow>delete</c-><c- p>(</c-><c- mf>1</c-><c- p>);</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"b"</c-><c- p>);</c-> <c- c1>// Will get key 2</c-> store<c- p>.</c->clear<c- p>();</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"c"</c-><c- p>);</c-> <c- c1>// Will get key 3</c-> store<c- p>.</c-><c- ow>delete</c-><c- p>(</c->IDBKeyRange<c- p>.</c->lowerBound<c- p>(</c-><c- mf>0</c-><c- p>));</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"d"</c-><c- p>);</c-> <c- c1>// Will get key 4</c-> </pre> <p>Inserting an item with an explicit key affects the key generator if, and only if, the key is numeric and higher than the last generated key.</p> <pre class="language-js highlight">store <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store1"</c-><c- p>,</c-> <c- p>{</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"a"</c-><c- p>);</c-> <c- c1>// Will get key 1</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"b"</c-><c- p>,</c-> <c- mf>3</c-><c- p>);</c-> <c- c1>// Will use key 3</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"c"</c-><c- p>);</c-> <c- c1>// Will get key 4</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"d"</c-><c- p>,</c-> <c- o>-</c-><c- mf>10</c-><c- p>);</c-> <c- c1>// Will use key -10</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"e"</c-><c- p>);</c-> <c- c1>// Will get key 5</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"f"</c-><c- p>,</c-> <c- mf>6.00001</c-><c- p>);</c-> <c- c1>// Will use key 6.0001</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"g"</c-><c- p>);</c-> <c- c1>// Will get key 7</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"f"</c-><c- p>,</c-> <c- mf>8.9999</c-><c- p>);</c-> <c- c1>// Will use key 8.9999</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"g"</c-><c- p>);</c-> <c- c1>// Will get key 9</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"h"</c-><c- p>,</c-> <c- u>"foo"</c-><c- p>);</c-> <c- c1>// Will use key "foo"</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"i"</c-><c- p>);</c-> <c- c1>// Will get key 10</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"j"</c-><c- p>,</c-> <c- p>[</c-><c- mf>1000</c-><c- p>]);</c-> <c- c1>// Will use key [1000]</c-> store<c- p>.</c->put<c- p>(</c-><c- u>"k"</c-><c- p>);</c-> <c- c1>// Will get key 11</c-> <c- c1>// All of these would behave the same if the objectStore used a</c-> <c- c1>// keyPath and the explicit key was passed inline in the object</c-> </pre> <p>Aborting a transaction rolls back any increases to the key generator which happened during the transaction. This is to make all rollbacks consistent since rollbacks that happen due to crash never has a chance to commit the increased key generator value.</p> <pre class="language-js highlight">db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store"</c-><c- p>,</c-> <c- p>{</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> trans1 <c- o>=</c-> db<c- p>.</c->transaction<c- p>([</c-><c- u>"store"</c-><c- p>],</c-> <c- u>"readwrite"</c-><c- p>);</c-> store_t1 <c- o>=</c-> trans1<c- p>.</c->objectStore<c- p>(</c-><c- u>"store"</c-><c- p>);</c-> store_t1<c- p>.</c->put<c- p>(</c-><c- u>"a"</c-><c- p>);</c-> <c- c1>// Will get key 1</c-> store_t1<c- p>.</c->put<c- p>(</c-><c- u>"b"</c-><c- p>);</c-> <c- c1>// Will get key 2</c-> trans1<c- p>.</c->abort<c- p>();</c-> trans2 <c- o>=</c-> db<c- p>.</c->transaction<c- p>([</c-><c- u>"store"</c-><c- p>],</c-> <c- u>"readwrite"</c-><c- p>);</c-> store_t2 <c- o>=</c-> trans2<c- p>.</c->objectStore<c- p>(</c-><c- u>"store"</c-><c- p>);</c-> store_t2<c- p>.</c->put<c- p>(</c-><c- u>"c"</c-><c- p>);</c-> <c- c1>// Will get key 1</c-> store_t2<c- p>.</c->put<c- p>(</c-><c- u>"d"</c-><c- p>);</c-> <c- c1>// Will get key 2</c-> </pre> </div> <div class="example" id="example-inline-keygen"> <a class="self-link" href="#example-inline-keygen"></a> <p>The following examples illustrate the different behaviors when trying to use in-line <a data-link-type="dfn" href="#key" id="ref-for-key③⑦">keys</a> and <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator⑦">key generators</a> to save an object to an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④③">object store</a>.</p> <p>If the following conditions are true:</p> <ul> <li data-md> <p>The <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④④">object store</a> has a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator⑧">key generator</a>.</p> <li data-md> <p>There is no in-line value for the <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path②">key path</a> property.</p> </ul> <p>Then the value provided by the <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator⑨">key generator</a> is used to populate the key value. In the example below the <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path③">key path</a> for the object store is "<code>foo.bar</code>". The actual object has no value for the <code>bar</code> property, <code>{ foo: {} }</code>. When the object is saved in the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④⑤">object store</a> the <code>bar</code> property is assigned a value of 1 because that is the next <a data-link-type="dfn" href="#key" id="ref-for-key③⑧">key</a> generated by the <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①⓪">key generator</a>.</p> <pre class="language-js highlight"><c- a>const</c-> store <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store"</c-><c- p>,</c-> <c- p>{</c-> keyPath<c- o>:</c-> <c- u>"foo.bar"</c-><c- p>,</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> store<c- p>.</c->put<c- p>({</c-> foo<c- o>:</c-> <c- p>{}</c-> <c- p>}).</c->onsuccess <c- o>=</c-> <c- a>function</c-><c- p>(</c->e<c- p>)</c-> <c- p>{</c-> <c- a>const</c-> key <c- o>=</c-> e<c- p>.</c->target<c- p>.</c->result<c- p>;</c-> console<c- p>.</c->assert<c- p>(</c->key <c- o>===</c-> <c- mf>1</c-><c- p>);</c-> <c- p>};</c-> </pre> <p>If the following conditions are true:</p> <ul> <li data-md> <p>The <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④⑥">object store</a> has a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①①">key generator</a>.</p> <li data-md> <p>There is a value for the <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path④">key path</a> property.</p> </ul> <p>Then the value associated with the <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path⑤">key path</a> property is used. The auto-generated <a data-link-type="dfn" href="#key" id="ref-for-key③⑨">key</a> is not used. In the example below the <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path⑥">key path</a> for the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④⑦">object store</a> is "<code>foo.bar</code>". The actual object has a value of 10 for the <code>bar</code> property, <code>{ foo: { bar: 10} }</code>. When the object is saved in the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④⑧">object store</a> the <code>bar</code> property keeps its value of 10, because that is the key value.</p> <pre class="language-js highlight"><c- a>const</c-> store <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store"</c-><c- p>,</c-> <c- p>{</c-> keyPath<c- o>:</c-> <c- u>"foo.bar"</c-><c- p>,</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> store<c- p>.</c->put<c- p>({</c-> foo<c- o>:</c-> <c- p>{</c-> bar<c- o>:</c-> <c- mf>10</c-> <c- p>}</c-> <c- p>}).</c->onsuccess <c- o>=</c-> <c- a>function</c-><c- p>(</c->e<c- p>)</c-> <c- p>{</c-> <c- a>const</c-> key <c- o>=</c-> e<c- p>.</c->target<c- p>.</c->result<c- p>;</c-> console<c- p>.</c->assert<c- p>(</c->key <c- o>===</c-> <c- mf>10</c-><c- p>);</c-> <c- p>};</c-> </pre> <p>The following example illustrates the scenario when the specified in-line <a data-link-type="dfn" href="#key" id="ref-for-key④⓪">key</a> is defined through a <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path⑦">key path</a> but there is no property matching it. The value provided by the <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①②">key generator</a> is then used to populate the key value and the system is responsible for creating as many properties as it requires to suffice the property dependencies on the hierarchy chain. In the example below the <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path⑧">key path</a> for the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store④⑨">object store</a> is "<code>foo.bar.baz</code>". The actual object has no value for the <code>foo</code> property, <code>{ zip: {} }</code>. When the object is saved in the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤⓪">object store</a> the <code>foo</code>, <code>bar</code>, and <code>baz</code> properties are created each as a child of the other until a value for <code>foo.bar.baz</code> can be assigned. The value for <code>foo.bar.baz</code> is the next key generated by the object store.</p> <pre class="language-js highlight"><c- a>const</c-> store <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store"</c-><c- p>,</c-> <c- p>{</c-> keyPath<c- o>:</c-> <c- u>"foo.bar.baz"</c-><c- p>,</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> store<c- p>.</c->put<c- p>({</c-> zip<c- o>:</c-> <c- p>{}</c-> <c- p>}).</c->onsuccess <c- o>=</c-> <c- a>function</c-><c- p>(</c->e<c- p>)</c-> <c- p>{</c-> <c- a>const</c-> key <c- o>=</c-> e<c- p>.</c->target<c- p>.</c->result<c- p>;</c-> console<c- p>.</c->assert<c- p>(</c->key <c- o>===</c-> <c- mf>1</c-><c- p>);</c-> store<c- p>.</c->get<c- p>(</c->key<c- p>).</c->onsuccess <c- o>=</c-> <c- a>function</c-><c- p>(</c->e<c- p>)</c-> <c- p>{</c-> <c- a>const</c-> value <c- o>=</c-> e<c- p>.</c->target<c- p>.</c->result<c- p>;</c-> <c- c1>// value will be: { zip: {}, foo: { bar: { baz: 1 } } }</c-> console<c- p>.</c->assert<c- p>(</c->value<c- p>.</c->foo<c- p>.</c->bar<c- p>.</c->baz <c- o>===</c-> <c- mf>1</c-><c- p>);</c-> <c- p>};</c-> <c- p>};</c-> </pre> <p>Attempting to store a property on a primitive value will fail and throw an error. In the first example below the <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path⑨">key path</a> for the object store is "<code>foo</code>". The actual object is a primitive with the value, <code>4</code>. Trying to define a property on that primitive value fails. The same is true for arrays. Properties are not allowed on an array. In the second example below, the actual object is an array, <code>[10]</code>. Trying to define a property on the array fails.</p> <pre class="language-js highlight"><c- a>const</c-> store <c- o>=</c-> db<c- p>.</c->createObjectStore<c- p>(</c-><c- u>"store"</c-><c- p>,</c-> <c- p>{</c-> keyPath<c- o>:</c-> <c- u>"foo"</c-><c- p>,</c-> autoIncrement<c- o>:</c-> <c- kc>true</c-> <c- p>});</c-> <c- c1>// The key generation will attempt to create and store the key path</c-> <c- c1>// property on this primitive.</c-> store<c- p>.</c->put<c- p>(</c-><c- mf>4</c-><c- p>);</c-> <c- c1>// will throw DataError</c-> <c- c1>// The key generation will attempt to create and store the key path</c-> <c- c1>// property on this array.</c-> store<c- p>.</c->put<c- p>([</c-><c- mf>10</c-><c- p>]);</c-> <c- c1>// will throw DataError</c-> </pre> </div> <h2 class="heading settled" data-level="3" id="exceptions"><span class="secno">3. </span><span class="content">Exceptions</span><a class="self-link" href="#exceptions"></a></h2> <p>Each of the exceptions used in this document is a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException③">DOMException</a></code> with a specific type. The exception types and properties such as legacy code value are defined in <a data-link-type="biblio" href="#biblio-webidl" title="Web IDL Standard">[WEBIDL]</a>.</p> <p>The table below lists the <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException④">DOMException</a></code>s used in this document along with a description of the exception type’s usage.</p> <table class="props"> <tbody> <tr> <th>Type <th>Description <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror">AbortError</a></code> <td>A request was aborted. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror①">ConstraintError</a></code> <td> A mutation operation in the transaction failed because a constraint was not satisfied. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#datacloneerror" id="ref-for-datacloneerror">DataCloneError</a></code> <td> The data being stored could not be cloned by the internal structured cloning algorithm. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②">DataError</a></code> <td>Data provided to an operation does not meet requirements. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidaccesserror" id="ref-for-invalidaccesserror">InvalidAccessError</a></code> <td>An invalid operation was performed on an object. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidstateerror" id="ref-for-invalidstateerror">InvalidStateError</a></code> <td> An operation was called on an object on which it is not allowed or at a time when it is not allowed, or if a request is made on a source object that has been deleted or removed. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notfounderror" id="ref-for-notfounderror">NotFoundError</a></code> <td> The operation failed because the requested database object could not be found. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notreadableerror" id="ref-for-notreadableerror">NotReadableError</a></code> <td> The operation failed because the underlying storage containing the requested data could not be read. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#quotaexceedederror" id="ref-for-quotaexceedederror">QuotaExceededError</a></code> <td> The operation failed because there was not enough remaining storage space, or the storage quota was reached and the user declined to give more space to the database. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#syntaxerror" id="ref-for-syntaxerror">SyntaxError</a></code> <td>The keyPath argument contains an invalid key path. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#readonlyerror" id="ref-for-readonlyerror">ReadOnlyError</a></code> <td>The mutating operation was attempted in a read-only transaction. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror">TransactionInactiveError</a></code> <td> A request was placed against a transaction which is currently not active, or which is finished. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#unknownerror" id="ref-for-unknownerror">UnknownError</a></code> <td> The operation failed for transient reasons unrelated to the database itself or not covered by any other error. <tr> <td><code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#versionerror" id="ref-for-versionerror">VersionError</a></code> <td> An attempt was made to open a database using a lower version than the existing version. </table> <p class="note" role="note"><span class="marker">NOTE:</span> Given that multiple Indexed DB operations can throw the same type of error, and that even a single operation can throw the same type of error for multiple reasons, implementations are encouraged to provide more specific messages to enable developers to identify the cause of errors.</p> <h2 class="heading settled" data-level="4" id="async-api"><span class="secno">4. </span><span class="content">API</span><a class="self-link" href="#async-api"></a></h2> <p>The API methods return without blocking the calling thread. All asynchronous operations immediately return an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest">IDBRequest</a></code> instance. This object does not initially contain any information about the result of the operation. Once information becomes available, an event is fired on the request and the information becomes available through the properties of the <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest①">IDBRequest</a></code> instance.</p> <p>The <span>task source</span> for these tasks is the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="database-access-task-source">database access task source</dfn>.</p> <h3 class="heading settled" data-level="4.1" id="request-api"><span class="secno">4.1. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest②">IDBRequest</a></code> interface</span><a class="self-link" href="#request-api"></a></h3> <p>The <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest③">IDBRequest</a></code> interface provides the means to access results of asynchronous requests to <a data-link-type="dfn" href="#database" id="ref-for-database②⑨">databases</a> and <a data-link-type="dfn" href="#database" id="ref-for-database③⓪">database</a> objects using <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 attributes</a> <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a>.</p> <p>Every method for making asynchronous requests returns an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest④">IDBRequest</a></code> object that communicates back to the requesting application through events. This design means that any number of requests can be active on any <a data-link-type="dfn" href="#database" id="ref-for-database③①">database</a> at a time.</p> <div class="example" id="example-async-requests"> <a class="self-link" href="#example-async-requests"></a> <p>In the following example, we open a <a data-link-type="dfn" href="#database" id="ref-for-database③②">database</a> asynchronously. Various event handlers are registered for responding to various situations.</p> <pre class="language-js highlight"><c- a>const</c-> request <c- o>=</c-> indexedDB<c- p>.</c->open<c- p>(</c-><c- t>'AddressBook'</c-><c- p>,</c-> <c- mf>15</c-><c- p>);</c-> request<c- p>.</c->onsuccess <c- o>=</c-> <c- a>function</c-><c- p>(</c->evt<c- p>)</c-> <c- p>{...};</c-> request<c- p>.</c->onerror <c- o>=</c-> <c- a>function</c-><c- p>(</c->evt<c- p>)</c-> <c- p>{...};</c-> </pre> </div> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbrequest"><code><c- g>IDBRequest</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> { <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result"><c- g>result</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException⑤"><c- n>DOMException</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMException?" href="#dom-idbrequest-error" id="ref-for-dom-idbrequest-error"><c- g>error</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> (<a data-link-type="idl-name" href="#idbobjectstore" id="ref-for-idbobjectstore"><c- n>IDBObjectStore</c-></a> <c- b>or</c-> <a data-link-type="idl-name" href="#idbindex" id="ref-for-idbindex"><c- n>IDBIndex</c-></a> <c- b>or</c-> <a data-link-type="idl-name" href="#idbcursor" id="ref-for-idbcursor"><c- n>IDBCursor</c-></a>)? <a class="idl-code" data-link-type="attribute" data-readonly data-type="(IDBObjectStore or IDBIndex or IDBCursor)?" href="#dom-idbrequest-source" id="ref-for-dom-idbrequest-source"><c- g>source</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#idbtransaction" id="ref-for-idbtransaction"><c- n>IDBTransaction</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBTransaction?" href="#dom-idbrequest-transaction" id="ref-for-dom-idbrequest-transaction"><c- g>transaction</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-idbrequestreadystate" id="ref-for-enumdef-idbrequestreadystate"><c- n>IDBRequestReadyState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBRequestReadyState" href="#dom-idbrequest-readystate" id="ref-for-dom-idbrequest-readystate"><c- g>readyState</c-></a>; // Event handlers: <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-idbrequest-onsuccess" id="ref-for-dom-idbrequest-onsuccess"><c- g>onsuccess</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-idbrequest-onerror" id="ref-for-dom-idbrequest-onerror"><c- g>onerror</c-></a>; }; <c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-idbrequestreadystate"><code><c- g>IDBRequestReadyState</c-></code></dfn> { <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequestReadyState" data-dfn-type="enum-value" data-export id="dom-idbrequestreadystate-pending"><code><c- s>"pending"</c-></code></dfn>, <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequestReadyState" data-dfn-type="enum-value" data-export id="dom-idbrequestreadystate-done"><code><c- s>"done"</c-></code></dfn> }; </pre> <div class="domintro note" role="note"> <dl> <dt data-md><var>request</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①">result</a></code> <dd data-md> <p>When a request is completed, returns the <a data-link-type="dfn" href="#request-result" id="ref-for-request-result②">result</a>, or <code>undefined</code> if the request failed. Throws 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> if the request is still pending.</p> <dt data-md><var>request</var> . <code class="idl"><a class="idl-code" data-link-type="attribute" href="#dom-idbrequest-error" id="ref-for-dom-idbrequest-error①">error</a></code> <dd data-md> <p>When a request is completed, returns the <a data-link-type="dfn" href="#request-error" id="ref-for-request-error②">error</a> (a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException⑦">DOMException</a></code>), or null if the request succeeded. Throws 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> if the request is still pending.</p> <dt data-md><var>request</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-source" id="ref-for-dom-idbrequest-source①">source</a></code> <dd data-md> <p>Returns the <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore①">IDBObjectStore</a></code>, <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex①">IDBIndex</a></code>, or <code class="idl"><a data-link-type="idl" href="#idbcursor" id="ref-for-idbcursor①">IDBCursor</a></code> the request was made against, or null if it was an <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request⑧">open request</a>.</p> <dt data-md><var>request</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-transaction" id="ref-for-dom-idbrequest-transaction①">transaction</a></code> <dd data-md> <p>Returns the <code class="idl"><a data-link-type="idl" href="#idbtransaction" id="ref-for-idbtransaction①">IDBTransaction</a></code> the request was made within. If this as an <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request⑨">open request</a>, then it returns an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①⑦">upgrade transaction</a> while it is <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live①⓪">live</a>, or null otherwise.</p> <dt data-md><var>request</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-readystate" id="ref-for-dom-idbrequest-readystate①">readyState</a></code> <dd data-md> <p>Returns "<code class="idl"><a data-link-type="idl" href="#dom-idbrequestreadystate-pending" id="ref-for-dom-idbrequestreadystate-pending">pending</a></code>" until a request is complete, then returns "<code class="idl"><a data-link-type="idl" href="#dom-idbrequestreadystate-done" id="ref-for-dom-idbrequestreadystate-done">done</a></code>".</p> </dl> </div> <div class="algorithm" data-algorithm="result" data-algorithm-for="IDBRequest"> The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequest" data-dfn-type="attribute" data-export id="dom-idbrequest-result"><code>result</code></dfn> getter steps are: <ol> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this">this</a>'s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag⑤">done flag</a> is false, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②">throw</a> 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>.</p> <li data-md> <p>Otherwise, return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①">this</a>'s <a data-link-type="dfn" href="#request-result" id="ref-for-request-result③">result</a>, or undefined if the request resulted in an error.</p> </ol> </div> <div class="algorithm" data-algorithm="error" data-algorithm-for="IDBRequest"> The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequest" data-dfn-type="attribute" data-export id="dom-idbrequest-error"><code>error</code></dfn> getter steps are: <ol> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②">this</a>'s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag⑥">done flag</a> is false, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③">throw</a> 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>.</p> <li data-md> <p>Otherwise, return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③">this</a>'s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error③">error</a>, or null if no error occurred.</p> </ol> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequest" data-dfn-type="attribute" data-export id="dom-idbrequest-source"><code>source</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④">this</a>'s <a data-link-type="dfn" href="#request-source" id="ref-for-request-source①">source</a>, or null if no <a data-link-type="dfn" href="#request-source" id="ref-for-request-source②">source</a> is set.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequest" data-dfn-type="attribute" data-export id="dom-idbrequest-transaction"><code>transaction</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤">this</a>'s <a data-link-type="dfn" href="#request-transaction" id="ref-for-request-transaction②">transaction</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-transaction" id="ref-for-dom-idbrequest-transaction②">transaction</a></code> getter can return null for certain requests, such as for <a data-link-type="dfn" href="#request" id="ref-for-request②⑤">requests</a> returned from <code class="idl"><a data-link-type="idl" href="#dom-idbfactory-open" id="ref-for-dom-idbfactory-open">open()</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequest" data-dfn-type="attribute" data-export id="dom-idbrequest-readystate"><code>readyState</code></dfn> getter steps are to return "<code class="idl"><a data-link-type="idl" href="#dom-idbrequestreadystate-pending" id="ref-for-dom-idbrequestreadystate-pending①">pending</a></code>" if <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥">this</a>'s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag⑦">done flag</a> is false, and "<code class="idl"><a data-link-type="idl" href="#dom-idbrequestreadystate-done" id="ref-for-dom-idbrequestreadystate-done①">done</a></code>" otherwise.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequest" data-dfn-type="attribute" data-export id="dom-idbrequest-onsuccess"><code>onsuccess</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success③">success</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBRequest" data-dfn-type="attribute" data-export id="dom-idbrequest-onerror"><code>onerror</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type①">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error②">error</a></code> event.</p> <p>Methods on <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase">IDBDatabase</a></code> that return a <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request①⓪">open request</a> use an extended interface to allow listening to the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-blocked" id="ref-for-eventdef-idbopendbrequest-blocked②">blocked</a></code> and <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded⑧">upgradeneeded</a></code> events.</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbopendbrequest"><code><c- g>IDBOpenDBRequest</c-></code></dfn> : <a data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest⑤"><c- n>IDBRequest</c-></a> { // Event handlers: <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-idbopendbrequest-onblocked" id="ref-for-dom-idbopendbrequest-onblocked"><c- g>onblocked</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-idbopendbrequest-onupgradeneeded" id="ref-for-dom-idbopendbrequest-onupgradeneeded"><c- g>onupgradeneeded</c-></a>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBOpenDBRequest" data-dfn-type="attribute" data-export id="dom-idbopendbrequest-onblocked"><code>onblocked</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type②">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-blocked" id="ref-for-eventdef-idbopendbrequest-blocked③">blocked</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBOpenDBRequest" data-dfn-type="attribute" data-export id="dom-idbopendbrequest-onupgradeneeded"><code>onupgradeneeded</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type③">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded⑨">upgradeneeded</a></code>.</p> <h3 class="heading settled" data-level="4.2" id="events"><span class="secno">4.2. </span><span class="content">Event interfaces</span><a class="self-link" href="#events"></a></h3> <p>This specification fires events with the following custom interfaces:</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbversionchangeevent"><code><c- g>IDBVersionChangeEvent</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="dfn-paneled idl-code" data-dfn-for="IDBVersionChangeEvent" data-dfn-type="constructor" data-export data-lt="IDBVersionChangeEvent(type, eventInitDict)|constructor(type, eventInitDict)|IDBVersionChangeEvent(type)|constructor(type)" id="dom-idbversionchangeevent-idbversionchangeevent"><code><c- g>constructor</c-></code></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="dfn-paneled idl-code" data-dfn-for="IDBVersionChangeEvent/IDBVersionChangeEvent(type, eventInitDict), IDBVersionChangeEvent/constructor(type, eventInitDict), IDBVersionChangeEvent/IDBVersionChangeEvent(type), IDBVersionChangeEvent/constructor(type)" data-dfn-type="argument" data-export id="dom-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-type"><code><c- g>type</c-></code></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-idbversionchangeeventinit" id="ref-for-dictdef-idbversionchangeeventinit"><c- n>IDBVersionChangeEventInit</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBVersionChangeEvent/IDBVersionChangeEvent(type, eventInitDict), IDBVersionChangeEvent/constructor(type, eventInitDict), IDBVersionChangeEvent/IDBVersionChangeEvent(type), IDBVersionChangeEvent/constructor(type)" data-dfn-type="argument" data-export id="dom-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</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-unsigned-long-long" id="ref-for-idl-unsigned-long-long"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long long" href="#dom-idbversionchangeevent-oldversion" id="ref-for-dom-idbversionchangeevent-oldversion"><c- g>oldVersion</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-long" id="ref-for-idl-unsigned-long-long①"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long long?" href="#dom-idbversionchangeevent-newversion" id="ref-for-dom-idbversionchangeevent-newversion"><c- g>newVersion</c-></a>; }; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-idbversionchangeeventinit"><code><c- g>IDBVersionChangeEventInit</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> { <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long-long" id="ref-for-idl-unsigned-long-long②"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-default="0" data-dfn-for="IDBVersionChangeEventInit" data-dfn-type="dict-member" data-export data-type="unsigned long long" id="dom-idbversionchangeeventinit-oldversion"><code><c- g>oldVersion</c-></code></dfn> = 0; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long-long" id="ref-for-idl-unsigned-long-long③"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a>? <dfn class="dfn-paneled idl-code" data-default="null" data-dfn-for="IDBVersionChangeEventInit" data-dfn-type="dict-member" data-export data-type="unsigned long long?" id="dom-idbversionchangeeventinit-newversion"><code><c- g>newVersion</c-></code></dfn> = <c- b>null</c->; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBVersionChangeEvent" data-dfn-type="attribute" data-export id="dom-idbversionchangeevent-oldversion"><code>oldVersion</code></dfn> getter steps are to return the value it was initialized to. It represents the previous version of the database.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBVersionChangeEvent" data-dfn-type="attribute" data-export id="dom-idbversionchangeevent-newversion"><code>newVersion</code></dfn> getter steps are to return the value it was initialized to. It represents the new version of the database, or null if the database is being deleted. See the steps to <a data-link-type="dfn" href="#upgrade-a-database" id="ref-for-upgrade-a-database①">upgrade a database</a>.</p> <p>Events are constructed as defined in <a href="https://dom.spec.whatwg.org/#constructing-events"><cite>DOM</cite> § 2.5 Constructing events</a>.</p> <div class="algorithm" data-algorithm="fire a version change event"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="fire-a-version-change-event">fire a version change event</dfn> named <var>e</var> at <var>target</var> given <var>oldVersion</var> and <var>newVersion</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>event</var> be the result of <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-create" id="ref-for-concept-event-create">creating an event</a> using <code class="idl"><a data-link-type="idl" href="#idbversionchangeevent" id="ref-for-idbversionchangeevent">IDBVersionChangeEvent</a></code>.</p> <li data-md> <p>Set <var>event</var>’s <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> attribute to <var>e</var>.</p> <li data-md> <p>Set <var>event</var>’s <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-bubbles" id="ref-for-dom-event-bubbles">bubbles</a></code> and <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-cancelable" id="ref-for-dom-event-cancelable">cancelable</a></code> attributes to false.</p> <li data-md> <p>Set <var>event</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbversionchangeevent-oldversion" id="ref-for-dom-idbversionchangeevent-oldversion①">oldVersion</a></code> attribute to <var>oldVersion</var>.</p> <li data-md> <p>Set <var>event</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbversionchangeevent-newversion" id="ref-for-dom-idbversionchangeevent-newversion①">newVersion</a></code> attribute to <var>newVersion</var>.</p> <li data-md> <p>Let <var>legacyOutputDidListenersThrowFlag</var> be false.</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> at <var>target</var> with <var>legacyOutputDidListenersThrowFlag</var>.</p> <li data-md> <p>Return <var>legacyOutputDidListenersThrowFlag</var>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The return value of this algorithm is not always used.</p> </ol> </div> <h3 class="heading settled" data-level="4.3" id="factory-interface"><span class="secno">4.3. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#idbfactory" id="ref-for-idbfactory">IDBFactory</a></code> interface</span><a class="self-link" href="#factory-interface"></a></h3> <p><a data-link-type="dfn" href="#database" id="ref-for-database③③">Database</a> objects are accessed through methods on the <code class="idl"><a data-link-type="idl" href="#idbfactory" id="ref-for-idbfactory①">IDBFactory</a></code> interface. A single object implementing this interface is present in the global scope of environments that support Indexed DB operations.</p> <pre class="idl highlight def" id="global-scope"><c- b>partial</c-> <c- b>interface</c-> <c- b>mixin</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope" id="ref-for-windoworworkerglobalscope"><c- g>WindowOrWorkerGlobalScope</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="#idbfactory" id="ref-for-idbfactory②"><c- n>IDBFactory</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBFactory" href="#dom-windoworworkerglobalscope-indexeddb" id="ref-for-dom-windoworworkerglobalscope-indexeddb"><c- g>indexedDB</c-></a>; }; </pre> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="WindowOrWorkerGlobalScope" data-dfn-type="attribute" data-export id="dom-windoworworkerglobalscope-indexeddb"><code>indexedDB</code></dfn> attribute provides applications a mechanism for accessing capabilities of indexed databases.</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbfactory"><code><c- g>IDBFactory</c-></code></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 data-link-type="idl-name" href="#idbopendbrequest" id="ref-for-idbopendbrequest"><c- n>IDBOpenDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbfactory-open" id="ref-for-dom-idbfactory-open①"><c- g>open</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="IDBFactory/open(name, version), IDBFactory/open(name)" data-dfn-type="argument" data-export id="dom-idbfactory-open-name-version-name"><code><c- g>name</c-></code></dfn>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long-long" id="ref-for-idl-unsigned-long-long④"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBFactory/open(name, version), IDBFactory/open(name)" data-dfn-type="argument" data-export id="dom-idbfactory-open-name-version-version"><code><c- g>version</c-></code></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 data-link-type="idl-name" href="#idbopendbrequest" id="ref-for-idbopendbrequest①"><c- n>IDBOpenDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbfactory-deletedatabase" id="ref-for-dom-idbfactory-deletedatabase"><c- g>deleteDatabase</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="IDBFactory/deleteDatabase(name)" data-dfn-type="argument" data-export id="dom-idbfactory-deletedatabase-name-name"><code><c- g>name</c-></code></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 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="#dictdef-idbdatabaseinfo" id="ref-for-dictdef-idbdatabaseinfo"><c- n>IDBDatabaseInfo</c-></a>>> <a class="idl-code" data-link-type="method" href="#dom-idbfactory-databases" id="ref-for-dom-idbfactory-databases"><c- g>databases</c-></a>(); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-short" id="ref-for-idl-short"><c- b>short</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbfactory-cmp" id="ref-for-dom-idbfactory-cmp"><c- g>cmp</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBFactory/cmp(first, second)" data-dfn-type="argument" data-export id="dom-idbfactory-cmp-first-second-first"><code><c- g>first</c-></code></dfn>, <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBFactory/cmp(first, second)" data-dfn-type="argument" data-export id="dom-idbfactory-cmp-first-second-second"><code><c- g>second</c-></code></dfn>); }; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-idbdatabaseinfo"><code><c- g>IDBDatabaseInfo</c-></code></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="dfn-paneled idl-code" data-dfn-for="IDBDatabaseInfo" data-dfn-type="dict-member" data-export data-type="DOMString" id="dom-idbdatabaseinfo-name"><code><c- g>name</c-></code></dfn>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long-long" id="ref-for-idl-unsigned-long-long⑤"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabaseInfo" data-dfn-type="dict-member" data-export data-type="unsigned long long" id="dom-idbdatabaseinfo-version"><code><c- g>version</c-></code></dfn>; }; </pre> <div class="domintro note" role="note"> <dl> <dt data-md><var>request</var> = indexedDB . <code class="idl"><a data-link-type="idl" href="#dom-idbfactory-open" id="ref-for-dom-idbfactory-open②">open</a></code>(<var>name</var>) <dd data-md> <p>Attempts to open a <a data-link-type="dfn" href="#connection" id="ref-for-connection③⓪">connection</a> to the named <a data-link-type="dfn" href="#database" id="ref-for-database③④">database</a> with the current version, or 1 if it does not already exist. If the request is successful <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result②">result</a></code> will be the <a data-link-type="dfn" href="#connection" id="ref-for-connection③①">connection</a>.</p> <dt data-md><var>request</var> = indexedDB . <code class="idl"><a data-link-type="idl" href="#dom-idbfactory-open" id="ref-for-dom-idbfactory-open③">open</a></code>(<var>name</var>, <var>version</var>) <dd data-md> <p>Attempts to open a <a data-link-type="dfn" href="#connection" id="ref-for-connection③②">connection</a> to the named <a data-link-type="dfn" href="#database" id="ref-for-database③⑤">database</a> with the specified <var>version</var>. If the database already exists with a lower version and there are open <a data-link-type="dfn" href="#connection" id="ref-for-connection③③">connections</a> that don’t close in response to a <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange③">versionchange</a></code> event, the request will be blocked until they all close, then an upgrade will occur. If the database already exists with a higher version the request will fail. If the request is successful <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result③">result</a></code> will be the <a data-link-type="dfn" href="#connection" id="ref-for-connection③④">connection</a>.</p> <dt data-md><var>request</var> = indexedDB . <code class="idl"><a data-link-type="idl" href="#dom-idbfactory-deletedatabase" id="ref-for-dom-idbfactory-deletedatabase①">deleteDatabase</a></code>(<var>name</var>) <dd data-md> <p>Attempts to delete the named <a data-link-type="dfn" href="#database" id="ref-for-database③⑥">database</a>. If the database already exists and there are open <a data-link-type="dfn" href="#connection" id="ref-for-connection③⑤">connections</a> that don’t close in response to a <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange④">versionchange</a></code> event, the request will be blocked until they all close. If the request is successful <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result④">result</a></code> will be null.</p> <dt data-md><var>result</var> = await indexedDB . <code class="idl"><a data-link-type="idl" href="#dom-idbfactory-databases" id="ref-for-dom-idbfactory-databases①">databases</a></code>() <dd data-md> <p>Returns a promise which resolves to a list of objects giving a snapshot of the names and versions of databases within the <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-key" id="ref-for-storage-key⑤">storage key</a>.</p> <p>This API is intended for web applications to introspect the use of databases, for example to clean up from earlier versions of a site’s code. Note that the result is a snapshot; there are no guarantees about the sequencing of the collection of the data or the delivery of the response with respect to requests to create, upgrade, or delete databases by this context or others.</p> </dl> </div> <div class="algorithm" data-algorithm="open(name, version)" data-algorithm-for="IDBFactory"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBFactory" data-dfn-type="method" data-export data-lt="open(name, version)|open(name)" id="dom-idbfactory-open"><code>open(<var>name</var>, <var>version</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>If <var>version</var> is 0 (zero), <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④">throw</a> 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>.</p> <li data-md> <p>Let <var>environment</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦">this</a>'s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#relevant-settings-object" id="ref-for-relevant-settings-object">relevant settings object</a>.</p> <li data-md> <p>Let <var>storageKey</var> be the result of running <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#obtain-a-storage-key" id="ref-for-obtain-a-storage-key">obtain a storage key</a> given <var>environment</var>. If failure is returned, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤">throw</a> 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 abort these steps.</p> <li data-md> <p>Let <var>request</var> be a new <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request①①">open request</a>.</p> <li data-md> <p>Run these 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>result</var> be the result of <a data-link-type="dfn" href="#open-a-database-connection" id="ref-for-open-a-database-connection①">opening a database connection</a>, with <var>storageKey</var>, <var>name</var>, <var>version</var> if given and undefined otherwise, and <var>request</var>.</p> <details class="note"> <summary>What happens if <var>version</var> is not given?</summary> If <var>version</var> is not given and a <a data-link-type="dfn" href="#database" id="ref-for-database③⑦">database</a> with that name already exists, a connection will be opened without changing the <a data-link-type="dfn" href="#database-version" id="ref-for-database-version③">version</a>. If <var>version</var> is not given and no <a data-link-type="dfn" href="#database" id="ref-for-database③⑧">database</a> with that name exists, a new <a data-link-type="dfn" href="#database" id="ref-for-database③⑨">database</a> will be created with <a data-link-type="dfn" href="#database-version" id="ref-for-database-version④">version</a> equal to 1. </details> <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 these steps:</p> <ol> <li data-md> <p>If <var>result</var> is an error, then:</p> <ol> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-result" id="ref-for-request-result④">result</a> to undefined.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error④">error</a> to <var>result</var>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag⑧">done flag</a> to true.</p> <li data-md> <p><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 <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error③">error</a></code> at <var>request</var> with its <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-bubbles" id="ref-for-dom-event-bubbles①">bubbles</a></code> and <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-cancelable" id="ref-for-dom-event-cancelable①">cancelable</a></code> attributes initialized to true.</p> </ol> <li data-md> <p>Otherwise:</p> <ol> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-result" id="ref-for-request-result⑤">result</a> to <var>result</var>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag⑨">done flag</a> to true.</p> <li data-md> <p><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 <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success④">success</a></code> at <var>request</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> If the steps above resulted in an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①⑧">upgrade transaction</a> being run, these steps will run after that transaction finishes. This ensures that in the case where another version upgrade is about to happen, the success event is fired on the connection first so that the script gets a chance to register a listener for the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange⑤">versionchange</a></code> event.</p> <details class="note"> <summary> Why aren’t the steps to <a data-link-type="dfn" href="#fire-a-success-event" id="ref-for-fire-a-success-event">fire a success event</a> or <a data-link-type="dfn" href="#fire-an-error-event" id="ref-for-fire-an-error-event">fire an error event</a> used? </summary> There is no transaction associated with the request (at this point), so those steps — which activate an associated transaction before dispatch and deactivate the transaction after dispatch — do not apply. </details> </ol> </ol> <li data-md> <p>Return a new <code class="idl"><a data-link-type="idl" href="#idbopendbrequest" id="ref-for-idbopendbrequest②">IDBOpenDBRequest</a></code> object for <var>request</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="deleteDatabase(name)" data-algorithm-for="IDBFactory"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBFactory" data-dfn-type="method" data-export id="dom-idbfactory-deletedatabase"><code>deleteDatabase(<var>name</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>environment</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧">this</a>'s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#relevant-settings-object" id="ref-for-relevant-settings-object①">relevant settings object</a>.</p> <li data-md> <p>Let <var>storageKey</var> be the result of running <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#obtain-a-storage-key" id="ref-for-obtain-a-storage-key①">obtain a storage key</a> given <var>environment</var>. If failure is returned, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥">throw</a> 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 abort these steps.</p> <li data-md> <p>Let <var>request</var> be a new <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request①②">open request</a>.</p> <li data-md> <p>Run these 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>result</var> be the result of <a data-link-type="dfn" href="#delete-a-database" id="ref-for-delete-a-database">deleting a database</a>, with <var>storageKey</var>, <var>name</var>, and <var>request</var>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-processed-flag" id="ref-for-request-processed-flag①">processed flag</a> to true.</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 run these steps:</p> <ol> <li data-md> <p>If <var>result</var> is an error, set <var>request</var>’s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error⑤">error</a> to <var>result</var>, set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①⓪">done flag</a> to true, and <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 <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error④">error</a></code> at <var>request</var> with its <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-bubbles" id="ref-for-dom-event-bubbles②">bubbles</a></code> and <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-cancelable" id="ref-for-dom-event-cancelable②">cancelable</a></code> attributes initialized to true.</p> <li data-md> <p>Otherwise, set <var>request</var>’s <a data-link-type="dfn" href="#request-result" id="ref-for-request-result⑥">result</a> to undefined, set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①①">done flag</a> to true, and <a data-link-type="dfn" href="#fire-a-version-change-event" id="ref-for-fire-a-version-change-event">fire a version change event</a> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success⑤">success</a></code> at <a data-link-type="dfn" href="#request" id="ref-for-request②⑥">request</a> with <var>result</var> and null.</p> <details class="note"> <summary> Why aren’t the steps to <a data-link-type="dfn" href="#fire-a-success-event" id="ref-for-fire-a-success-event①">fire a success event</a> or <a data-link-type="dfn" href="#fire-an-error-event" id="ref-for-fire-an-error-event①">fire an error event</a> used? </summary> There is no transaction associated with the request, so those steps — which activate an associated transaction before dispatch and deactivate the transaction after dispatch — do not apply. <p>Also, the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success⑥">success</a></code> event here is a <code class="idl"><a data-link-type="idl" href="#idbversionchangeevent" id="ref-for-idbversionchangeevent①">IDBVersionChangeEvent</a></code> which includes the <code class="idl"><a data-link-type="idl" href="#dom-idbversionchangeevent-oldversion" id="ref-for-dom-idbversionchangeevent-oldversion②">oldVersion</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-idbversionchangeevent-newversion" id="ref-for-dom-idbversionchangeevent-newversion②">newVersion</a></code> details.</p> </details> </ol> </ol> <li data-md> <p>Return a new <code class="idl"><a data-link-type="idl" href="#idbopendbrequest" id="ref-for-idbopendbrequest③">IDBOpenDBRequest</a></code> object for <var>request</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="databases()" data-algorithm-for="IDBFactory"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBFactory" data-dfn-type="method" data-export id="dom-idbfactory-databases"><code>databases()</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>environment</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨">this</a>'s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#relevant-settings-object" id="ref-for-relevant-settings-object②">relevant settings object</a>.</p> <li data-md> <p>Let <var>storageKey</var> be the result of running <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#obtain-a-storage-key" id="ref-for-obtain-a-storage-key②">obtain a storage key</a> given <var>environment</var>. If failure is returned, then return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#a-promise-rejected-with" id="ref-for-a-promise-rejected-with">a promise rejected with</a> 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></p> <li data-md> <p>Let <var>p</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>.</p> <li data-md> <p>Run these 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>databases</var> be the <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="#database" id="ref-for-database④⓪">databases</a> in <var>storageKey</var>. If this cannot be determined for any reason, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#reject" id="ref-for-reject">reject</a> <var>p</var> with an appropriate error (e.g. an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#unknownerror" id="ref-for-unknownerror①">UnknownError</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 terminate these steps.</p> <li data-md> <p>Let <var>result</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><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate">For each</a> <var>db</var> of <var>databases</var>:</p> <ol> <li data-md> <p>Let <var>info</var> be a new <code class="idl"><a data-link-type="idl" href="#dictdef-idbdatabaseinfo" id="ref-for-dictdef-idbdatabaseinfo①">IDBDatabaseInfo</a></code> dictionary.</p> <li data-md> <p>Set <var>info</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbdatabaseinfo-name" id="ref-for-dom-idbdatabaseinfo-name">name</a></code> dictionary member to <var>db</var>’s <a data-link-type="dfn" href="#database-name" id="ref-for-database-name①">name</a>.</p> <li data-md> <p>Set <var>info</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbdatabaseinfo-version" id="ref-for-dom-idbdatabaseinfo-version">version</a></code> dictionary member to <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version⑤">version</a>.</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>info</var> to <var>result</var>.</p> </ol> <li data-md> <p><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#resolve" id="ref-for-resolve">Resolve</a> <var>p</var> with <var>result</var>.</p> </ol> <li data-md> <p>Return <var>p</var>.</p> </ol> </div> <div class="advisement"> 🚧 The <code class="idl"><a data-link-type="idl" href="#dom-idbfactory-databases" id="ref-for-dom-idbfactory-databases②">databases()</a></code> method is new in this edition. It is supported in Chrome 71, Edge 79, Firefox 126, and Safari 14. 🚧 </div> <div class="domintro note" role="note"> <dl> <dt data-md><var>result</var> = indexedDB . <code class="idl"><a data-link-type="idl" href="#dom-idbfactory-cmp" id="ref-for-dom-idbfactory-cmp①">cmp</a></code>(<var>key1</var>, <var>key2</var>) <dd data-md> <p>Compares two values as <a data-link-type="dfn" href="#key" id="ref-for-key④①">keys</a>. Returns -1 if <var>key1</var> precedes <var>key2</var>, 1 if <var>key2</var> precedes <var>key1</var>, and 0 if the keys are equal.</p> <p>Throws a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror③">DataError</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> if either input is not a valid <a data-link-type="dfn" href="#key" id="ref-for-key④②">key</a>.</p> </dl> </div> <div class="algorithm" data-algorithm="cmp(first, second)" data-algorithm-for="IDBFactory"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBFactory" data-dfn-type="method" data-export id="dom-idbfactory-cmp"><code>cmp(<var>first</var>, <var>second</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>a</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key②">converting a value to a key</a> with <var>first</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>a</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror④">DataError</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>Let <var>b</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key③">converting a value to a key</a> with <var>second</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>b</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror⑤">DataError</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>Return the results of <a data-link-type="dfn" href="#compare-two-keys" id="ref-for-compare-two-keys④">comparing two keys</a> with <var>a</var> and <var>b</var>.</p> </ol> </div> <h3 class="heading settled" data-level="4.4" id="database-interface"><span class="secno">4.4. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase①">IDBDatabase</a></code> interface</span><a class="self-link" href="#database-interface"></a></h3> <p>The <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase②">IDBDatabase</a></code> interface represents a <a data-link-type="dfn" href="#connection" id="ref-for-connection③⑥">connection</a> to a <a data-link-type="dfn" href="#database" id="ref-for-database④①">database</a>.</p> <p>An <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase③">IDBDatabase</a></code> object must not be garbage collected if its associated <a data-link-type="dfn" href="#connection" id="ref-for-connection③⑦">connection</a>'s <a data-link-type="dfn" href="#connection-close-pending-flag" id="ref-for-connection-close-pending-flag①">close pending flag</a> is false and it has one or more event listeners registers whose type is one of <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbtransaction-abort" id="ref-for-eventdef-idbtransaction-abort">abort</a></code>, <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error⑤">error</a></code>, or <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange⑥">versionchange</a></code>. If an <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase④">IDBDatabase</a></code> object is garbage collected, the associated <a data-link-type="dfn" href="#connection" id="ref-for-connection③⑧">connection</a> must be <a data-link-type="dfn" href="#connection-closed" id="ref-for-connection-closed①">closed</a>.</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbdatabase"><code><c- g>IDBDatabase</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> { <c- b>readonly</c-> <c- b>attribute</c-> <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="DOMString" href="#dom-idbdatabase-name" id="ref-for-dom-idbdatabase-name"><c- g>name</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-long" id="ref-for-idl-unsigned-long-long⑥"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long long" href="#dom-idbdatabase-version" id="ref-for-dom-idbdatabase-version"><c- g>version</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist" id="ref-for-domstringlist①"><c- n>DOMStringList</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMStringList" href="#dom-idbdatabase-objectstorenames" id="ref-for-dom-idbdatabase-objectstorenames"><c- g>objectStoreNames</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="#idbtransaction" id="ref-for-idbtransaction②"><c- n>IDBTransaction</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbdatabase-transaction" id="ref-for-dom-idbdatabase-transaction②"><c- g>transaction</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> <c- b>or</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 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="IDBDatabase/transaction(storeNames, mode, options), IDBDatabase/transaction(storeNames, mode), IDBDatabase/transaction(storeNames)" data-dfn-type="argument" data-export id="dom-idbdatabase-transaction-storenames-mode-options-storenames"><code><c- g>storeNames</c-></code></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbtransactionmode" id="ref-for-enumdef-idbtransactionmode"><c- n>IDBTransactionMode</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase/transaction(storeNames, mode, options), IDBDatabase/transaction(storeNames, mode), IDBDatabase/transaction(storeNames)" data-dfn-type="argument" data-export id="dom-idbdatabase-transaction-storenames-mode-options-mode"><code><c- g>mode</c-></code></dfn> = "readonly", <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-idbtransactionoptions" id="ref-for-dictdef-idbtransactionoptions"><c- n>IDBTransactionOptions</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase/transaction(storeNames, mode, options), IDBDatabase/transaction(storeNames, mode), IDBDatabase/transaction(storeNames)" data-dfn-type="argument" data-export id="dom-idbdatabase-transaction-storenames-mode-options-options"><code><c- g>options</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 class="idl-code" data-link-type="method" href="#dom-idbdatabase-close" id="ref-for-dom-idbdatabase-close①"><c- g>close</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="#idbobjectstore" id="ref-for-idbobjectstore②"><c- n>IDBObjectStore</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbdatabase-createobjectstore" id="ref-for-dom-idbdatabase-createobjectstore"><c- g>createObjectStore</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="IDBDatabase/createObjectStore(name, options), IDBDatabase/createObjectStore(name)" data-dfn-type="argument" data-export id="dom-idbdatabase-createobjectstore-name-options-name"><code><c- g>name</c-></code></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-idbobjectstoreparameters" id="ref-for-dictdef-idbobjectstoreparameters"><c- n>IDBObjectStoreParameters</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase/createObjectStore(name, options), IDBDatabase/createObjectStore(name)" data-dfn-type="argument" data-export id="dom-idbdatabase-createobjectstore-name-options-options"><code><c- g>options</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 class="idl-code" data-link-type="method" href="#dom-idbdatabase-deleteobjectstore" id="ref-for-dom-idbdatabase-deleteobjectstore"><c- g>deleteObjectStore</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="IDBDatabase/deleteObjectStore(name)" data-dfn-type="argument" data-export id="dom-idbdatabase-deleteobjectstore-name-name"><code><c- g>name</c-></code></dfn>); // Event handlers: <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-idbdatabase-onabort" id="ref-for-dom-idbdatabase-onabort"><c- g>onabort</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-idbdatabase-onclose" id="ref-for-dom-idbdatabase-onclose"><c- g>onclose</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-idbdatabase-onerror" id="ref-for-dom-idbdatabase-onerror"><c- g>onerror</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-idbdatabase-onversionchange" id="ref-for-dom-idbdatabase-onversionchange"><c- g>onversionchange</c-></a>; }; <c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-idbtransactiondurability"><code><c- g>IDBTransactionDurability</c-></code></dfn> { <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransactionDurability" data-dfn-type="enum-value" data-export id="dom-idbtransactiondurability-default"><code><c- s>"default"</c-></code></dfn>, <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransactionDurability" data-dfn-type="enum-value" data-export id="dom-idbtransactiondurability-strict"><code><c- s>"strict"</c-></code></dfn>, <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransactionDurability" data-dfn-type="enum-value" data-export id="dom-idbtransactiondurability-relaxed"><code><c- s>"relaxed"</c-></code></dfn> }; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-idbtransactionoptions"><code><c- g>IDBTransactionOptions</c-></code></dfn> { <a data-link-type="idl-name" href="#enumdef-idbtransactiondurability" id="ref-for-enumdef-idbtransactiondurability"><c- n>IDBTransactionDurability</c-></a> <dfn class="dfn-paneled idl-code" data-default=""default"" data-dfn-for="IDBTransactionOptions" data-dfn-type="dict-member" data-export data-type="IDBTransactionDurability" id="dom-idbtransactionoptions-durability"><code><c- g>durability</c-></code></dfn> = "default"; }; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-idbobjectstoreparameters"><code><c- g>IDBObjectStoreParameters</c-></code></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> <c- b>or</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 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-default="null" data-dfn-for="IDBObjectStoreParameters" data-dfn-type="dict-member" data-export data-type="(DOMString or sequence<DOMString>)?" id="dom-idbobjectstoreparameters-keypath"><code><c- g>keyPath</c-></code></dfn> = <c- b>null</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="IDBObjectStoreParameters" data-dfn-type="dict-member" data-export data-type="boolean" id="dom-idbobjectstoreparameters-autoincrement"><code><c- g>autoIncrement</c-></code></dfn> = <c- b>false</c->; }; </pre> <div class="domintro note" role="note"> <dl> <dt data-md><var>connection</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-name" id="ref-for-dom-idbdatabase-name①">name</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#database-name" id="ref-for-database-name②">name</a> of the database.</p> <dt data-md><var>connection</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-version" id="ref-for-dom-idbdatabase-version①">version</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#database-version" id="ref-for-database-version⑥">version</a> of the database.</p> </dl> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="attribute" data-export id="dom-idbdatabase-name"><code>name</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪">this</a>'s associated <a data-link-type="dfn" href="#database" id="ref-for-database④②">database</a>'s <a data-link-type="dfn" href="#database-name" id="ref-for-database-name③">name</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-name" id="ref-for-dom-idbdatabase-name②">name</a></code> attribute returns this name even if <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①">this</a>'s <a data-link-type="dfn" href="#connection-close-pending-flag" id="ref-for-connection-close-pending-flag②">close pending flag</a> is true. In other words, the value of this attribute stays constant for the lifetime of the <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase⑤">IDBDatabase</a></code> instance.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="attribute" data-export id="dom-idbdatabase-version"><code>version</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②">this</a>'s <a data-link-type="dfn" href="#connection-version" id="ref-for-connection-version①">version</a>.</p> <details class="note"> <summary> Is this the same as the <a data-link-type="dfn" href="#database" id="ref-for-database④③">database</a>'s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version⑦">version</a>? </summary> As long as the <a data-link-type="dfn" href="#connection" id="ref-for-connection③⑨">connection</a> is open, this is the same as the connected <a data-link-type="dfn" href="#database" id="ref-for-database④④">database</a>'s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version⑧">version</a>. But once the <a data-link-type="dfn" href="#connection" id="ref-for-connection④⓪">connection</a> has <a data-link-type="dfn" href="#connection-closed" id="ref-for-connection-closed②">closed</a>, this attribute will not reflect changes made with a later <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction①⑨">upgrade transaction</a>. </details> <div class="domintro note" role="note"> <dl> <dt data-md><var>connection</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-objectstorenames" id="ref-for-dom-idbdatabase-objectstorenames①">objectStoreNames</a></code> <dd data-md> <p>Returns a list of the names of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤①">object stores</a> in the database.</p> <dt data-md><var>store</var> = <var>connection</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-createobjectstore" id="ref-for-dom-idbdatabase-createobjectstore①">createObjectStore</a></code>(<var>name</var> [, <var>options</var>]) <dd data-md> <p>Creates a new <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤②">object store</a> with the given <var>name</var> and <var>options</var> and returns a new <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore③">IDBObjectStore</a></code>.</p> <p>Throws 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> if not called within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②⓪">upgrade transaction</a>.</p> <dt data-md><var>connection</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-deleteobjectstore" id="ref-for-dom-idbdatabase-deleteobjectstore①">deleteObjectStore</a></code>(<var>name</var>) <dd data-md> <p>Deletes the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤③">object store</a> with the given <var>name</var>.</p> <p>Throws 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> if not called within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②①">upgrade transaction</a>.</p> </dl> </div> <div class="algorithm" data-algorithm="objectStoreNames" data-algorithm-for="IDBDatabase"> The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="attribute" data-export id="dom-idbdatabase-objectstorenames"><code>objectStoreNames</code></dfn> getter steps are: <ol> <li data-md> <p>Let <var>names</var> be a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list③">list</a> of the <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①">names</a> of the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤④">object stores</a> in <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③">this</a>'s <a data-link-type="dfn" href="#connection-object-store-set" id="ref-for-connection-object-store-set">object store set</a>.</p> <li data-md> <p>Return the result (a <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist" id="ref-for-domstringlist②">DOMStringList</a></code>) of <a data-link-type="dfn" href="#create-a-sorted-name-list" id="ref-for-create-a-sorted-name-list">creating a sorted name list</a> with <var>names</var>.</p> </ol> </div> <details class="note"> <summary> Is this the same as the <a data-link-type="dfn" href="#database" id="ref-for-database④⑤">database</a>'s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤⑤">object store</a> <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name②">names</a>? </summary> As long as the <a data-link-type="dfn" href="#connection" id="ref-for-connection④①">connection</a> is open, this is the same as the connected <a data-link-type="dfn" href="#database" id="ref-for-database④⑥">database</a>'s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤⑥">object store</a> <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name③">names</a>. But once the <a data-link-type="dfn" href="#connection" id="ref-for-connection④②">connection</a> has <a data-link-type="dfn" href="#connection-closed" id="ref-for-connection-closed③">closed</a>, this attribute will not reflect changes made with a later <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②②">upgrade transaction</a>. </details> <div class="algorithm" data-algorithm="createObjectStore(name, options)" data-algorithm-for="IDBDatabase"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="method" data-export data-lt="createObjectStore(name, options)|createObjectStore(name)" id="dom-idbdatabase-createobjectstore"><code>createObjectStore(<var>name</var>, <var>options</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>database</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④">this</a>'s associated <a data-link-type="dfn" href="#database" id="ref-for-database④⑦">database</a>.</p> <li data-md> <p>Let <var>transaction</var> be <var>database</var>’s <a data-link-type="dfn" href="#database-upgrade-transaction" id="ref-for-database-upgrade-transaction">upgrade transaction</a> if it is not null, or <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨">throw</a> 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> otherwise.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑦">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active⑤">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①">TransactionInactiveError</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>Let <var>keyPath</var> be <var>options</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstoreparameters-keypath" id="ref-for-dom-idbobjectstoreparameters-keypath">keyPath</a></code> member if it is not undefined or null, or null otherwise.</p> <li data-md> <p>If <var>keyPath</var> is not null and is not a <a data-link-type="dfn" href="#valid-key-path" id="ref-for-valid-key-path">valid key path</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#syntaxerror" id="ref-for-syntaxerror①">SyntaxError</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 an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤⑦">object store</a> <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name④">named</a> <var>name</var> already exists in <var>database</var> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror②">ConstraintError</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>Let <var>autoIncrement</var> be <var>options</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstoreparameters-autoincrement" id="ref-for-dom-idbobjectstoreparameters-autoincrement">autoIncrement</a></code> member.</p> <li data-md> <p>If <var>autoIncrement</var> is true and <var>keyPath</var> is an empty string or any sequence (empty or otherwise), <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①③">throw</a> an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidaccesserror" id="ref-for-invalidaccesserror①">InvalidAccessError</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>Let <var>store</var> be a new <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤⑧">object store</a> in <var>database</var>. Set the created <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑤⑨">object store</a>'s <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name⑤">name</a> to <var>name</var>. If <var>autoIncrement</var> is true, then the created <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥⓪">object store</a> uses a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①③">key generator</a>. If <var>keyPath</var> is not null, set the created <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥①">object store</a>'s <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①⓪">key path</a> to <var>keyPath</var>.</p> <li data-md> <p>Return a new <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle⑦">object store handle</a> associated with <var>store</var> and <var>transaction</var>.</p> </ol> </div> <p>This method creates and returns a new <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥②">object store</a> with the given name in the <a data-link-type="dfn" href="#connection" id="ref-for-connection④③">connected</a> <a data-link-type="dfn" href="#database" id="ref-for-database④⑧">database</a>. Note that this method must only be called from within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②③">upgrade transaction</a>.</p> <p>This method synchronously modifies the <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-objectstorenames" id="ref-for-dom-idbdatabase-objectstorenames②">objectStoreNames</a></code> property on the <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase⑥">IDBDatabase</a></code> instance on which it was called.</p> <p>In some implementations it is possible for the implementation to run into problems after queuing a task to create the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥③">object store</a> after the <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-createobjectstore" id="ref-for-dom-idbdatabase-createobjectstore②">createObjectStore()</a></code> method has returned. For example in implementations where metadata about the newly created <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥④">object store</a> is inserted into the database asynchronously, or where the implementation might need to ask the user for permission for quota reasons. Such implementations must still create and return an <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore④">IDBObjectStore</a></code> object, and once the implementation determines that creating the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥⑤">object store</a> has failed, it must abort the transaction using the steps to <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction①">abort a transaction</a> using the appropriate error. For example if creating the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥⑥">object store</a> failed due to quota reasons, a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#quotaexceedederror" id="ref-for-quotaexceedederror①">QuotaExceededError</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> must be used as error.</p> <div class="algorithm" data-algorithm="deleteObjectStore(name)" data-algorithm-for="IDBDatabase"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="method" data-export id="dom-idbdatabase-deleteobjectstore"><code>deleteObjectStore(<var>name</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>database</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤">this</a>'s associated <a data-link-type="dfn" href="#database" id="ref-for-database④⑨">database</a>.</p> <li data-md> <p>Let <var>transaction</var> be <var>database</var>’s <a data-link-type="dfn" href="#database-upgrade-transaction" id="ref-for-database-upgrade-transaction①">upgrade transaction</a> if it is not null, or <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①④">throw</a> 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> otherwise.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑧">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active⑥">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⑤">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②">TransactionInactiveError</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>Let <var>store</var> be the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥⑦">object store</a> <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name⑥">named</a> <var>name</var> in <var>database</var>, or <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⑥">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notfounderror" id="ref-for-notfounderror①">NotFoundError</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> if none.</p> <li data-md> <p>Remove <var>store</var> from <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥">this</a>'s <a data-link-type="dfn" href="#connection-object-store-set" id="ref-for-connection-object-store-set①">object store set</a>.</p> <li data-md> <p>If there is an <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle⑧">object store handle</a> associated with <var>store</var> and <var>transaction</var>, remove all entries from its <a data-link-type="dfn" href="#object-store-handle-index-set" id="ref-for-object-store-handle-index-set">index set</a>.</p> <li data-md> <p>Destroy <var>store</var>.</p> </ol> </div> <p>This method destroys the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥⑧">object store</a> with the given name in the <a data-link-type="dfn" href="#connection" id="ref-for-connection④④">connected</a> <a data-link-type="dfn" href="#database" id="ref-for-database⑤⓪">database</a>. Note that this method must only be called from within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②④">upgrade transaction</a>.</p> <p>This method synchronously modifies the <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-objectstorenames" id="ref-for-dom-idbdatabase-objectstorenames③">objectStoreNames</a></code> property on the <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase⑦">IDBDatabase</a></code> instance on which it was called.</p> <div class="domintro note" role="note"> <dl> <dt data-md><var>transaction</var> = <var>connection</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-transaction" id="ref-for-dom-idbdatabase-transaction③">transaction</a></code>(<var>scope</var> [, <var>mode</var> [, <var>options</var> ] ]) <dd data-md> <p>Returns a new <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④⑥">transaction</a> with the given <var>scope</var> (which can be a single <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑥⑨">object store</a> <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name⑦">name</a> or an array of <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name⑧">names</a>), <var>mode</var> ("<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readonly" id="ref-for-dom-idbtransactionmode-readonly②">readonly</a></code>" or "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readwrite" id="ref-for-dom-idbtransactionmode-readwrite③">readwrite</a></code>"), and additional <var>options</var> including <code class="idl"><a data-link-type="idl" href="#dom-idbtransactionoptions-durability" id="ref-for-dom-idbtransactionoptions-durability">durability</a></code> ("<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-default" id="ref-for-dom-idbtransactiondurability-default①">default</a></code>", "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-strict" id="ref-for-dom-idbtransactiondurability-strict③">strict</a></code>" or "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-relaxed" id="ref-for-dom-idbtransactiondurability-relaxed②">relaxed</a></code>").</p> <p>The default <var>mode</var> is "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readonly" id="ref-for-dom-idbtransactionmode-readonly③">readonly</a></code>" and the default <code class="idl"><a data-link-type="idl" href="#dom-idbtransactionoptions-durability" id="ref-for-dom-idbtransactionoptions-durability①">durability</a></code> is "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-default" id="ref-for-dom-idbtransactiondurability-default②">default</a></code>".</p> <dt data-md><var>connection</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-close" id="ref-for-dom-idbdatabase-close②">close</a></code>() <dd data-md> <p>Closes the <a data-link-type="dfn" href="#connection" id="ref-for-connection④⑤">connection</a> once all running <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④⑦">transactions</a> have finished.</p> </dl> </div> <div class="algorithm" data-algorithm="transaction(storeNames, mode, options)" data-algorithm-for="IDBDatabase"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="method" data-export data-lt="transaction(storeNames, mode, options)|transaction(storeNames, mode)|transaction(storeNames)" id="dom-idbdatabase-transaction"><code>transaction(<var>storeNames</var>, <var>mode</var>, <var>options</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>If a <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live①①">live</a> <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②⑤">upgrade transaction</a> is associated with the <a data-link-type="dfn" href="#connection" id="ref-for-connection④⑥">connection</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⑦">throw</a> 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>.</p> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑦">this</a>'s <a data-link-type="dfn" href="#connection-close-pending-flag" id="ref-for-connection-close-pending-flag③">close pending flag</a> is true, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⑧">throw</a> 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>.</p> <li data-md> <p>Let <var>scope</var> be the set of unique strings in <var>storeNames</var> if it is a sequence, or a set containing one string equal to <var>storeNames</var> otherwise.</p> <li data-md> <p>If any string in <var>scope</var> is not the name of an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦⓪">object store</a> in the <a data-link-type="dfn" href="#connection" id="ref-for-connection④⑦">connected</a> <a data-link-type="dfn" href="#database" id="ref-for-database⑤①">database</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⑨">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notfounderror" id="ref-for-notfounderror②">NotFoundError</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>scope</var> is empty, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②⓪">throw</a> an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidaccesserror" id="ref-for-invalidaccesserror②">InvalidAccessError</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>mode</var> is not "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readonly" id="ref-for-dom-idbtransactionmode-readonly④">readonly</a></code>" or "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readwrite" id="ref-for-dom-idbtransactionmode-readwrite④">readwrite</a></code>", <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②①">throw</a> 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>.</p> <li data-md> <p>Let <var>transaction</var> be a newly <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created⑥">created</a> <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④⑧">transaction</a> with this <a data-link-type="dfn" href="#connection" id="ref-for-connection④⑧">connection</a>, <var>mode</var>, <var>options</var>’ <code class="idl"><a data-link-type="idl" href="#dom-idbtransactionoptions-durability" id="ref-for-dom-idbtransactionoptions-durability②">durability</a></code> member, and the set of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦①">object stores</a> named in <var>scope</var>.</p> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-cleanup-event-loop" id="ref-for-transaction-cleanup-event-loop③">cleanup event loop</a> to the current <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop" id="ref-for-event-loop⑤">event loop</a>.</p> <li data-md> <p>Return an <code class="idl"><a data-link-type="idl" href="#idbtransaction" id="ref-for-idbtransaction③">IDBTransaction</a></code> object representing <var>transaction</var>.</p> </ol> </div> <div class="advisement"> 🚧 The <code class="idl"><a data-link-type="idl" href="#dom-idbtransactionoptions-durability" id="ref-for-dom-idbtransactionoptions-durability③">durability</a></code> option is new in this edition. It is supported in Chrome 82, Edge 82, Firefox 126, and Safari 15. 🚧 </div> <p class="note" role="note"><span class="marker">NOTE:</span> The created <var>transaction</var> will follow the <a data-link-type="dfn" href="#transaction-lifetime" id="ref-for-transaction-lifetime">lifetime</a> rules.</p> <div class="algorithm" data-algorithm="close()" data-algorithm-for="IDBDatabase"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="method" data-export id="dom-idbdatabase-close"><code>close()</code></dfn> method steps are:</p> <ol> <li data-md> <p>Run <a data-link-type="dfn" href="#close-a-database-connection" id="ref-for-close-a-database-connection③">close a database connection</a> with this <a data-link-type="dfn" href="#connection" id="ref-for-connection④⑨">connection</a>.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> The <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤⓪">connection</a> will not actually <a data-link-type="dfn" href="#connection-closed" id="ref-for-connection-closed④">close</a> until all outstanding <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept④⑨">transactions</a> have completed. Subsequent calls to <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-close" id="ref-for-dom-idbdatabase-close③">close()</a></code> will have no effect.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="attribute" data-export id="dom-idbdatabase-onabort"><code>onabort</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type④">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbtransaction-abort" id="ref-for-eventdef-idbtransaction-abort①">abort</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="attribute" data-export id="dom-idbdatabase-onclose"><code>onclose</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type⑤">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-close" id="ref-for-eventdef-idbdatabase-close">close</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="attribute" data-export id="dom-idbdatabase-onerror"><code>onerror</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type⑥">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error⑥">error</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBDatabase" data-dfn-type="attribute" data-export id="dom-idbdatabase-onversionchange"><code>onversionchange</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type⑦">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange⑦">versionchange</a></code>.</p> <h3 class="heading settled" data-level="4.5" id="object-store-interface"><span class="secno">4.5. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore⑤">IDBObjectStore</a></code> interface</span><a class="self-link" href="#object-store-interface"></a></h3> <p>The <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore⑥">IDBObjectStore</a></code> interface represents an <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle⑨">object store handle</a>.</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbobjectstore"><code><c- g>IDBObjectStore</c-></code></dfn> { <c- b>attribute</c-> <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-type="DOMString" href="#dom-idbobjectstore-name" id="ref-for-dom-idbobjectstore-name"><c- g>name</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-any" id="ref-for-idl-any③"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbobjectstore-keypath" id="ref-for-dom-idbobjectstore-keypath"><c- g>keyPath</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist" id="ref-for-domstringlist③"><c- n>DOMStringList</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMStringList" href="#dom-idbobjectstore-indexnames" id="ref-for-dom-idbobjectstore-indexnames"><c- g>indexNames</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="#idbtransaction" id="ref-for-idbtransaction④"><c- n>IDBTransaction</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBTransaction" href="#dom-idbobjectstore-transaction" id="ref-for-dom-idbobjectstore-transaction"><c- g>transaction</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-idbobjectstore-autoincrement" id="ref-for-dom-idbobjectstore-autoincrement"><c- g>autoIncrement</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="#idbrequest" id="ref-for-idbrequest⑥"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-put" id="ref-for-dom-idbobjectstore-put"><c- g>put</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any④"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/put(value, key), IDBObjectStore/put(value)" data-dfn-type="argument" data-export id="dom-idbobjectstore-put-value-key-value"><code><c- g>value</c-></code></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any⑤"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/put(value, key), IDBObjectStore/put(value)" data-dfn-type="argument" data-export id="dom-idbobjectstore-put-value-key-key"><code><c- g>key</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest⑦"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-add" id="ref-for-dom-idbobjectstore-add"><c- g>add</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any⑥"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/add(value, key), IDBObjectStore/add(value)" data-dfn-type="argument" data-export id="dom-idbobjectstore-add-value-key-value"><code><c- g>value</c-></code></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any⑦"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/add(value, key), IDBObjectStore/add(value)" data-dfn-type="argument" data-export id="dom-idbobjectstore-add-value-key-key"><code><c- g>key</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest⑧"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-delete" id="ref-for-dom-idbobjectstore-delete"><c- g>delete</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any⑧"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/delete(query)" data-dfn-type="argument" data-export id="dom-idbobjectstore-delete-query-query"><code><c- g>query</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest⑨"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-clear" id="ref-for-dom-idbobjectstore-clear②"><c- g>clear</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="#idbrequest" id="ref-for-idbrequest①⓪"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-get" id="ref-for-dom-idbobjectstore-get"><c- g>get</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any⑨"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/get(query)" data-dfn-type="argument" data-export id="dom-idbobjectstore-get-query-query"><code><c- g>query</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest①①"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-getkey" id="ref-for-dom-idbobjectstore-getkey"><c- g>getKey</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①⓪"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/getKey(query)" data-dfn-type="argument" data-export id="dom-idbobjectstore-getkey-query-query"><code><c- g>query</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest①②"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-getall" id="ref-for-dom-idbobjectstore-getall"><c- g>getAll</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①①"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/getAll(query, count), IDBObjectStore/getAll(query), IDBObjectStore/getAll()" data-dfn-type="argument" data-export id="dom-idbobjectstore-getall-query-count-query"><code><c- g>query</c-></code></dfn>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange①"><c- g>EnforceRange</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="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/getAll(query, count), IDBObjectStore/getAll(query), IDBObjectStore/getAll()" data-dfn-type="argument" data-export id="dom-idbobjectstore-getall-query-count-count"><code><c- g>count</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest①③"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-getallkeys" id="ref-for-dom-idbobjectstore-getallkeys"><c- g>getAllKeys</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①②"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/getAllKeys(query, count), IDBObjectStore/getAllKeys(query), IDBObjectStore/getAllKeys()" data-dfn-type="argument" data-export id="dom-idbobjectstore-getallkeys-query-count-query"><code><c- g>query</c-></code></dfn>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange②"><c- g>EnforceRange</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="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/getAllKeys(query, count), IDBObjectStore/getAllKeys(query), IDBObjectStore/getAllKeys()" data-dfn-type="argument" data-export id="dom-idbobjectstore-getallkeys-query-count-count"><code><c- g>count</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest①④"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-count" id="ref-for-dom-idbobjectstore-count"><c- g>count</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①③"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/count(query), IDBObjectStore/count()" data-dfn-type="argument" data-export id="dom-idbobjectstore-count-query-query"><code><c- g>query</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest①⑤"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-opencursor" id="ref-for-dom-idbobjectstore-opencursor"><c- g>openCursor</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①④"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/openCursor(query, direction), IDBObjectStore/openCursor(query), IDBObjectStore/openCursor()" data-dfn-type="argument" data-export id="dom-idbobjectstore-opencursor-query-direction-query"><code><c- g>query</c-></code></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection" id="ref-for-enumdef-idbcursordirection"><c- n>IDBCursorDirection</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/openCursor(query, direction), IDBObjectStore/openCursor(query), IDBObjectStore/openCursor()" data-dfn-type="argument" data-export id="dom-idbobjectstore-opencursor-query-direction-direction"><code><c- g>direction</c-></code></dfn> = "next"); [<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="#idbrequest" id="ref-for-idbrequest①⑥"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-openkeycursor" id="ref-for-dom-idbobjectstore-openkeycursor"><c- g>openKeyCursor</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①⑤"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/openKeyCursor(query, direction), IDBObjectStore/openKeyCursor(query), IDBObjectStore/openKeyCursor()" data-dfn-type="argument" data-export id="dom-idbobjectstore-openkeycursor-query-direction-query"><code><c- g>query</c-></code></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection" id="ref-for-enumdef-idbcursordirection①"><c- n>IDBCursorDirection</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/openKeyCursor(query, direction), IDBObjectStore/openKeyCursor(query), IDBObjectStore/openKeyCursor()" data-dfn-type="argument" data-export id="dom-idbobjectstore-openkeycursor-query-direction-direction"><code><c- g>direction</c-></code></dfn> = "next"); <a data-link-type="idl-name" href="#idbindex" id="ref-for-idbindex②"><c- n>IDBIndex</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-index" id="ref-for-dom-idbobjectstore-index"><c- g>index</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="IDBObjectStore/index(name)" data-dfn-type="argument" data-export id="dom-idbobjectstore-index-name-name"><code><c- g>name</c-></code></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 data-link-type="idl-name" href="#idbindex" id="ref-for-idbindex③"><c- n>IDBIndex</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-createindex" id="ref-for-dom-idbobjectstore-createindex"><c- g>createIndex</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="IDBObjectStore/createIndex(name, keyPath, options), IDBObjectStore/createIndex(name, keyPath)" data-dfn-type="argument" data-export id="dom-idbobjectstore-createindex-name-keypath-options-name"><code><c- g>name</c-></code></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> <c- b>or</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 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="IDBObjectStore/createIndex(name, keyPath, options), IDBObjectStore/createIndex(name, keyPath)" data-dfn-type="argument" data-export id="dom-idbobjectstore-createindex-name-keypath-options-keypath"><code><c- g>keyPath</c-></code></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-idbindexparameters" id="ref-for-dictdef-idbindexparameters"><c- n>IDBIndexParameters</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore/createIndex(name, keyPath, options), IDBObjectStore/createIndex(name, keyPath)" data-dfn-type="argument" data-export id="dom-idbobjectstore-createindex-name-keypath-options-options"><code><c- g>options</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 class="idl-code" data-link-type="method" href="#dom-idbobjectstore-deleteindex" id="ref-for-dom-idbobjectstore-deleteindex"><c- g>deleteIndex</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="IDBObjectStore/deleteIndex(name)" data-dfn-type="argument" data-export id="dom-idbobjectstore-deleteindex-name-name"><code><c- g>name</c-></code></dfn>); }; <c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-idbindexparameters"><code><c- g>IDBIndexParameters</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="false" data-dfn-for="IDBIndexParameters" data-dfn-type="dict-member" data-export data-type="boolean" id="dom-idbindexparameters-unique"><code><c- g>unique</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="false" data-dfn-for="IDBIndexParameters" data-dfn-type="dict-member" data-export data-type="boolean" id="dom-idbindexparameters-multientry"><code><c- g>multiEntry</c-></code></dfn> = <c- b>false</c->; }; </pre> <div class="domintro note" role="note"> <dl> <dt data-md><var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-name" id="ref-for-dom-idbobjectstore-name①">name</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name⑨">name</a> of the store.</p> <dt data-md><var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-name" id="ref-for-dom-idbobjectstore-name②">name</a></code> = <var>newName</var> <dd data-md> <p>Updates the <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①⓪">name</a> of the store to <var>newName</var>.</p> <p>Throws "<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> if not called within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②⑥">upgrade transaction</a>.</p> <dt data-md><var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-keypath" id="ref-for-dom-idbobjectstore-keypath①">keyPath</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①①">key path</a> of the store, or null if none.</p> <dt data-md><var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-indexnames" id="ref-for-dom-idbobjectstore-indexnames①">indexNames</a></code> <dd data-md> <p>Returns a list of the names of indexes in the store.</p> <dt data-md><var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-transaction" id="ref-for-dom-idbobjectstore-transaction①">transaction</a></code> <dd data-md> <p>Returns the associated <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤⓪">transaction</a>.</p> <dt data-md><var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-autoincrement" id="ref-for-dom-idbobjectstore-autoincrement①">autoIncrement</a></code> <dd data-md> <p>Returns true if the store has a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①④">key generator</a>, and false otherwise.</p> </dl> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="attribute" data-export id="dom-idbobjectstore-name"><code>name</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑧">this</a>'s <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①①">name</a>.</p> <details class="note"> <summary> Is this the same as the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦②">object store</a>'s <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①②">name</a>? </summary> As long as the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤①">transaction</a> has not <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished⑧">finished</a>, this is the same as the associated <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦③">object store</a>'s <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①③">name</a>. But once the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤②">transaction</a> has <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished⑨">finished</a>, this attribute will not reflect changes made with a later <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②⑦">upgrade transaction</a>. </details> <div class="algorithm" data-algorithm="IDBObjectStore name setter"> <p>The <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-name" id="ref-for-dom-idbobjectstore-name③">name</a></code> setter steps are:</p> <ol> <li data-md> <p>Let <var>name</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#the-given-value" id="ref-for-the-given-value">the given value</a>.</p> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑨">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction①">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②⓪">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store②">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②②">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var> is not an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②⑧">upgrade transaction</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②③">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑨">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active⑦">active</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②④">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror③">TransactionInactiveError</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>store</var>’s <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①④">name</a> is equal to <var>name</var>, terminate these steps.</p> <li data-md> <p>If an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦④">object store</a> <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①⑤">named</a> <var>name</var> already exists in <var>store</var>’s <a data-link-type="dfn" href="#database" id="ref-for-database⑤②">database</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②⑤">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror③">ConstraintError</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>Set <var>store</var>’s <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①⑥">name</a> to <var>name</var>.</p> <li data-md> <p>Set <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②①">this</a>'s <a data-link-type="dfn" href="#object-store-handle-name" id="ref-for-object-store-handle-name">name</a> to <var>name</var>.</p> </ol> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="attribute" data-export id="dom-idbobjectstore-keypath"><code>keyPath</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②②">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store③">object store</a>'s <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①②">key path</a>, or null if none. The <a data-link-type="dfn" href="#key-path" id="ref-for-key-path①">key path</a> is converted as a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString①⑨">DOMString</a></code> (if a string) or a <code><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence④">sequence</a><<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString②⓪">DOMString</a></code>></code> (if a list of strings), per <a data-link-type="biblio" href="#biblio-webidl" title="Web IDL Standard">[WEBIDL]</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The returned value is not the same instance that was used when the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦⑤">object store</a> was created. However, if this attribute returns an object (specifically an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects④">Array</a></code>), it returns the same object instance every time it is inspected. Changing the properties of the object has no effect on the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦⑥">object store</a>.</p> <div class="algorithm" data-algorithm="indexNames" data-algorithm-for="IDBObjectStore"> The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="attribute" data-export id="dom-idbobjectstore-indexnames"><code>indexNames</code></dfn> getter steps are: <ol> <li data-md> <p>Let <var>names</var> be a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list④">list</a> of the <a data-link-type="dfn" href="#index-name" id="ref-for-index-name①">names</a> of the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept①⑨">indexes</a> in <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②③">this</a>'s <a data-link-type="dfn" href="#object-store-handle-index-set" id="ref-for-object-store-handle-index-set①">index set</a>.</p> <li data-md> <p>Return the result (a <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist" id="ref-for-domstringlist④">DOMStringList</a></code>) of <a data-link-type="dfn" href="#create-a-sorted-name-list" id="ref-for-create-a-sorted-name-list①">creating a sorted name list</a> with <var>names</var>.</p> </ol> </div> <details class="note"> <summary> Is this the same as <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦⑦">object store</a>'s list of <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②⓪">index</a> <a data-link-type="dfn" href="#index-name" id="ref-for-index-name②">names</a>? </summary> As long as the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤③">transaction</a> has not <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①⓪">finished</a>, this is the same as the associated <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦⑧">object store</a>'s list of <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②①">index</a> <a data-link-type="dfn" href="#index-name" id="ref-for-index-name③">names</a>. But once the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤④">transaction</a> has <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①①">finished</a>, this attribute will not reflect changes made with a later <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction②⑨">upgrade transaction</a>. </details> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="attribute" data-export id="dom-idbobjectstore-transaction"><code>transaction</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②④">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction②">transaction</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="attribute" data-export id="dom-idbobjectstore-autoincrement"><code>autoIncrement</code></dfn> getter steps are to return true if <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②⑤">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store④">object store</a> has a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①⑤">key generator</a>, and false otherwise.</p> <div class="domintro note" role="note"> The following methods throw a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#readonlyerror" id="ref-for-readonlyerror①">ReadOnlyError</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> if called within a <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction④">read-only transaction</a>, and a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror④">TransactionInactiveError</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> if called when the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤⑤">transaction</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active⑧">active</a>. <dl> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-put" id="ref-for-dom-idbobjectstore-put①">put</a></code>(<var>value</var> [, <var>key</var>]) <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-add" id="ref-for-dom-idbobjectstore-add①">add</a></code>(<var>value</var> [, <var>key</var>]) <dd data-md> <p>Adds or updates a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②④">record</a> in <var>store</var> with the given <var>value</var> and <var>key</var>.</p> <p>If the store uses <a data-link-type="dfn" href="#object-store-in-line-keys" id="ref-for-object-store-in-line-keys①">in-line keys</a> and <var>key</var> is specified a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror⑥">DataError</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> will be thrown.</p> <p>If <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-put" id="ref-for-dom-idbobjectstore-put②">put()</a></code> is used, any existing <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②⑤">record</a> with the <a data-link-type="dfn" href="#key" id="ref-for-key④③">key</a> will be replaced. If <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-add" id="ref-for-dom-idbobjectstore-add②">add()</a></code> is used, and if a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②⑥">record</a> with the <a data-link-type="dfn" href="#key" id="ref-for-key④④">key</a> already exists the <var>request</var> will fail, with <var>request</var>’s <code class="idl"><a class="idl-code" data-link-type="attribute" href="#dom-idbrequest-error" id="ref-for-dom-idbrequest-error②">error</a></code> set to a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror④">ConstraintError</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> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result⑤">result</a></code> will be the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②⑦">record</a>'s <a data-link-type="dfn" href="#key" id="ref-for-key④⑤">key</a>.</p> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-delete" id="ref-for-dom-idbobjectstore-delete①">delete</a></code>(<var>query</var>) <dd data-md> <p>Deletes <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②⑧">records</a> in <var>store</var> with the given <a data-link-type="dfn" href="#key" id="ref-for-key④⑥">key</a> or in the given <a data-link-type="dfn" href="#key-range" id="ref-for-key-range①⑨">key range</a> in <var>query</var>.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result⑥">result</a></code> will be <code>undefined</code>.</p> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-clear" id="ref-for-dom-idbobjectstore-clear③">clear</a></code>() <dd data-md> <p>Deletes all <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record②⑨">records</a> in <var>store</var>.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result⑦">result</a></code> will be <code>undefined</code>.</p> </dl> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export data-lt="put(value, key)|put(value)" id="dom-idbobjectstore-put"><code>put(<var>value</var>, <var>key</var>)</code></dfn> method steps are to return the result of running <a data-link-type="dfn" href="#add-or-put" id="ref-for-add-or-put">add or put</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②⑥">this</a>, <var>value</var>, <var>key</var> and the <var>no-overwrite flag</var> false.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export data-lt="add(value, key)|add(value)" id="dom-idbobjectstore-add"><code>add(<var>value</var>, <var>key</var>)</code></dfn> method steps are to return the result of running <a data-link-type="dfn" href="#add-or-put" id="ref-for-add-or-put①">add or put</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②⑦">this</a>, <var>value</var>, <var>key</var> and the <var>no-overwrite flag</var> true.</p> <div class="algorithm" data-algorithm="add or put"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="add-or-put">add or put</dfn> with <var>handle</var>, <var>value</var>, <var>key</var>, and <var>no-overwrite flag</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <var>handle</var>’s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction③">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <var>handle</var>’s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store⑤">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②⑥">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①⓪">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active⑨">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②⑦">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror⑤">TransactionInactiveError</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>transaction</var> is a <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction⑤">read-only transaction</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②⑧">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#readonlyerror" id="ref-for-readonlyerror②">ReadOnlyError</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>store</var> uses <a data-link-type="dfn" href="#object-store-in-line-keys" id="ref-for-object-store-in-line-keys②">in-line keys</a> and <var>key</var> was given, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw②⑨">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror⑦">DataError</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>store</var> uses <a data-link-type="dfn" href="#object-store-out-of-line-keys" id="ref-for-object-store-out-of-line-keys①">out-of-line keys</a> and has no <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①⑥">key generator</a> and <var>key</var> was not given, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③⓪">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror⑧">DataError</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>key</var> was given, then:</p> <ol> <li data-md> <p>Let <var>r</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key④">converting a value to a key</a> with <var>key</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>r</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③①">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror⑨">DataError</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>Let <var>key</var> be <var>r</var>.</p> </ol> <li data-md> <p>Let <var>targetRealm</var> be a user-agent defined <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#realm" id="ref-for-realm">Realm</a>.</p> <li data-md> <p>Let <var>clone</var> be a <a data-link-type="dfn" href="#clone" id="ref-for-clone">clone</a> of <var>value</var> in <var>targetRealm</var> during <var>transaction</var>. Rethrow any exceptions.</p> <details class="note"> <summary>Why create a copy of the value?</summary> The value is serialized when stored. Treating it as a copy here allows other algorithms in this specification to treat it as an ECMAScript value, but implementations can optimize this if the difference in behavior is not observable. </details> <li data-md> <p>If <var>store</var> uses <a data-link-type="dfn" href="#object-store-in-line-keys" id="ref-for-object-store-in-line-keys③">in-line keys</a>, then:</p> <ol> <li data-md> <p>Let <var>kpk</var> be the result of <a data-link-type="dfn" href="#extract-a-key-from-a-value-using-a-key-path" id="ref-for-extract-a-key-from-a-value-using-a-key-path①">extracting a key from a value using a key path</a> with <var>clone</var> and <var>store</var>’s <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①③">key path</a>. Rethrow any exceptions.</p> <li data-md> <p>If <var>kpk</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③②">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①⓪">DataError</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>kpk</var> is not failure, let <var>key</var> be <var>kpk</var>.</p> <li data-md> <p>Otherwise (<var>kpk</var> is failure):</p> <ol> <li data-md> <p>If <var>store</var> does not have a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①⑦">key generator</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③③">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①①">DataError</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>Otherwise, if <a data-link-type="dfn" href="#check-that-a-key-could-be-injected-into-a-value" id="ref-for-check-that-a-key-could-be-injected-into-a-value">check that a key could be injected into a value</a> with <var>clone</var> and <var>store</var>’s <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①④">key path</a> return false, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③④">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①②">DataError</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> </ol> </ol> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#store-a-record-into-an-object-store" id="ref-for-store-a-record-into-an-object-store">store a record into an object store</a> with <var>store</var>, <var>clone</var>, <var>key</var>, and <var>no-overwrite flag</var>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest①⑦">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①">asynchronously execute a request</a> with <var>handle</var> and <var>operation</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="delete(query)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export id="dom-idbobjectstore-delete"><code>delete(<var>query</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②⑧">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction④">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this②⑨">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store⑥">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③⑤">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①①">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①⓪">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③⑥">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror⑥">TransactionInactiveError</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>transaction</var> is a <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction⑥">read-only transaction</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③⑦">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#readonlyerror" id="ref-for-readonlyerror③">ReadOnlyError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range">converting a value to a key range</a> with <var>query</var> and true. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#delete-records-from-an-object-store" id="ref-for-delete-records-from-an-object-store">delete records from an object store</a> with <var>store</var> and <var>range</var>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest①⑧">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request②">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③⓪">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key④⑦">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②⓪">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③⓪">records</a> to be deleted.</p> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Unlike other methods which take keys or key ranges, this method does <strong>not</strong> allow null to be given as key. This is to reduce the risk that a small bug would clear a whole object store.</p> <div class="algorithm" data-algorithm="clear()" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export id="dom-idbobjectstore-clear"><code>clear()</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③①">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction⑤">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③②">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store⑦">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③⑧">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①②">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①①">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw③⑨">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror⑦">TransactionInactiveError</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>transaction</var> is a <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction⑦">read-only transaction</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④⓪">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#readonlyerror" id="ref-for-readonlyerror④">ReadOnlyError</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>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#clear-an-object-store" id="ref-for-clear-an-object-store">clear an object store</a> with <var>store</var>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest①⑨">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request③">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③③">this</a> and <var>operation</var>.</p> </ol> </div> <div class="domintro note" role="note"> The following methods throw a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror⑧">TransactionInactiveError</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> if called when the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤⑥">transaction</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①②">active</a>. <dl> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-get" id="ref-for-dom-idbobjectstore-get①">get</a></code>(<var>query</var>) <dd data-md> <p>Retrieves the <a data-link-type="dfn" href="#value" id="ref-for-value①⓪">value</a> of the first <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③①">record</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key④⑧">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②①">key range</a> in <var>query</var>.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result⑧">result</a></code> will be the <a data-link-type="dfn" href="#value" id="ref-for-value①①">value</a>, or <code>undefined</code> if there was no matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③②">record</a>.</p> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-getkey" id="ref-for-dom-idbobjectstore-getkey①">getKey</a></code>(<var>query</var>) <dd data-md> <p>Retrieves the <a data-link-type="dfn" href="#key" id="ref-for-key④⑨">key</a> of the first <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③③">record</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key⑤⓪">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②②">key range</a> in <var>query</var>.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result⑨">result</a></code> will be the <a data-link-type="dfn" href="#key" id="ref-for-key⑤①">key</a>, or <code>undefined</code> if there was no matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③④">record</a>.</p> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-getall" id="ref-for-dom-idbobjectstore-getall①">getAll</a></code>(<var>query</var> [, <var>count</var>]) <dd data-md> <p>Retrieves the <a data-link-type="dfn" href="#value" id="ref-for-value①②">values</a> of the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③⑤">records</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key⑤②">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②③">key range</a> in <var>query</var> (up to <var>count</var> if given).</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①⓪">result</a></code> will be an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects⑤">Array</a></code> of the <a data-link-type="dfn" href="#value" id="ref-for-value①③">values</a>.</p> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-getallkeys" id="ref-for-dom-idbobjectstore-getallkeys①">getAllKeys</a></code>(<var>query</var> [, <var>count</var>]) <dd data-md> <p>Retrieves the <a data-link-type="dfn" href="#key" id="ref-for-key⑤③">keys</a> of <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③⑥">records</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key⑤④">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②④">key range</a> in <var>query</var> (up to <var>count</var> if given).</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①①">result</a></code> will be an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects⑥">Array</a></code> of the <a data-link-type="dfn" href="#key" id="ref-for-key⑤⑤">keys</a>.</p> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-count" id="ref-for-dom-idbobjectstore-count①">count</a></code>(<var>query</var>) <dd data-md> <p>Retrieves the number of <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③⑦">records</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key⑤⑥">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②⑤">key range</a> in <var>query</var>.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①②">result</a></code> will be the count.</p> </dl> </div> <div class="algorithm" data-algorithm="get(query)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export id="dom-idbobjectstore-get"><code>get(<var>query</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③④">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction⑥">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③⑤">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store⑧">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④①">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①③">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①③">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④②">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror⑨">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range①">converting a value to a key range</a> with <var>query</var> and true. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#retrieve-a-value-from-an-object-store" id="ref-for-retrieve-a-value-from-an-object-store">retrieve a value from an object store</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm">the current Realm record</a>, <var>store</var>, and <var>range</var>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest②⓪">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request④">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③⑥">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑤⑦">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②⑥">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange①">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③⑧">record</a> value to be retrieved. If a range is specified, the method retrieves the first existing value in that range.</p> </div> <p class="note" role="note"><span class="marker">NOTE:</span> This method produces the same result if a record with the given key doesn’t exist as when a record exists, but has <code>undefined</code> as value. If you need to tell the two situations apart, you can use <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-opencursor" id="ref-for-dom-idbobjectstore-opencursor①">openCursor()</a></code> with the same key. This will return a cursor with <code>undefined</code> as value if a record exists, or no cursor if no such record exists.</p> <div class="algorithm" data-algorithm="getKey(query)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export id="dom-idbobjectstore-getkey"><code>getKey(<var>query</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③⑦">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction⑦">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③⑧">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store⑨">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④③">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①④">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①④">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④④">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①⓪">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range②">converting a value to a key range</a> with <var>query</var> and true. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#retrieve-a-key-from-an-object-store" id="ref-for-retrieve-a-key-from-an-object-store">retrieve a key from an object store</a> with <var>store</var> and <var>range</var>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest②①">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request⑤">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this③⑨">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑤⑧">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②⑦">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange②">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record③⑨">record</a> key to be retrieved. If a range is specified, the method retrieves the first existing key in that range.</p> </div> <div class="algorithm" data-algorithm="getAll(query, count)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export data-lt="getAll(query, count)|getAll(query)|getAll()" id="dom-idbobjectstore-getall"><code>getAll(<var>query</var>, <var>count</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④⓪">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction⑧">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④①">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①⓪">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④⑤">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①⑤">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①⑤">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④⑥">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①①">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range③">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#retrieve-multiple-values-from-an-object-store" id="ref-for-retrieve-multiple-values-from-an-object-store">retrieve multiple values from an object store</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm①">the current Realm record</a>, <var>store</var>, <var>range</var>, and <var>count</var> if given.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest②②">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request⑥">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④②">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑤⑨">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②⑧">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange③">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④⓪">record</a> values to be retrieved. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range②">unbounded key range</a> is used. If <var>count</var> is specified and there are more than <var>count</var> records in range, only the first <var>count</var> will be retrieved.</p> </div> <div class="algorithm" data-algorithm="getAllKeys(query, count)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export data-lt="getAllKeys(query, count)|getAllKeys(query)|getAllKeys()" id="dom-idbobjectstore-getallkeys"><code>getAllKeys(<var>query</var>, <var>count</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④③">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction⑨">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④④">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①①">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④⑦">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①⑥">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①⑥">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④⑧">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①②">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range④">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#retrieve-multiple-keys-from-an-object-store" id="ref-for-retrieve-multiple-keys-from-an-object-store">retrieve multiple keys from an object store</a> with <var>store</var>, <var>range</var>, and <var>count</var> if given.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest②③">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request⑦">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④⑤">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑥⓪">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range②⑨">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange④">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④①">record</a> keys to be retrieved. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range③">unbounded key range</a> is used. If <var>count</var> is specified and there are more than <var>count</var> keys in range, only the first <var>count</var> will be retrieved.</p> </div> <div class="algorithm" data-algorithm="count(query)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export data-lt="count(query)|count()" id="dom-idbobjectstore-count"><code>count(<var>query</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④⑥">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction①⓪">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④⑦">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①②">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw④⑨">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①⑦">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①⑦">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤⓪">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①③">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range⑤">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#count-the-records-in-a-range" id="ref-for-count-the-records-in-a-range">count the records in a range</a> with <var>store</var> and <var>range</var>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest②④">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request⑧">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④⑧">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑥①">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③⓪">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange⑤">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④②">records</a> to be counted. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range④">unbounded key range</a> is used.</p> </div> <div class="domintro note" role="note"> The following methods throw a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①④">TransactionInactiveError</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> if called when the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤⑦">transaction</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①⑧">active</a>. <dl> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-opencursor" id="ref-for-dom-idbobjectstore-opencursor②">openCursor</a></code>([<var>query</var> [, <var>direction</var> = "next"]]) <dd data-md> <p>Opens a <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①⑥">cursor</a> over the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④③">records</a> matching <var>query</var>, ordered by <var>direction</var>. If <var>query</var> is null, all <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④④">records</a> in <var>store</var> are matched.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①③">result</a></code> will be an <code class="idl"><a data-link-type="idl" href="#idbcursorwithvalue" id="ref-for-idbcursorwithvalue">IDBCursorWithValue</a></code> pointing at the first matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④⑤">record</a>, or null if there were no matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④⑥">records</a>.</p> <dt data-md><var>request</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-openkeycursor" id="ref-for-dom-idbobjectstore-openkeycursor①">openKeyCursor</a></code>([<var>query</var> [, <var>direction</var> = "next"]]) <dd data-md> <p>Opens a <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①⑦">cursor</a> with <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag">key only flag</a> set to true over the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④⑦">records</a> matching <var>query</var>, ordered by <var>direction</var>. If <var>query</var> is null, all <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④⑧">records</a> in <var>store</var> are matched.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①④">result</a></code> will be an <code class="idl"><a data-link-type="idl" href="#idbcursor" id="ref-for-idbcursor②">IDBCursor</a></code> pointing at the first matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record④⑨">record</a>, or null if there were no matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤⓪">records</a>.</p> </dl> </div> <div class="algorithm" data-algorithm="openCursor(query, direction)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export data-lt="openCursor(query, direction)|openCursor(query)|openCursor()" id="dom-idbobjectstore-opencursor"><code>openCursor(<var>query</var>, <var>direction</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this④⑨">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction①①">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤⓪">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①③">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤①">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①⑧">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active①⑨">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤②">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①⑤">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range⑥">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>cursor</var> be a new <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①⑧">cursor</a> with its <a data-link-type="dfn" href="#cursor-transaction" id="ref-for-cursor-transaction">transaction</a> set to <var>transaction</var>, undefined <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position③">position</a>, <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction①">direction</a> set to <var>direction</var>, <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag">got value flag</a> set to false, undefined <a data-link-type="dfn" href="#cursor-key" id="ref-for-cursor-key">key</a> and <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value①">value</a>, <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source⑨">source</a> set to <var>store</var>, <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range②">range</a> set to <var>range</var>, and <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag①">key only flag</a> set to false.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#iterate-a-cursor" id="ref-for-iterate-a-cursor">iterate a cursor</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm②">the current Realm record</a> and <var>cursor</var>.</p> <li data-md> <p>Let <var>request</var> be the result of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request⑨">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤①">this</a> and <var>operation</var>.</p> <li data-md> <p>Set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-request" id="ref-for-cursor-request">request</a> to <var>request</var>.</p> <li data-md> <p>Return <var>request</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑥②">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③①">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange⑥">IDBKeyRange</a></code>) to use as the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor①⑨">cursor</a>'s <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range③">range</a>. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range⑤">unbounded key range</a> is used.</p> </div> <div class="algorithm" data-algorithm="openKeyCursor(query, direction)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export data-lt="openKeyCursor(query, direction)|openKeyCursor(query)|openKeyCursor()" id="dom-idbobjectstore-openkeycursor"><code>openKeyCursor(<var>query</var>, <var>direction</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤②">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction①②">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤③">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①④">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤③">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state①⑨">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②⓪">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤④">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①⑥">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range⑦">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>cursor</var> be a new <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②⓪">cursor</a> with its <a data-link-type="dfn" href="#cursor-transaction" id="ref-for-cursor-transaction①">transaction</a> set to <var>transaction</var>, undefined <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position④">position</a>, <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction②">direction</a> set to <var>direction</var>, <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag①">got value flag</a> set to false, undefined <a data-link-type="dfn" href="#cursor-key" id="ref-for-cursor-key①">key</a> and <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value②">value</a>, <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①⓪">source</a> set to <var>store</var>, <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range④">range</a> set to <var>range</var>, and <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag②">key only flag</a> set to true.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#iterate-a-cursor" id="ref-for-iterate-a-cursor①">iterate a cursor</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm③">the current Realm record</a> and <var>cursor</var>.</p> <li data-md> <p>Let <var>request</var> be the result of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①⓪">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤④">this</a> and <var>operation</var>.</p> <li data-md> <p>Set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-request" id="ref-for-cursor-request①">request</a> to <var>request</var>.</p> <li data-md> <p>Return <var>request</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑥③">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③②">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange⑦">IDBKeyRange</a></code>) to use as the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②①">cursor</a>'s <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range⑤">range</a>. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range⑥">unbounded key range</a> is used.</p> </div> <div class="domintro note" role="note"> <dl> <dt data-md><var>index</var> = <var>store</var> . index(<var>name</var>) <dd data-md> <p>Returns an <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex④">IDBIndex</a></code> for the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②②">index</a> named <var>name</var> in <var>store</var>.</p> <dt data-md><var>index</var> = <var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-createindex" id="ref-for-dom-idbobjectstore-createindex①">createIndex</a></code>(<var>name</var>, <var>keyPath</var> [, <var>options</var>]) <dd data-md> <p>Creates a new <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②③">index</a> in <var>store</var> with the given <var>name</var>, <var>keyPath</var> and <var>options</var> and returns a new <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex⑤">IDBIndex</a></code>. If the <var>keyPath</var> and <var>options</var> define constraints that cannot be satisfied with the data already in <var>store</var> the <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③⓪">upgrade transaction</a> will <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort⑤">abort</a> with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror⑤">ConstraintError</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> <p>Throws 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> if not called within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③①">upgrade transaction</a>.</p> <dt data-md><var>store</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-deleteindex" id="ref-for-dom-idbobjectstore-deleteindex①">deleteIndex</a></code>(<var>name</var>) <dd data-md> <p>Deletes the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②④">index</a> in <var>store</var> with the given <var>name</var>.</p> <p>Throws 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> if not called within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③②">upgrade transaction</a>.</p> </dl> </div> <div class="algorithm" data-algorithm="createIndex(name, keyPath, options)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export data-lt="createIndex(name, keyPath, options)|createIndex(name, keyPath)" id="dom-idbobjectstore-createindex"><code>createIndex(<var>name</var>, <var>keyPath</var>, <var>options</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤⑤">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction①③">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤⑥">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①⑤">object store</a>.</p> <li data-md> <p>If <var>transaction</var> is not an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③③">upgrade transaction</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤⑤">throw</a> 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>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤⑥">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②⓪">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②①">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤⑦">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①⑦">TransactionInactiveError</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 an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②⑤">index</a> <a data-link-type="dfn" href="#index-name" id="ref-for-index-name④">named</a> <var>name</var> already exists in <var>store</var>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤⑧">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror⑥">ConstraintError</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>keyPath</var> is not a <a data-link-type="dfn" href="#valid-key-path" id="ref-for-valid-key-path①">valid key path</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤⑨">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#syntaxerror" id="ref-for-syntaxerror②">SyntaxError</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>Let <var>unique</var> be <var>options</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbindexparameters-unique" id="ref-for-dom-idbindexparameters-unique①">unique</a></code> member.</p> <li data-md> <p>Let <var>multiEntry</var> be <var>options</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbindexparameters-multientry" id="ref-for-dom-idbindexparameters-multientry">multiEntry</a></code> member.</p> <li data-md> <p>If <var>keyPath</var> is a sequence and <var>multiEntry</var> is true, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥⓪">throw</a> an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidaccesserror" id="ref-for-invalidaccesserror③">InvalidAccessError</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>Let <var>index</var> be a new <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②⑥">index</a> in <var>store</var>. Set <var>index</var>’s <a data-link-type="dfn" href="#index-name" id="ref-for-index-name⑤">name</a> to <var>name</var>, <a data-link-type="dfn" href="#index-key-path" id="ref-for-index-key-path③">key path</a> to <var>keyPath</var>, <a data-link-type="dfn" href="#index-unique-flag" id="ref-for-index-unique-flag②">unique flag</a> to <var>unique</var>, and <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag②">multiEntry flag</a> to <var>multiEntry</var>.</p> <li data-md> <p>Add <var>index</var> to <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤⑦">this</a>'s <a data-link-type="dfn" href="#object-store-handle-index-set" id="ref-for-object-store-handle-index-set②">index set</a>.</p> <li data-md> <p>Return a new <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle⑤">index handle</a> associated with <var>index</var> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤⑧">this</a>.</p> </ol> </div> <p>This method creates and returns a new <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②⑦">index</a> with the given name in the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑦⑨">object store</a>. Note that this method must only be called from within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③④">upgrade transaction</a>.</p> <p>The index that is requested to be created can contain constraints on the data allowed in the index’s <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced⑥">referenced</a> object store, such as requiring uniqueness of the values referenced by the index’s <a data-link-type="dfn" href="#index-key-path" id="ref-for-index-key-path④">key path</a>. If the <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced⑦">referenced</a> object store already contains data which violates these constraints, this must not cause the implementation of <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-createindex" id="ref-for-dom-idbobjectstore-createindex②">createIndex()</a></code> to throw an exception or affect what it returns. The implementation must still create and return an <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex⑥">IDBIndex</a></code> object, and the implementation must <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 abort the <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③⑤">upgrade transaction</a> which was used for the <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-createindex" id="ref-for-dom-idbobjectstore-createindex③">createIndex()</a></code> call.</p> <p>This method synchronously modifies the <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-indexnames" id="ref-for-dom-idbobjectstore-indexnames②">indexNames</a></code> property on the <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore⑦">IDBObjectStore</a></code> instance on which it was called. Although this method does not return an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest②⑤">IDBRequest</a></code> object, the index creation itself is processed as an asynchronous request within the <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③⑥">upgrade transaction</a>.</p> <p>In some implementations it is possible for the implementation to asynchronously run into problems creating the index after the createIndex method has returned. For example in implementations where metadata about the newly created index is queued up to be inserted into the database asynchronously, or where the implementation might need to ask the user for permission for quota reasons. Such implementations must still create and return an <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex⑦">IDBIndex</a></code> object, and once the implementation determines that creating the index has failed, it must run the steps to <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction②">abort a transaction</a> using an appropriate error. For example if creating the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②⑧">index</a> failed due to quota reasons, a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#quotaexceedederror" id="ref-for-quotaexceedederror②">QuotaExceededError</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> must be used as error and if the index can’t be created due to <a data-link-type="dfn" href="#index-unique-flag" id="ref-for-index-unique-flag③">unique flag</a> constraints, a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror⑦">ConstraintError</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> must be used as error.</p> <div class="example" id="example-async-index-creation"> <a class="self-link" href="#example-async-index-creation"></a> <p>The asynchronous creation of indexes is observable in the following example:</p> <pre class="language-js highlight"><c- a>const</c-> request1 <c- o>=</c-> objectStore<c- p>.</c->put<c- p>({</c->name<c- o>:</c-> <c- u>"betty"</c-><c- p>},</c-> <c- mf>1</c-><c- p>);</c-> <c- a>const</c-> request2 <c- o>=</c-> objectStore<c- p>.</c->put<c- p>({</c->name<c- o>:</c-> <c- u>"betty"</c-><c- p>},</c-> <c- mf>2</c-><c- p>);</c-> <c- a>const</c-> index <c- o>=</c-> objectStore<c- p>.</c->createIndex<c- p>(</c-><c- u>"by_name"</c-><c- p>,</c-> <c- u>"name"</c-><c- p>,</c-> <c- p>{</c->unique<c- o>:</c-> <c- kc>true</c-><c- p>});</c-> </pre> <p>At the point where <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-createindex" id="ref-for-dom-idbobjectstore-createindex④">createIndex()</a></code> called, neither of the <a data-link-type="dfn" href="#request" id="ref-for-request②⑦">requests</a> have executed. When the second request executes, a duplicate name is created. Since the index creation is considered an asynchronous <a data-link-type="dfn" href="#request" id="ref-for-request②⑧">request</a>, the index’s <a data-link-type="dfn" href="#index-unique-flag" id="ref-for-index-unique-flag④">uniqueness constraint</a> does not cause the second <a data-link-type="dfn" href="#request" id="ref-for-request②⑨">request</a> to fail. Instead, the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤⑧">transaction</a> will be <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort⑥">aborted</a> when the index is created and the constraint fails.</p> </div> <div class="algorithm" data-algorithm="index(name)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export id="dom-idbobjectstore-index"><code>index(<var>name</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑤⑨">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction①④">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥⓪">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①⑥">object store</a>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥①">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②①">state</a> is <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①②">finished</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥②">throw</a> 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>.</p> <li data-md> <p>Let <var>index</var> be the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept②⑨">index</a> <a data-link-type="dfn" href="#index-name" id="ref-for-index-name⑥">named</a> <var>name</var> in <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥①">this</a>'s <a data-link-type="dfn" href="#object-store-handle-index-set" id="ref-for-object-store-handle-index-set③">index set</a> if one exists, or <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥③">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notfounderror" id="ref-for-notfounderror③">NotFoundError</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> otherwise.</p> <li data-md> <p>Return an <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle⑥">index handle</a> associated with <var>index</var> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥②">this</a>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> Each call to this method on the same <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore⑧">IDBObjectStore</a></code> instance with the same name returns the same <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex⑧">IDBIndex</a></code> instance.</p> </div> <p class="note" role="note"><span class="marker">NOTE:</span> The returned <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex⑨">IDBIndex</a></code> instance is specific to this <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore⑨">IDBObjectStore</a></code> instance. If this method is called on a different <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore①⓪">IDBObjectStore</a></code> instance with the same name, a different <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex①⓪">IDBIndex</a></code> instance is returned.</p> <div class="algorithm" data-algorithm="deleteIndex(name)" data-algorithm-for="IDBObjectStore"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBObjectStore" data-dfn-type="method" data-export id="dom-idbobjectstore-deleteindex"><code>deleteIndex(<var>name</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥③">this</a>'s <a data-link-type="dfn" href="#object-store-handle-transaction" id="ref-for-object-store-handle-transaction①⑤">transaction</a>.</p> <li data-md> <p>Let <var>store</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥④">this</a>'s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①⑦">object store</a>.</p> <li data-md> <p>If <var>transaction</var> is not an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③⑦">upgrade transaction</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥④">throw</a> 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>.</p> <li data-md> <p>If <var>store</var> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥⑤">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②②">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②②">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥⑥">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①⑧">TransactionInactiveError</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>Let <var>index</var> be the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③⓪">index</a> <a data-link-type="dfn" href="#index-name" id="ref-for-index-name⑦">named</a> <var>name</var> in <var>store</var> if one exists, or <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥⑦">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notfounderror" id="ref-for-notfounderror④">NotFoundError</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> otherwise.</p> <li data-md> <p>Remove <var>index</var> from <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥⑤">this</a>'s <a data-link-type="dfn" href="#object-store-handle-index-set" id="ref-for-object-store-handle-index-set④">index set</a>.</p> <li data-md> <p>Destroy <var>index</var>.</p> </ol> </div> <p>This method destroys the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③①">index</a> with the given name in the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧⓪">object store</a>. Note that this method must only be called from within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③⑧">upgrade transaction</a>.</p> <p>This method synchronously modifies the <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-indexnames" id="ref-for-dom-idbobjectstore-indexnames③">indexNames</a></code> property on the <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore①①">IDBObjectStore</a></code> instance on which it was called. Although this method does not return an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest②⑥">IDBRequest</a></code> object, the index destruction itself is processed as an asynchronous request within the <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction③⑨">upgrade transaction</a>.</p> <h3 class="heading settled" data-level="4.6" id="index-interface"><span class="secno">4.6. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex①①">IDBIndex</a></code> interface</span><a class="self-link" href="#index-interface"></a></h3> <p>The <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex①②">IDBIndex</a></code> interface represents an <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle⑦">index handle</a>.</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbindex"><code><c- g>IDBIndex</c-></code></dfn> { <c- b>attribute</c-> <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-type="DOMString" href="#dom-idbindex-name" id="ref-for-dom-idbindex-name"><c- g>name</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="#idbobjectstore" id="ref-for-idbobjectstore①②"><c- n>IDBObjectStore</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBObjectStore" href="#dom-idbindex-objectstore" id="ref-for-dom-idbindex-objectstore"><c- g>objectStore</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-any" id="ref-for-idl-any①⑥"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbindex-keypath" id="ref-for-dom-idbindex-keypath"><c- g>keyPath</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-idbindex-multientry" id="ref-for-dom-idbindex-multientry"><c- g>multiEntry</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-idbindex-unique" id="ref-for-dom-idbindex-unique"><c- g>unique</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="#idbrequest" id="ref-for-idbrequest②⑦"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-get" id="ref-for-dom-idbindex-get"><c- g>get</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①⑦"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex/get(query)" data-dfn-type="argument" data-export id="dom-idbindex-get-query-query"><code><c- g>query</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest②⑧"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-getkey" id="ref-for-dom-idbindex-getkey"><c- g>getKey</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①⑧"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex/getKey(query)" data-dfn-type="argument" data-export id="dom-idbindex-getkey-query-query"><code><c- g>query</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest②⑨"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-getall" id="ref-for-dom-idbindex-getall"><c- g>getAll</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any①⑨"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex/getAll(query, count), IDBIndex/getAll(query), IDBIndex/getAll()" data-dfn-type="argument" data-export id="dom-idbindex-getall-query-count-query"><code><c- g>query</c-></code></dfn>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange③"><c- g>EnforceRange</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="dfn-paneled idl-code" data-dfn-for="IDBIndex/getAll(query, count), IDBIndex/getAll(query), IDBIndex/getAll()" data-dfn-type="argument" data-export id="dom-idbindex-getall-query-count-count"><code><c- g>count</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest③⓪"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-getallkeys" id="ref-for-dom-idbindex-getallkeys"><c- g>getAllKeys</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②⓪"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex/getAllKeys(query, count), IDBIndex/getAllKeys(query), IDBIndex/getAllKeys()" data-dfn-type="argument" data-export id="dom-idbindex-getallkeys-query-count-query"><code><c- g>query</c-></code></dfn>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange④"><c- g>EnforceRange</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="dfn-paneled idl-code" data-dfn-for="IDBIndex/getAllKeys(query, count), IDBIndex/getAllKeys(query), IDBIndex/getAllKeys()" data-dfn-type="argument" data-export id="dom-idbindex-getallkeys-query-count-count"><code><c- g>count</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest③①"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-count" id="ref-for-dom-idbindex-count"><c- g>count</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②①"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex/count(query), IDBIndex/count()" data-dfn-type="argument" data-export id="dom-idbindex-count-query-query"><code><c- g>query</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest③②"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-opencursor" id="ref-for-dom-idbindex-opencursor"><c- g>openCursor</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②②"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex/openCursor(query, direction), IDBIndex/openCursor(query), IDBIndex/openCursor()" data-dfn-type="argument" data-export id="dom-idbindex-opencursor-query-direction-query"><code><c- g>query</c-></code></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection" id="ref-for-enumdef-idbcursordirection②"><c- n>IDBCursorDirection</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex/openCursor(query, direction), IDBIndex/openCursor(query), IDBIndex/openCursor()" data-dfn-type="argument" data-export id="dom-idbindex-opencursor-query-direction-direction"><code><c- g>direction</c-></code></dfn> = "next"); [<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="#idbrequest" id="ref-for-idbrequest③③"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-openkeycursor" id="ref-for-dom-idbindex-openkeycursor"><c- g>openKeyCursor</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②③"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex/openKeyCursor(query, direction), IDBIndex/openKeyCursor(query), IDBIndex/openKeyCursor()" data-dfn-type="argument" data-export id="dom-idbindex-openkeycursor-query-direction-query"><code><c- g>query</c-></code></dfn>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection" id="ref-for-enumdef-idbcursordirection③"><c- n>IDBCursorDirection</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex/openKeyCursor(query, direction), IDBIndex/openKeyCursor(query), IDBIndex/openKeyCursor()" data-dfn-type="argument" data-export id="dom-idbindex-openkeycursor-query-direction-direction"><code><c- g>direction</c-></code></dfn> = "next"); }; </pre> <div class="domintro note" role="note"> <dl> <dt data-md><var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-name" id="ref-for-dom-idbindex-name①">name</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#index-name" id="ref-for-index-name⑧">name</a> of the index.</p> <dt data-md><var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-name" id="ref-for-dom-idbindex-name②">name</a></code> = <var>newName</var> <dd data-md> <p>Updates the <a data-link-type="dfn" href="#index-name" id="ref-for-index-name⑨">name</a> of the store to <var>newName</var>.</p> <p>Throws 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> if not called within an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④⓪">upgrade transaction</a>.</p> <dt data-md><var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-objectstore" id="ref-for-dom-idbindex-objectstore①">objectStore</a></code> <dd data-md> <p>Returns the <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore①③">IDBObjectStore</a></code> the index belongs to.</p> <dt data-md><var>index</var> . keyPath <dd data-md> <p>Returns the <a data-link-type="dfn" href="#key-path" id="ref-for-key-path②">key path</a> of the index.</p> <dt data-md><var>index</var> . multiEntry <dd data-md> <p>Returns true if the index’s <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag③">multiEntry flag</a> is true.</p> <dt data-md><var>index</var> . unique <dd data-md> <p>Returns true if the index’s <a data-link-type="dfn" href="#index-unique-flag" id="ref-for-index-unique-flag⑤">unique flag</a> is true.</p> </dl> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="attribute" data-export id="dom-idbindex-name"><code>name</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥⑥">this</a>'s <a data-link-type="dfn" href="#index-name" id="ref-for-index-name①⓪">name</a>.</p> <details class="note"> <summary> Is this the same as the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③②">index</a>'s <a data-link-type="dfn" href="#index-name" id="ref-for-index-name①①">name</a>? </summary> As long as the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑤⑨">transaction</a> has not <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①③">finished</a>, this is the same as the associated <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③③">index</a>'s <a data-link-type="dfn" href="#index-name" id="ref-for-index-name①②">name</a>. But once the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥⓪">transaction</a> has <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①④">finished</a>, this attribute will not reflect changes made with a later <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④①">upgrade transaction</a>. </details> <div class="algorithm" data-algorithm="IDBIndex name setter"> <p>The <code class="idl"><a data-link-type="idl" href="#dom-idbindex-name" id="ref-for-dom-idbindex-name③">name</a></code> setter steps are:</p> <ol> <li data-md> <p>Let <var>name</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#the-given-value" id="ref-for-the-given-value①">the given value</a>.</p> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥⑦">this</a>'s <a data-link-type="dfn" href="#index-handle-transaction" id="ref-for-index-handle-transaction">transaction</a>.</p> <li data-md> <p>Let <var>index</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥⑧">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index①">index</a>.</p> <li data-md> <p>If <var>transaction</var> is not an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④②">upgrade transaction</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥⑧">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②③">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②③">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑥⑨">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror①⑨">TransactionInactiveError</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>index</var> or <var>index</var>’s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧①">object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦⓪">throw</a> 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>.</p> <li data-md> <p>If <var>index</var>’s <a data-link-type="dfn" href="#index-name" id="ref-for-index-name①③">name</a> is equal to <var>name</var>, terminate these steps.</p> <li data-md> <p>If an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③④">index</a> <a data-link-type="dfn" href="#index-name" id="ref-for-index-name①④">named</a> <var>name</var> already exists in <var>index</var>’s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧②">object store</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦①">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror⑧">ConstraintError</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>Set <var>index</var>’s <a data-link-type="dfn" href="#index-name" id="ref-for-index-name①⑤">name</a> to <var>name</var>.</p> <li data-md> <p>Set <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑥⑨">this</a>'s <a data-link-type="dfn" href="#index-handle-name" id="ref-for-index-handle-name">name</a> to <var>name</var>.</p> </ol> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="attribute" data-export id="dom-idbindex-objectstore"><code>objectStore</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦⓪">this</a>'s <a data-link-type="dfn" href="#index-handle-object-store-handle" id="ref-for-index-handle-object-store-handle">object store handle</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="attribute" data-export id="dom-idbindex-keypath"><code>keyPath</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦①">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index②">index</a>'s <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①⑤">key path</a>. The <a data-link-type="dfn" href="#key-path" id="ref-for-key-path③">key path</a> is converted as a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString②②">DOMString</a></code> (if a string) or a <code><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence⑤">sequence</a><<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMString" id="ref-for-idl-DOMString②③">DOMString</a></code>></code> (if a list of strings), per <a data-link-type="biblio" href="#biblio-webidl" title="Web IDL Standard">[WEBIDL]</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The returned value is not the same instance that was used when the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③⑤">index</a> was created. However, if this attribute returns an object (specifically an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects⑦">Array</a></code>), it returns the same object instance every time it is inspected. Changing the properties of the object has no effect on the <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③⑥">index</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="attribute" data-export id="dom-idbindex-multientry"><code>multiEntry</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦②">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index③">index</a>'s <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag④">multiEntry flag</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="attribute" data-export id="dom-idbindex-unique"><code>unique</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦③">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index④">index</a>'s <a data-link-type="dfn" href="#index-unique-flag" id="ref-for-index-unique-flag⑥">unique flag</a>.</p> <div class="domintro note" role="note"> The following methods throw an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②⓪">TransactionInactiveError</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> if called when the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥①">transaction</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②④">active</a>. <dl> <dt data-md><var>request</var> = <var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-get" id="ref-for-dom-idbindex-get①">get</a></code>(<var>query</var>) <dd data-md> <p>Retrieves the <a data-link-type="dfn" href="#value" id="ref-for-value①④">value</a> of the first <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤①">record</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key⑥④">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③③">key range</a> in <var>query</var>.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①⑤">result</a></code> will be the <a data-link-type="dfn" href="#value" id="ref-for-value①⑤">value</a>, or <code>undefined</code> if there was no matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤②">record</a>.</p> <dt data-md><var>request</var> = <var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-getkey" id="ref-for-dom-idbindex-getkey①">getKey</a></code>(<var>query</var>) <dd data-md> <p>Retrieves the <a data-link-type="dfn" href="#key" id="ref-for-key⑥⑤">key</a> of the first <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤③">record</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key⑥⑥">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③④">key range</a> in <var>query</var>.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①⑥">result</a></code> will be the <a data-link-type="dfn" href="#key" id="ref-for-key⑥⑦">key</a>, or <code>undefined</code> if there was no matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤④">record</a>.</p> <dt data-md><var>request</var> = <var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-getall" id="ref-for-dom-idbindex-getall①">getAll</a></code>(<var>query</var> [, <var>count</var>]) <dd data-md> <p>Retrieves the <a data-link-type="dfn" href="#value" id="ref-for-value①⑥">values</a> of the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤⑤">records</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key⑥⑧">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③⑤">key range</a> in <var>query</var> (up to <var>count</var> if given).</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①⑦">result</a></code> will be an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects⑧">Array</a></code> of the <a data-link-type="dfn" href="#value" id="ref-for-value①⑦">values</a>.</p> <dt data-md><var>request</var> = <var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-getallkeys" id="ref-for-dom-idbindex-getallkeys①">getAllKeys</a></code>(<var>query</var> [, <var>count</var>]) <dd data-md> <p>Retrieves the <a data-link-type="dfn" href="#key" id="ref-for-key⑥⑨">keys</a> of <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤⑥">records</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key⑦⓪">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③⑥">key range</a> in <var>query</var> (up to <var>count</var> if given).</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①⑧">result</a></code> will be an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects⑨">Array</a></code> of the <a data-link-type="dfn" href="#key" id="ref-for-key⑦①">keys</a>.</p> <dt data-md><var>request</var> = <var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-count" id="ref-for-dom-idbindex-count①">count</a></code>(<var>query</var>) <dd data-md> <p>Retrieves the number of <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤⑦">records</a> matching the given <a data-link-type="dfn" href="#key" id="ref-for-key⑦②">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③⑦">key range</a> in <var>query</var>.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result①⑨">result</a></code> will be the count.</p> </dl> </div> <div class="algorithm" data-algorithm="get(query)" data-algorithm-for="IDBIndex"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="method" data-export id="dom-idbindex-get"><code>get(<var>query</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦④">this</a>'s <a data-link-type="dfn" href="#index-handle-transaction" id="ref-for-index-handle-transaction①">transaction</a>.</p> <li data-md> <p>Let <var>index</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦⑤">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index⑤">index</a>.</p> <li data-md> <p>If <var>index</var> or <var>index</var>’s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧③">object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦②">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②④">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②⑤">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦③">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②①">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range⑧">converting a value to a key range</a> with <var>query</var> and true. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#retrieve-a-referenced-value-from-an-index" id="ref-for-retrieve-a-referenced-value-from-an-index">retrieve a referenced value from an index</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm④">the current Realm record</a>, <var>index</var>, and <var>range</var>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest③④">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①①">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦⑥">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑦③">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③⑧">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange⑧">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#index-referenced-value" id="ref-for-index-referenced-value②">referenced value</a> to be retrieved. If a range is specified, the method retrieves the first existing record in that range.</p> </div> <p class="note" role="note"><span class="marker">NOTE:</span> This method produces the same result if a record with the given key doesn’t exist as when a record exists, but has <code>undefined</code> as value. If you need to tell the two situations apart, you can use <code class="idl"><a data-link-type="idl" href="#dom-idbindex-opencursor" id="ref-for-dom-idbindex-opencursor①">openCursor()</a></code> with the same key. This will return a cursor with <code>undefined</code> as value if a record exists, or no cursor if no such record exists.</p> <div class="algorithm" data-algorithm="getKey(query)" data-algorithm-for="IDBIndex"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="method" data-export id="dom-idbindex-getkey"><code>getKey(<var>query</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦⑦">this</a>'s <a data-link-type="dfn" href="#index-handle-transaction" id="ref-for-index-handle-transaction②">transaction</a>.</p> <li data-md> <p>Let <var>index</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦⑧">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index⑥">index</a>.</p> <li data-md> <p>If <var>index</var> or <var>index</var>’s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧④">object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦④">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②⑤">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②⑥">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦⑤">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②②">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range⑨">converting a value to a key range</a> with <var>query</var> and true. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#retrieve-a-value-from-an-index" id="ref-for-retrieve-a-value-from-an-index">retrieve a value from an index</a> with <var>index</var> and <var>range</var>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest③⑤">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①②">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑦⑨">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑦④">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range③⑨">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange⑨">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤⑧">record</a> key to be retrieved. If a range is specified, the method retrieves the first existing key in that range.</p> </div> <div class="algorithm" data-algorithm="getAll(query, count)" data-algorithm-for="IDBIndex"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="method" data-export data-lt="getAll(query, count)|getAll(query)|getAll()" id="dom-idbindex-getall"><code>getAll(<var>query</var>, <var>count</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧⓪">this</a>'s <a data-link-type="dfn" href="#index-handle-transaction" id="ref-for-index-handle-transaction③">transaction</a>.</p> <li data-md> <p>Let <var>index</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧①">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index⑦">index</a>.</p> <li data-md> <p>If <var>index</var> or <var>index</var>’s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧⑤">object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦⑥">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②⑥">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②⑦">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦⑦">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②③">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range①⓪">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#retrieve-multiple-referenced-values-from-an-index" id="ref-for-retrieve-multiple-referenced-values-from-an-index">retrieve multiple referenced values from an index</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm⑤">the current Realm record</a>, <var>index</var>, <var>range</var>, and <var>count</var> if given.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest③⑥">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①③">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧②">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑦⑤">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④⓪">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange①⓪">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#index-referenced-value" id="ref-for-index-referenced-value③">referenced values</a> to be retrieved. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range⑦">unbounded key range</a> is used. If <var>count</var> is specified and there are more than <var>count</var> records in range, only the first <var>count</var> will be retrieved.</p> </div> <div class="algorithm" data-algorithm="getAllKeys(query, count)" data-algorithm-for="IDBIndex"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="method" data-export data-lt="getAllKeys(query, count)|getAllKeys(query)|getAllKeys()" id="dom-idbindex-getallkeys"><code>getAllKeys(<var>query</var>, <var>count</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧③">this</a>'s <a data-link-type="dfn" href="#index-handle-transaction" id="ref-for-index-handle-transaction④">transaction</a>.</p> <li data-md> <p>Let <var>index</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧④">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index⑧">index</a>.</p> <li data-md> <p>If <var>index</var> or <var>index</var>’s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧⑥">object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦⑧">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②⑦">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②⑧">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦⑨">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②④">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range①①">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#retrieve-multiple-values-from-an-index" id="ref-for-retrieve-multiple-values-from-an-index">retrieve multiple values from an index</a> with <var>index</var>, <var>range</var>, and <var>count</var> if given.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest③⑦">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①④">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧⑤">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑦⑥">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④①">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange①①">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑤⑨">record</a> keys to be retrieved. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range⑧">unbounded key range</a> is used. If <var>count</var> is specified and there are more than <var>count</var> keys in range, only the first <var>count</var> will be retrieved.</p> </div> <div class="algorithm" data-algorithm="count(query)" data-algorithm-for="IDBIndex"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="method" data-export data-lt="count(query)|count()" id="dom-idbindex-count"><code>count(<var>query</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧⑥">this</a>'s <a data-link-type="dfn" href="#index-handle-transaction" id="ref-for-index-handle-transaction⑤">transaction</a>.</p> <li data-md> <p>Let <var>index</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧⑦">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index⑨">index</a>.</p> <li data-md> <p>If <var>index</var> or <var>index</var>’s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧⑦">object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧⓪">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②⑧">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active②⑨">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧①">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②⑤">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range①②">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#count-the-records-in-a-range" id="ref-for-count-the-records-in-a-range①">count the records in a range</a> with <var>index</var> and <var>range</var>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest③⑧">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①⑤">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧⑧">this</a> and <var>operation</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑦⑦">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④②">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange①②">IDBKeyRange</a></code>) identifying the <a data-link-type="dfn" href="#index-records" id="ref-for-index-records①">records</a> to be counted. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range⑨">unbounded key range</a> is used.</p> </div> <div class="domintro note" role="note"> The following methods throw an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②⑥">TransactionInactiveError</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> if called when the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥②">transaction</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③⓪">active</a>. <dl> <dt data-md><var>request</var> = <var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-opencursor" id="ref-for-dom-idbindex-opencursor②">openCursor</a></code>([<var>query</var> [, <var>direction</var> = "next"]]) <dd data-md> <p>Opens a <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②②">cursor</a> over the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥⓪">records</a> matching <var>query</var>, ordered by <var>direction</var>. If <var>query</var> is null, all <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥①">records</a> in <var>index</var> are matched.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result②⓪">result</a></code> will be an <code class="idl"><a data-link-type="idl" href="#idbcursorwithvalue" id="ref-for-idbcursorwithvalue①">IDBCursorWithValue</a></code>, or null if there were no matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥②">records</a>.</p> <dt data-md><var>request</var> = <var>index</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbindex-openkeycursor" id="ref-for-dom-idbindex-openkeycursor①">openKeyCursor</a></code>([<var>query</var> [, <var>direction</var> = "next"]]) <dd data-md> <p>Opens a <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②③">cursor</a> with <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag③">key only flag</a> set to true over the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥③">records</a> matching <var>query</var>, ordered by <var>direction</var>. If <var>query</var> is null, all <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥④">records</a> in <var>index</var> are matched.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result②①">result</a></code> will be an <code class="idl"><a data-link-type="idl" href="#idbcursor" id="ref-for-idbcursor③">IDBCursor</a></code>, or null if there were no matching <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥⑤">records</a>.</p> </dl> </div> <div class="algorithm" data-algorithm="openCursor(query, direction)" data-algorithm-for="IDBIndex"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="method" data-export data-lt="openCursor(query, direction)|openCursor(query)|openCursor()" id="dom-idbindex-opencursor"><code>openCursor(<var>query</var>, <var>direction</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑧⑨">this</a>'s <a data-link-type="dfn" href="#index-handle-transaction" id="ref-for-index-handle-transaction⑥">transaction</a>.</p> <li data-md> <p>Let <var>index</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨⓪">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index①⓪">index</a>.</p> <li data-md> <p>If <var>index</var> or <var>index</var>’s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧⑧">object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧②">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state②⑨">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③①">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧③">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②⑦">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range①③">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>cursor</var> be a new <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②④">cursor</a> with its <a data-link-type="dfn" href="#cursor-transaction" id="ref-for-cursor-transaction②">transaction</a> set to <var>transaction</var>, undefined <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position⑤">position</a>, <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction③">direction</a> set to <var>direction</var>, <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag②">got value flag</a> set to false, undefined <a data-link-type="dfn" href="#cursor-key" id="ref-for-cursor-key②">key</a> and <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value③">value</a>, <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①①">source</a> set to <var>index</var>, <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range⑥">range</a> set to <var>range</var>, and <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag④">key only flag</a> set to false.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#iterate-a-cursor" id="ref-for-iterate-a-cursor②">iterate a cursor</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm⑥">the current Realm record</a> and <var>cursor</var>.</p> <li data-md> <p>Let <var>request</var> be the result of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①⑥">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨①">this</a> and <var>operation</var>.</p> <li data-md> <p>Set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-request" id="ref-for-cursor-request②">request</a> to <var>request</var>.</p> <li data-md> <p>Return <var>request</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑦⑧">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④③">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange①③">IDBKeyRange</a></code>) to use as the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②⑤">cursor</a>'s <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range⑦">range</a>. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range①⓪">unbounded key range</a> is used.</p> </div> <div class="algorithm" data-algorithm="openKeyCursor(query, direction)" data-algorithm-for="IDBIndex"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBIndex" data-dfn-type="method" data-export data-lt="openKeyCursor(query, direction)|openKeyCursor(query)|openKeyCursor()" id="dom-idbindex-openkeycursor"><code>openKeyCursor(<var>query</var>, <var>direction</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨②">this</a>'s <a data-link-type="dfn" href="#index-handle-transaction" id="ref-for-index-handle-transaction⑦">transaction</a>.</p> <li data-md> <p>Let <var>index</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨③">this</a>'s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index①①">index</a>.</p> <li data-md> <p>If <var>index</var> or <var>index</var>’s <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑧⑨">object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧④">throw</a> 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>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③⓪">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③②">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧⑤">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②⑧">TransactionInactiveError</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>Let <var>range</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key-range" id="ref-for-convert-a-value-to-a-key-range①④">converting a value to a key range</a> with <var>query</var>. Rethrow any exceptions.</p> <li data-md> <p>Let <var>cursor</var> be a new <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②⑥">cursor</a> with its <a data-link-type="dfn" href="#cursor-transaction" id="ref-for-cursor-transaction③">transaction</a> set to <var>transaction</var>, undefined <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position⑥">position</a>, <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction④">direction</a> set to <var>direction</var>, <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag③">got value flag</a> set to false, undefined <a data-link-type="dfn" href="#cursor-key" id="ref-for-cursor-key③">key</a> and <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value④">value</a>, <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①②">source</a> set to <var>index</var>, <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range⑧">range</a> set to <var>range</var>, and <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag⑤">key only flag</a> set to true.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#iterate-a-cursor" id="ref-for-iterate-a-cursor③">iterate a cursor</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm⑦">the current Realm record</a> and <var>cursor</var>.</p> <li data-md> <p>Let <var>request</var> be the result of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①⑦">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨④">this</a> and <var>operation</var>.</p> <li data-md> <p>Set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-request" id="ref-for-cursor-request③">request</a> to <var>request</var>.</p> <li data-md> <p>Return <var>request</var>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> The <var>query</var> parameter can be a <a data-link-type="dfn" href="#key" id="ref-for-key⑦⑨">key</a> or <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④④">key range</a> (an <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange①④">IDBKeyRange</a></code>) to use as the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②⑦">cursor</a>'s <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range⑨">range</a>. If null or not given, an <a data-link-type="dfn" href="#unbounded-key-range" id="ref-for-unbounded-key-range①①">unbounded key range</a> is used.</p> </div> <h3 class="heading settled" data-level="4.7" id="keyrange"><span class="secno">4.7. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange①⑤">IDBKeyRange</a></code> interface</span><a class="self-link" href="#keyrange"></a></h3> <p>The <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange①⑥">IDBKeyRange</a></code> interface represents a <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④⑤">key range</a>.</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbkeyrange"><code><c- g>IDBKeyRange</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-any" id="ref-for-idl-any②④"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbkeyrange-lower" id="ref-for-dom-idbkeyrange-lower"><c- g>lower</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-any" id="ref-for-idl-any②⑤"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbkeyrange-upper" id="ref-for-dom-idbkeyrange-upper"><c- g>upper</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-idbkeyrange-loweropen" id="ref-for-dom-idbkeyrange-loweropen"><c- g>lowerOpen</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-idbkeyrange-upperopen" id="ref-for-dom-idbkeyrange-upperopen"><c- g>upperOpen</c-></a>; // Static construction methods: [<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>] <c- b>static</c-> <a data-link-type="idl-name" href="#idbkeyrange" id="ref-for-idbkeyrange①⑦"><c- n>IDBKeyRange</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbkeyrange-only" id="ref-for-dom-idbkeyrange-only"><c- g>only</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②⑥"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange/only(value)" data-dfn-type="argument" data-export id="dom-idbkeyrange-only-value-value"><code><c- g>value</c-></code></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>] <c- b>static</c-> <a data-link-type="idl-name" href="#idbkeyrange" id="ref-for-idbkeyrange①⑧"><c- n>IDBKeyRange</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbkeyrange-lowerbound" id="ref-for-dom-idbkeyrange-lowerbound"><c- g>lowerBound</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②⑦"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange/lowerBound(lower, open), IDBKeyRange/lowerBound(lower)" data-dfn-type="argument" data-export id="dom-idbkeyrange-lowerbound-lower-open-lower"><code><c- g>lower</c-></code></dfn>, <c- b>optional</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-dfn-for="IDBKeyRange/lowerBound(lower, open), IDBKeyRange/lowerBound(lower)" data-dfn-type="argument" data-export id="dom-idbkeyrange-lowerbound-lower-open-open"><code><c- g>open</c-></code></dfn> = <c- b>false</c->); [<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>] <c- b>static</c-> <a data-link-type="idl-name" href="#idbkeyrange" id="ref-for-idbkeyrange①⑨"><c- n>IDBKeyRange</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbkeyrange-upperbound" id="ref-for-dom-idbkeyrange-upperbound"><c- g>upperBound</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②⑧"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange/upperBound(upper, open), IDBKeyRange/upperBound(upper)" data-dfn-type="argument" data-export id="dom-idbkeyrange-upperbound-upper-open-upper"><code><c- g>upper</c-></code></dfn>, <c- b>optional</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-dfn-for="IDBKeyRange/upperBound(upper, open), IDBKeyRange/upperBound(upper)" data-dfn-type="argument" data-export id="dom-idbkeyrange-upperbound-upper-open-open"><code><c- g>open</c-></code></dfn> = <c- b>false</c->); [<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>] <c- b>static</c-> <a data-link-type="idl-name" href="#idbkeyrange" id="ref-for-idbkeyrange②⓪"><c- n>IDBKeyRange</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbkeyrange-bound" id="ref-for-dom-idbkeyrange-bound"><c- g>bound</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any②⑨"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange/bound(lower, upper, lowerOpen, upperOpen), IDBKeyRange/bound(lower, upper, lowerOpen), IDBKeyRange/bound(lower, upper)" data-dfn-type="argument" data-export id="dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-lower"><code><c- g>lower</c-></code></dfn>, <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any③⓪"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange/bound(lower, upper, lowerOpen, upperOpen), IDBKeyRange/bound(lower, upper, lowerOpen), IDBKeyRange/bound(lower, upper)" data-dfn-type="argument" data-export id="dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upper"><code><c- g>upper</c-></code></dfn>, <c- b>optional</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-dfn-for="IDBKeyRange/bound(lower, upper, lowerOpen, upperOpen), IDBKeyRange/bound(lower, upper, lowerOpen), IDBKeyRange/bound(lower, upper)" data-dfn-type="argument" data-export id="dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-loweropen"><code><c- g>lowerOpen</c-></code></dfn> = <c- b>false</c->, <c- b>optional</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-dfn-for="IDBKeyRange/bound(lower, upper, lowerOpen, upperOpen), IDBKeyRange/bound(lower, upper, lowerOpen), IDBKeyRange/bound(lower, upper)" data-dfn-type="argument" data-export id="dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upperopen"><code><c- g>upperOpen</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> <a class="idl-code" data-link-type="method" href="#dom-idbkeyrange-includes" id="ref-for-dom-idbkeyrange-includes"><c- g>includes</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any③①"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange/includes(key)" data-dfn-type="argument" data-export id="dom-idbkeyrange-includes-key-key"><code><c- g>key</c-></code></dfn>); }; </pre> <div class="domintro note" role="note"> <dl> <dt data-md><var>range</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-lower" id="ref-for-dom-idbkeyrange-lower①">lower</a></code> <dd data-md> <p>Returns the range’s <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound⑦">lower bound</a>, or <code>undefined</code> if none.</p> <dt data-md><var>range</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-upper" id="ref-for-dom-idbkeyrange-upper①">upper</a></code> <dd data-md> <p>Returns the range’s <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound⑦">upper bound</a>, or <code>undefined</code> if none.</p> <dt data-md><var>range</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-loweropen" id="ref-for-dom-idbkeyrange-loweropen①">lowerOpen</a></code> <dd data-md> <p>Returns the range’s <a data-link-type="dfn" href="#key-range-lower-open-flag" id="ref-for-key-range-lower-open-flag③">lower open flag</a>.</p> <dt data-md><var>range</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-upperopen" id="ref-for-dom-idbkeyrange-upperopen①">upperOpen</a></code> <dd data-md> <p>Returns the range’s <a data-link-type="dfn" href="#key-range-upper-open-flag" id="ref-for-key-range-upper-open-flag③">upper open flag</a>.</p> </dl> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange" data-dfn-type="attribute" data-export id="dom-idbkeyrange-lower"><code>lower</code></dfn> getter steps are to return the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value">converting a key to a value</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨⑤">this</a>'s <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound⑧">lower bound</a> if it is not null, or undefined otherwise.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange" data-dfn-type="attribute" data-export id="dom-idbkeyrange-upper"><code>upper</code></dfn> getter steps are to return the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value①">converting a key to a value</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨⑥">this</a>'s <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound⑧">upper bound</a> if it is not null, or undefined otherwise.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange" data-dfn-type="attribute" data-export id="dom-idbkeyrange-loweropen"><code>lowerOpen</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨⑦">this</a>'s <a data-link-type="dfn" href="#key-range-lower-open-flag" id="ref-for-key-range-lower-open-flag④">lower open flag</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange" data-dfn-type="attribute" data-export id="dom-idbkeyrange-upperopen"><code>upperOpen</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨⑧">this</a>'s <a data-link-type="dfn" href="#key-range-upper-open-flag" id="ref-for-key-range-upper-open-flag④">upper open flag</a>.</p> <div class="domintro note" role="note"> <dl> <dt data-md><var>range</var> = <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange②①">IDBKeyRange</a></code> . <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-only" id="ref-for-dom-idbkeyrange-only①">only</a></code>(<var>key</var>) <dd data-md> <p>Returns a new <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange②②">IDBKeyRange</a></code> spanning only <var>key</var>.</p> <dt data-md><var>range</var> = <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange②③">IDBKeyRange</a></code> . <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-lowerbound" id="ref-for-dom-idbkeyrange-lowerbound①">lowerBound</a></code>(<var>key</var> [, <var>open</var> = false]) <dd data-md> <p>Returns a new <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange②④">IDBKeyRange</a></code> starting at <var>key</var> with no upper bound. If <var>open</var> is true, <var>key</var> is not included in the range.</p> <dt data-md><var>range</var> = <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange②⑤">IDBKeyRange</a></code> . <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-upperbound" id="ref-for-dom-idbkeyrange-upperbound①">upperBound</a></code>(<var>key</var> [, <var>open</var> = false]) <dd data-md> <p>Returns a new <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange②⑥">IDBKeyRange</a></code> with no lower bound and ending at <var>key</var>. If <var>open</var> is true, <var>key</var> is not included in the range.</p> <dt data-md><var>range</var> = <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange②⑦">IDBKeyRange</a></code> . <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-bound" id="ref-for-dom-idbkeyrange-bound①">bound</a></code>(<var>lower</var>, <var>upper</var> [, <var>lowerOpen</var> = false [, <var>upperOpen</var> = false]]) <dd data-md> <p>Returns a new <code class="idl"><a data-link-type="idl" href="#idbkeyrange" id="ref-for-idbkeyrange②⑧">IDBKeyRange</a></code> spanning from <var>lower</var> to <var>upper</var>. If <var>lowerOpen</var> is true, <var>lower</var> is not included in the range. If <var>upperOpen</var> is true, <var>upper</var> is not included in the range.</p> </dl> </div> <div class="algorithm" data-algorithm="only(value)" data-algorithm-for="IDBKeyRange"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange" data-dfn-type="method" data-export id="dom-idbkeyrange-only"><code>only(<var>value</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>key</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key⑤">converting a value to a key</a> with <var>value</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>key</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧⑥">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①③">DataError</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>Create and return a new <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④⑥">key range</a> <a data-link-type="dfn" href="#containing-only" id="ref-for-containing-only①">containing only</a> <var>key</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="lowerBound(lower, open)" data-algorithm-for="IDBKeyRange"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange" data-dfn-type="method" data-export data-lt="lowerBound(lower, open)|lowerBound(lower)" id="dom-idbkeyrange-lowerbound"><code>lowerBound(<var>lower</var>, <var>open</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>lowerKey</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key⑥">converting a value to a key</a> with <var>lower</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>lowerKey</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧⑦">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①④">DataError</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>Create and return a new <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④⑦">key range</a> with <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound⑨">lower bound</a> set to <var>lowerKey</var>, <a data-link-type="dfn" href="#key-range-lower-open-flag" id="ref-for-key-range-lower-open-flag⑤">lower open flag</a> set to <var>open</var>, <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound⑨">upper bound</a> set to null, and <a data-link-type="dfn" href="#key-range-upper-open-flag" id="ref-for-key-range-upper-open-flag⑤">upper open flag</a> set to true.</p> </ol> </div> <div class="algorithm" data-algorithm="upperBound(upper, open)" data-algorithm-for="IDBKeyRange"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange" data-dfn-type="method" data-export data-lt="upperBound(upper, open)|upperBound(upper)" id="dom-idbkeyrange-upperbound"><code>upperBound(<var>upper</var>, <var>open</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>upperKey</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key⑦">converting a value to a key</a> with <var>upper</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>upperKey</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧⑧">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①⑤">DataError</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>Create and return a new <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④⑧">key range</a> with <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound①⓪">lower bound</a> set to null, <a data-link-type="dfn" href="#key-range-lower-open-flag" id="ref-for-key-range-lower-open-flag⑥">lower open flag</a> set to true, <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound①⓪">upper bound</a> set to <var>upperKey</var>, and <a data-link-type="dfn" href="#key-range-upper-open-flag" id="ref-for-key-range-upper-open-flag⑥">upper open flag</a> set to <var>open</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="bound(lower, upper, lowerOpen, upperOpen)" data-algorithm-for="IDBKeyRange"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange" data-dfn-type="method" data-export data-lt="bound(lower, upper, lowerOpen, upperOpen)|bound(lower, upper, lowerOpen)|bound(lower, upper)" id="dom-idbkeyrange-bound"><code>bound(<var>lower</var>, <var>upper</var>, <var>lowerOpen</var>, <var>upperOpen</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>lowerKey</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key⑧">converting a value to a key</a> with <var>lower</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>lowerKey</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑧⑨">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①⑥">DataError</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>Let <var>upperKey</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key⑨">converting a value to a key</a> with <var>upper</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>upperKey</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨⓪">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①⑦">DataError</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>lowerKey</var> is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than④">greater than</a> <var>upperKey</var>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨①">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①⑧">DataError</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>Create and return a new <a data-link-type="dfn" href="#key-range" id="ref-for-key-range④⑨">key range</a> with <a data-link-type="dfn" href="#key-range-lower-bound" id="ref-for-key-range-lower-bound①①">lower bound</a> set to <var>lowerKey</var>, <a data-link-type="dfn" href="#key-range-lower-open-flag" id="ref-for-key-range-lower-open-flag⑦">lower open flag</a> set to <var>lowerOpen</var>, <a data-link-type="dfn" href="#key-range-upper-bound" id="ref-for-key-range-upper-bound①①">upper bound</a> set to <var>upperKey</var> and <a data-link-type="dfn" href="#key-range-upper-open-flag" id="ref-for-key-range-upper-open-flag⑦">upper open flag</a> set to <var>upperOpen</var>.</p> </ol> </div> <div class="domintro note" role="note"> <dl> <dt data-md><var>range</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-includes" id="ref-for-dom-idbkeyrange-includes①">includes</a></code>(<var>key</var>) <dd data-md> <p>Returns true if <var>key</var> is included in the range, and false otherwise.</p> </dl> </div> <div class="algorithm" data-algorithm="includes(key)" data-algorithm-for="IDBKeyRange"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBKeyRange" data-dfn-type="method" data-export id="dom-idbkeyrange-includes"><code>includes(<var>key</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>k</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①⓪">converting a value to a key</a> with <var>key</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>k</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨②">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror①⑨">DataError</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>Return true if <var>k</var> is <a data-link-type="dfn" href="#in" id="ref-for-in①">in</a> this range, and false otherwise.</p> </ol> </div> <h3 class="heading settled" data-level="4.8" id="cursor-interface"><span class="secno">4.8. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#idbcursor" id="ref-for-idbcursor④">IDBCursor</a></code> interface</span><a class="self-link" href="#cursor-interface"></a></h3> <p><a data-link-type="dfn" href="#cursor" id="ref-for-cursor②⑧">Cursor</a> objects implement the <code class="idl"><a data-link-type="idl" href="#idbcursor" id="ref-for-idbcursor⑤">IDBCursor</a></code> interface. There is only ever one <code class="idl"><a data-link-type="idl" href="#idbcursor" id="ref-for-idbcursor⑥">IDBCursor</a></code> instance representing a given <a data-link-type="dfn" href="#cursor" id="ref-for-cursor②⑨">cursor</a>. There is no limit on how many cursors can be used at the same time.</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbcursor"><code><c- g>IDBCursor</c-></code></dfn> { <c- b>readonly</c-> <c- b>attribute</c-> (<a data-link-type="idl-name" href="#idbobjectstore" id="ref-for-idbobjectstore①④"><c- n>IDBObjectStore</c-></a> <c- b>or</c-> <a data-link-type="idl-name" href="#idbindex" id="ref-for-idbindex①③"><c- n>IDBIndex</c-></a>) <a class="idl-code" data-link-type="attribute" data-readonly data-type="(IDBObjectStore or IDBIndex)" href="#dom-idbcursor-source" id="ref-for-dom-idbcursor-source"><c- g>source</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection" id="ref-for-enumdef-idbcursordirection④"><c- n>IDBCursorDirection</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBCursorDirection" href="#dom-idbcursor-direction" id="ref-for-dom-idbcursor-direction"><c- g>direction</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-any" id="ref-for-idl-any③②"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbcursor-key" id="ref-for-dom-idbcursor-key"><c- g>key</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-any" id="ref-for-idl-any③③"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbcursor-primarykey" id="ref-for-dom-idbcursor-primarykey"><c- g>primaryKey</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="#idbrequest" id="ref-for-idbrequest③⑨"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBRequest" href="#dom-idbcursor-request" id="ref-for-dom-idbcursor-request"><c- g>request</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-idbcursor-advance" id="ref-for-dom-idbcursor-advance"><c- g>advance</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange" id="ref-for-EnforceRange⑤"><c- g>EnforceRange</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="dfn-paneled idl-code" data-dfn-for="IDBCursor/advance(count)" data-dfn-type="argument" data-export id="dom-idbcursor-advance-count-count"><code><c- g>count</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 class="idl-code" data-link-type="method" href="#dom-idbcursor-continue" id="ref-for-dom-idbcursor-continue"><c- g>continue</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any③④"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor/continue(key), IDBCursor/continue()" data-dfn-type="argument" data-export id="dom-idbcursor-continue-key-key"><code><c- g>key</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 class="idl-code" data-link-type="method" href="#dom-idbcursor-continueprimarykey" id="ref-for-dom-idbcursor-continueprimarykey"><c- g>continuePrimaryKey</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any③⑤"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor/continuePrimaryKey(key, primaryKey)" data-dfn-type="argument" data-export id="dom-idbcursor-continueprimarykey-key-primarykey-key"><code><c- g>key</c-></code></dfn>, <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any③⑥"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor/continuePrimaryKey(key, primaryKey)" data-dfn-type="argument" data-export id="dom-idbcursor-continueprimarykey-key-primarykey-primarykey"><code><c- g>primaryKey</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest④⓪"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbcursor-update" id="ref-for-dom-idbcursor-update"><c- g>update</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any③⑦"><c- b>any</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor/update(value)" data-dfn-type="argument" data-export id="dom-idbcursor-update-value-value"><code><c- g>value</c-></code></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 data-link-type="idl-name" href="#idbrequest" id="ref-for-idbrequest④①"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbcursor-delete" id="ref-for-dom-idbcursor-delete"><c- g>delete</c-></a>(); }; <c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-idbcursordirection"><code><c- g>IDBCursorDirection</c-></code></dfn> { <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursorDirection" data-dfn-type="enum-value" data-export id="dom-idbcursordirection-next"><code><c- s>"next"</c-></code></dfn>, <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursorDirection" data-dfn-type="enum-value" data-export id="dom-idbcursordirection-nextunique"><code><c- s>"nextunique"</c-></code></dfn>, <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursorDirection" data-dfn-type="enum-value" data-export id="dom-idbcursordirection-prev"><code><c- s>"prev"</c-></code></dfn>, <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursorDirection" data-dfn-type="enum-value" data-export id="dom-idbcursordirection-prevunique"><code><c- s>"prevunique"</c-></code></dfn> }; </pre> <div class="domintro note" role="note"> <dl> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-source" id="ref-for-dom-idbcursor-source①">source</a></code> <dd data-md> <p>Returns the <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore①⑤">IDBObjectStore</a></code> or <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex①④">IDBIndex</a></code> the cursor was opened from.</p> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-direction" id="ref-for-dom-idbcursor-direction①">direction</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction⑤">direction</a> ("<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-next" id="ref-for-dom-idbcursordirection-next②">next</a></code>", "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-nextunique" id="ref-for-dom-idbcursordirection-nextunique①">nextunique</a></code>", "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prev" id="ref-for-dom-idbcursordirection-prev②">prev</a></code>" or "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prevunique" id="ref-for-dom-idbcursordirection-prevunique①">prevunique</a></code>") of the cursor.</p> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-key" id="ref-for-dom-idbcursor-key①">key</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#cursor-key" id="ref-for-cursor-key④">key</a> of the cursor. Throws 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> if the cursor is advancing or is finished.</p> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-primarykey" id="ref-for-dom-idbcursor-primarykey①">primaryKey</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#cursor-effective-key" id="ref-for-cursor-effective-key①">effective key</a> of the cursor. Throws 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> if the cursor is advancing or is finished.</p> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-request" id="ref-for-dom-idbcursor-request①">request</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#cursor-request" id="ref-for-cursor-request④">request</a> that was used to obtain this cursor.</p> </dl> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="attribute" data-export id="dom-idbcursor-source"><code>source</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this⑨⑨">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①③">source</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-source" id="ref-for-dom-idbcursor-source②">source</a></code> attribute never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥③">transaction</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③③">active</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="attribute" data-export id="dom-idbcursor-direction"><code>direction</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪⓪">this</a>'s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction⑥">direction</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="attribute" data-export id="dom-idbcursor-key"><code>key</code></dfn> getter steps are to return the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value②">converting a key to a value</a> with the cursor’s current <a data-link-type="dfn" href="#cursor-key" id="ref-for-cursor-key⑤">key</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> If <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-key" id="ref-for-dom-idbcursor-key②">key</a></code> returns an object (e.g. a <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-objects" id="ref-for-sec-date-objects②">Date</a></code> or <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①⓪">Array</a></code>), it returns the same object instance every time it is inspected, until the cursor’s <a data-link-type="dfn" href="#cursor-key" id="ref-for-cursor-key⑥">key</a> is changed. This means that if the object is modified, those modifications will be seen by anyone inspecting the value of the cursor. However modifying such an object does not modify the contents of the database.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="attribute" data-export id="dom-idbcursor-primarykey"><code>primaryKey</code></dfn> getter steps are to return the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value③">converting a key to a value</a> with the cursor’s current <a data-link-type="dfn" href="#cursor-effective-key" id="ref-for-cursor-effective-key②">effective key</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> If <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-primarykey" id="ref-for-dom-idbcursor-primarykey②">primaryKey</a></code> returns an object (e.g. a <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-objects" id="ref-for-sec-date-objects③">Date</a></code> or <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①①">Array</a></code>), it returns the same object instance every time it is inspected, until the cursor’s <a data-link-type="dfn" href="#cursor-effective-key" id="ref-for-cursor-effective-key③">effective key</a> is changed. This means that if the object is modified, those modifications will be seen by anyone inspecting the value of the cursor. However modifying such an object does not modify the contents of the database.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="attribute" data-export id="dom-idbcursor-request"><code>request</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪①">this</a>'s <a data-link-type="dfn" href="#cursor-request" id="ref-for-cursor-request⑤">request</a>.</p> <div class="advisement"> 🚧 The <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-request" id="ref-for-dom-idbcursor-request②">request</a></code> attribute is new in this edition. It is supported in Chrome 76, Edge 79, Firefox 77, and Safari 15. 🚧 </div> <div class="domintro note" role="note"> The following methods advance a <a data-link-type="dfn" href="#cursor" id="ref-for-cursor③⓪">cursor</a>. Once the cursor has advanced, a <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success⑦">success</a></code> event will be fired at the same <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest④②">IDBRequest</a></code> returned when the cursor was opened. The <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result②②">result</a></code> will be the same cursor if a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥⑥">record</a> was in range, or <code>undefined</code> otherwise. <p>If called while the cursor is already advancing, 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> will be thrown.</p> <p>The following methods throw a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror②⑨">TransactionInactiveError</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> if called when the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥④">transaction</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③④">active</a>.</p> <dl> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-advance" id="ref-for-dom-idbcursor-advance①">advance</a></code>(<var>count</var>) <dd data-md> <p>Advances the cursor through the next <var>count</var> <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥⑦">records</a> in range.</p> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-continue" id="ref-for-dom-idbcursor-continue①">continue</a></code>() <dd data-md> <p>Advances the cursor to the next <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥⑧">record</a> in range.</p> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-continue" id="ref-for-dom-idbcursor-continue②">continue</a></code>(<var>key</var>) <dd data-md> <p>Advances the cursor to the next <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑥⑨">record</a> in range matching or after <var>key</var>.</p> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-continueprimarykey" id="ref-for-dom-idbcursor-continueprimarykey①">continuePrimaryKey</a></code>(<var>key</var>, <var>primaryKey</var>) <dd data-md> <p>Advances the cursor to the next <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦⓪">record</a> in range matching or after <var>key</var> and <var>primaryKey</var>. Throws an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidaccesserror" id="ref-for-invalidaccesserror④">InvalidAccessError</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> if the <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①④">source</a> is not an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③⑦">index</a>.</p> </dl> </div> <div class="algorithm" data-algorithm="advance(count)" data-algorithm-for="IDBCursor"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="method" data-export id="dom-idbcursor-advance"><code>advance(<var>count</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>If <var>count</var> is 0 (zero), <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨③">throw</a> 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>.</p> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪②">this</a>'s <a data-link-type="dfn" href="#cursor-transaction" id="ref-for-cursor-transaction④">transaction</a>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③①">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③⑤">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨④">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror③⓪">TransactionInactiveError</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 <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪③">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①⑤">source</a> or <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store①">effective object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨⑤">throw</a> 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>.</p> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪④">this</a>'s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag④">got value flag</a> is false, indicating that the cursor is being iterated or has iterated past its end, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨⑥">throw</a> 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>.</p> <li data-md> <p>Set <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪⑤">this</a>'s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag⑤">got value flag</a> to false.</p> <li data-md> <p>Let <var>request</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪⑥">this</a>'s <a data-link-type="dfn" href="#cursor-request" id="ref-for-cursor-request⑥">request</a>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-processed-flag" id="ref-for-request-processed-flag②">processed flag</a> to false.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①②">done flag</a> to false.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#iterate-a-cursor" id="ref-for-iterate-a-cursor④">iterate a cursor</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm⑧">the current Realm record</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪⑦">this</a>, and <var>count</var>.</p> <li data-md> <p>Run <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①⑧">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪⑧">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①⑥">source</a>, <var>operation</var>, and <var>request</var>.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Calling this method more than once before new cursor data has been loaded - for example, calling <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-advance" id="ref-for-dom-idbcursor-advance②">advance()</a></code> twice from the same onsuccess handler - results in 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> being thrown on the second call because the cursor’s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag⑥">got value flag</a> has been set to false.</p> <div class="algorithm" data-algorithm="continue(key)" data-algorithm-for="IDBCursor"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="method" data-export data-lt="continue(key)|continue()" id="dom-idbcursor-continue"><code>continue(<var>key</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⓪⑨">this</a>'s <a data-link-type="dfn" href="#cursor-transaction" id="ref-for-cursor-transaction⑤">transaction</a>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③②">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③⑥">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨⑦">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror③①">TransactionInactiveError</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 <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①⓪">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①⑦">source</a> or <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store②">effective object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨⑧">throw</a> 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>.</p> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①①">this</a>'s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag⑦">got value flag</a> is false, indicating that the cursor is being iterated or has iterated past its end, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑨⑨">throw</a> 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>.</p> <li data-md> <p>If <var>key</var> is given, then:</p> <ol> <li data-md> <p>Let <var>r</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①①">converting a value to a key</a> with <var>key</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>r</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪⓪">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②⓪">DataError</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>Let <var>key</var> be <var>r</var>.</p> <li data-md> <p>If <var>key</var> is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than②">less than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to③">equal to</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①②">this</a>'s <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position⑦">position</a> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①③">this</a>'s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction⑦">direction</a> is "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-next" id="ref-for-dom-idbcursordirection-next③">next</a></code>" or "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-nextunique" id="ref-for-dom-idbcursordirection-nextunique②">nextunique</a></code>", then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪①">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②①">DataError</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>key</var> is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than⑤">greater than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to④">equal to</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①④">this</a>'s <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position⑧">position</a> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①⑤">this</a>'s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction⑧">direction</a> is "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prev" id="ref-for-dom-idbcursordirection-prev③">prev</a></code>" or "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prevunique" id="ref-for-dom-idbcursordirection-prevunique②">prevunique</a></code>", then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪②">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②②">DataError</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> </ol> <li data-md> <p>Set <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①⑥">this</a>'s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag⑧">got value flag</a> to false.</p> <li data-md> <p>Let <var>request</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①⑦">this</a>'s <a data-link-type="dfn" href="#cursor-request" id="ref-for-cursor-request⑦">request</a>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-processed-flag" id="ref-for-request-processed-flag③">processed flag</a> to false.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①③">done flag</a> to false.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#iterate-a-cursor" id="ref-for-iterate-a-cursor⑤">iterate a cursor</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm⑨">the current Realm record</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①⑧">this</a>, and <var>key</var> (if given).</p> <li data-md> <p>Run <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request①⑨">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①①⑨">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①⑧">source</a>, <var>operation</var>, and <var>request</var>.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Calling this method more than once before new cursor data has been loaded - for example, calling <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-continue" id="ref-for-dom-idbcursor-continue③">continue()</a></code> twice from the same onsuccess handler - results in 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> being thrown on the second call because the cursor’s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag⑨">got value flag</a> has been set to false.</p> <div class="algorithm" data-algorithm="continuePrimaryKey(key, primaryKey)" data-algorithm-for="IDBCursor"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="method" data-export id="dom-idbcursor-continueprimarykey"><code>continuePrimaryKey(<var>key</var>, <var>primaryKey</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②⓪">this</a>'s <a data-link-type="dfn" href="#cursor-transaction" id="ref-for-cursor-transaction⑥">transaction</a>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③③">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③⑦">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪③">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror③②">TransactionInactiveError</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 <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②①">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source①⑨">source</a> or <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store③">effective object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪④">throw</a> 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>.</p> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②②">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source②⓪">source</a> is not an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③⑧">index</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪⑤">throw</a> an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidaccesserror" id="ref-for-invalidaccesserror⑤">InvalidAccessError</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 <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②③">this</a>'s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction⑨">direction</a> is not "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-next" id="ref-for-dom-idbcursordirection-next④">next</a></code>" or "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prev" id="ref-for-dom-idbcursordirection-prev④">prev</a></code>", <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪⑥">throw</a> an "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#invalidaccesserror" id="ref-for-invalidaccesserror⑥">InvalidAccessError</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 <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②④">this</a>'s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag①⓪">got value flag</a> is false, indicating that the cursor is being iterated or has iterated past its end, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪⑦">throw</a> 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>.</p> <li data-md> <p>Let <var>r</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①②">converting a value to a key</a> with <var>key</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>r</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪⑧">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②③">DataError</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>Let <var>key</var> be <var>r</var>.</p> <li data-md> <p>Let <var>r</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①③">converting a value to a key</a> with <var>primaryKey</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>r</var> is invalid, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①⓪⑨">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②④">DataError</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>Let <var>primaryKey</var> be <var>r</var>.</p> <li data-md> <p>If <var>key</var> is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than③">less than</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②⑤">this</a>'s <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position⑨">position</a> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②⑥">this</a>'s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction①⓪">direction</a> is "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-next" id="ref-for-dom-idbcursordirection-next⑤">next</a></code>", <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①⓪">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②⑤">DataError</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>key</var> is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than⑥">greater than</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②⑦">this</a>'s <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position①⓪">position</a> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②⑧">this</a>'s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction①①">direction</a> is "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prev" id="ref-for-dom-idbcursordirection-prev⑤">prev</a></code>", <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①①">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②⑥">DataError</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>key</var> is <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to⑤">equal to</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①②⑨">this</a>'s <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position①①">position</a> and <var>primaryKey</var> is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than④">less than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to⑥">equal to</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③⓪">this</a>'s <a data-link-type="dfn" href="#cursor-object-store-position" id="ref-for-cursor-object-store-position②">object store position</a> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③①">this</a>'s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction①②">direction</a> is "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-next" id="ref-for-dom-idbcursordirection-next⑥">next</a></code>", <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①②">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②⑦">DataError</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>key</var> is <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to⑦">equal to</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③②">this</a>'s <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position①②">position</a> and <var>primaryKey</var> is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than⑦">greater than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to⑧">equal to</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③③">this</a>'s <a data-link-type="dfn" href="#cursor-object-store-position" id="ref-for-cursor-object-store-position③">object store position</a> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③④">this</a>'s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction①③">direction</a> is "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prev" id="ref-for-dom-idbcursordirection-prev⑥">prev</a></code>", <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①③">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②⑧">DataError</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>Set <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③⑤">this</a>'s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag①①">got value flag</a> to false.</p> <li data-md> <p>Let <var>request</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③⑥">this</a>'s <a data-link-type="dfn" href="#cursor-request" id="ref-for-cursor-request⑧">request</a>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-processed-flag" id="ref-for-request-processed-flag④">processed flag</a> to false.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①④">done flag</a> to false.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#iterate-a-cursor" id="ref-for-iterate-a-cursor⑥">iterate a cursor</a> with <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm" id="ref-for-current-realm①⓪">the current Realm record</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③⑦">this</a>, <var>key</var>, and <var>primaryKey</var>.</p> <li data-md> <p>Run <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request②⓪">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③⑧">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source②①">source</a>, <var>operation</var>, and <var>request</var>.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Calling this method more than once before new cursor data has been loaded - for example, calling <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-continueprimarykey" id="ref-for-dom-idbcursor-continueprimarykey②">continuePrimaryKey()</a></code> twice from the same onsuccess handler - results in 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> being thrown on the second call because the cursor’s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag①②">got value flag</a> has been set to false.</p> <div class="domintro note" role="note"> The following methods throw a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#readonlyerror" id="ref-for-readonlyerror⑤">ReadOnlyError</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> if called within a <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction⑧">read-only transaction</a>, and a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror③③">TransactionInactiveError</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> if called when the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥⑤">transaction</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③⑧">active</a>. <dl> <dt data-md><var>request</var> = <var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-update" id="ref-for-dom-idbcursor-update①">update</a></code>(<var>value</var>) <dd data-md> <p>Updated the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦①">record</a> pointed at by the cursor with a new value.</p> <p>Throws a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror②⑨">DataError</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> if the <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store④">effective object store</a> uses <a data-link-type="dfn" href="#object-store-in-line-keys" id="ref-for-object-store-in-line-keys④">in-line keys</a> and the <a data-link-type="dfn" href="#key" id="ref-for-key⑧⓪">key</a> would have changed.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result②③">result</a></code> will be the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦②">record</a>'s <a data-link-type="dfn" href="#key" id="ref-for-key⑧①">key</a>.</p> <dt data-md><var>request</var> = <var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-delete" id="ref-for-dom-idbcursor-delete①">delete</a></code>() <dd data-md> <p>Delete the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦③">record</a> pointed at by the cursor with a new value.</p> <p>If successful, <var>request</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbrequest-result" id="ref-for-dom-idbrequest-result②④">result</a></code> will be <code>undefined</code>.</p> </dl> </div> <div class="algorithm" data-algorithm="update(value)" data-algorithm-for="IDBCursor"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="method" data-export id="dom-idbcursor-update"><code>update(<var>value</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①③⑨">this</a>'s <a data-link-type="dfn" href="#cursor-transaction" id="ref-for-cursor-transaction⑦">transaction</a>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③④">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active③⑨">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①④">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror③④">TransactionInactiveError</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>transaction</var> is a <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction⑨">read-only transaction</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①⑤">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#readonlyerror" id="ref-for-readonlyerror⑥">ReadOnlyError</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 <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④⓪">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source②②">source</a> or <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store⑤">effective object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①⑥">throw</a> 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>.</p> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④①">this</a>'s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag①③">got value flag</a> is false, indicating that the cursor is being iterated or has iterated past its end, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①⑦">throw</a> 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>.</p> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④②">this</a>'s <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag⑥">key only flag</a> is true, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①⑧">throw</a> 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>.</p> <li data-md> <p>Let <var>targetRealm</var> be a user-agent defined <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#realm" id="ref-for-realm①">Realm</a>.</p> <li data-md> <p>Let <var>clone</var> be a <a data-link-type="dfn" href="#clone" id="ref-for-clone①">clone</a> of <var>value</var> in <var>targetRealm</var> during <var>transaction</var>. Rethrow any exceptions.</p> <details class="note"> <summary>Why create a copy of the value?</summary> The value is serialized when stored. Treating it as a copy here allows other algorithms in this specification to treat it as an ECMAScript value, but implementations can optimize this if the difference in behavior is not observable. </details> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④③">this</a>'s <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store⑥">effective object store</a> uses <a data-link-type="dfn" href="#object-store-in-line-keys" id="ref-for-object-store-in-line-keys⑤">in-line keys</a>, then:</p> <ol> <li data-md> <p>Let <var>kpk</var> be the result of <a data-link-type="dfn" href="#extract-a-key-from-a-value-using-a-key-path" id="ref-for-extract-a-key-from-a-value-using-a-key-path②">extracting a key from a value using a key path</a> with <var>clone</var> and the <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①⑥">key path</a> of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④④">this</a>'s <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store⑦">effective object store</a>. Rethrow any exceptions.</p> <li data-md> <p>If <var>kpk</var> is failure, invalid, or not <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to⑨">equal to</a> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④⑤">this</a>'s <a data-link-type="dfn" href="#cursor-effective-key" id="ref-for-cursor-effective-key④">effective key</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①①⑨">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#dataerror" id="ref-for-dataerror③⓪">DataError</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> </ol> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#store-a-record-into-an-object-store" id="ref-for-store-a-record-into-an-object-store①">store a record into an object store</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④⑥">this</a>'s <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store⑧">effective object store</a>, <var>clone</var>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④⑦">this</a>'s <a data-link-type="dfn" href="#cursor-effective-key" id="ref-for-cursor-effective-key⑤">effective key</a>, and false.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest④③">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request②①">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④⑧">this</a> and <var>operation</var>.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> A result of <a data-link-type="dfn" href="#store-a-record-into-an-object-store" id="ref-for-store-a-record-into-an-object-store②">storing a record into an object store</a> is that if the record has been deleted since the cursor moved to it, a new record will be created.</p> <div class="algorithm" data-algorithm="delete()" data-algorithm-for="IDBCursor"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursor" data-dfn-type="method" data-export id="dom-idbcursor-delete"><code>delete()</code></dfn> method steps are:</p> <ol> <li data-md> <p>Let <var>transaction</var> be <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①④⑨">this</a>'s <a data-link-type="dfn" href="#cursor-transaction" id="ref-for-cursor-transaction⑧">transaction</a>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③⑤">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④⓪">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②⓪">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#transactioninactiveerror" id="ref-for-transactioninactiveerror③⑤">TransactionInactiveError</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>transaction</var> is a <a data-link-type="dfn" href="#transaction-read-only-transaction" id="ref-for-transaction-read-only-transaction①⓪">read-only transaction</a>, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②①">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#readonlyerror" id="ref-for-readonlyerror⑦">ReadOnlyError</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 <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤⓪">this</a>'s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source②③">source</a> or <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store⑨">effective object store</a> has been deleted, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②②">throw</a> 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>.</p> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤①">this</a>'s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag①④">got value flag</a> is false, indicating that the cursor is being iterated or has iterated past its end, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②③">throw</a> 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>.</p> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤②">this</a>'s <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag⑦">key only flag</a> is true, <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②④">throw</a> 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>.</p> <li data-md> <p>Let <var>operation</var> be an algorithm to run <a data-link-type="dfn" href="#delete-records-from-an-object-store" id="ref-for-delete-records-from-an-object-store①">delete records from an object store</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤③">this</a>'s <a data-link-type="dfn" href="#cursor-effective-object-store" id="ref-for-cursor-effective-object-store①⓪">effective object store</a> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤④">this</a>'s <a data-link-type="dfn" href="#cursor-effective-key" id="ref-for-cursor-effective-key⑥">effective key</a>.</p> <li data-md> <p>Return the result (an <code class="idl"><a data-link-type="idl" href="#idbrequest" id="ref-for-idbrequest④④">IDBRequest</a></code>) of running <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request②②">asynchronously execute a request</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤⑤">this</a> and <var>operation</var>.</p> </ol> </div> <p>A <a data-link-type="dfn" href="#cursor" id="ref-for-cursor③①">cursor</a> that has its <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag⑧">key only flag</a> set to false implements the <code class="idl"><a data-link-type="idl" href="#idbcursorwithvalue" id="ref-for-idbcursorwithvalue②">IDBCursorWithValue</a></code> interface as well.</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbcursorwithvalue"><code><c- g>IDBCursorWithValue</c-></code></dfn> : <a data-link-type="idl-name" href="#idbcursor" id="ref-for-idbcursor⑦"><c- n>IDBCursor</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-any" id="ref-for-idl-any③⑧"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbcursorwithvalue-value" id="ref-for-dom-idbcursorwithvalue-value"><c- g>value</c-></a>; }; </pre> <div class="domintro note" role="note"> <dl> <dt data-md><var>cursor</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbcursorwithvalue-value" id="ref-for-dom-idbcursorwithvalue-value①">value</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#cursor" id="ref-for-cursor③②">cursor</a>'s current <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value⑤">value</a>.</p> </dl> </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBCursorWithValue" data-dfn-type="attribute" data-export id="dom-idbcursorwithvalue-value"><code>value</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤⑥">this</a>'s current <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value⑥">value</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> If <code class="idl"><a data-link-type="idl" href="#dom-idbcursorwithvalue-value" id="ref-for-dom-idbcursorwithvalue-value②">value</a></code> returns an object, it returns the same object instance every time it is inspected, until the cursor’s <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value⑦">value</a> is changed. This means that if the object is modified, those modifications will be seen by anyone inspecting the value of the cursor. However modifying such an object does not modify the contents of the database.</p> <h3 class="heading settled" data-level="4.9" id="transaction"><span class="secno">4.9. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#idbtransaction" id="ref-for-idbtransaction⑤">IDBTransaction</a></code> interface</span><a class="self-link" href="#transaction"></a></h3> <p><a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥⑥">Transaction</a> objects implement the following interface:</p> <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- n>Worker</c->)] <c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="idbtransaction"><code><c- g>IDBTransaction</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> { <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist" id="ref-for-domstringlist⑤"><c- n>DOMStringList</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMStringList" href="#dom-idbtransaction-objectstorenames" id="ref-for-dom-idbtransaction-objectstorenames"><c- g>objectStoreNames</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-idbtransactionmode" id="ref-for-enumdef-idbtransactionmode①"><c- n>IDBTransactionMode</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBTransactionMode" href="#dom-idbtransaction-mode" id="ref-for-dom-idbtransaction-mode"><c- g>mode</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-idbtransactiondurability" id="ref-for-enumdef-idbtransactiondurability①"><c- n>IDBTransactionDurability</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBTransactionDurability" href="#dom-idbtransaction-durability" id="ref-for-dom-idbtransaction-durability"><c- g>durability</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="#idbdatabase" id="ref-for-idbdatabase⑧"><c- n>IDBDatabase</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBDatabase" href="#dom-idbtransaction-db" id="ref-for-dom-idbtransaction-db"><c- g>db</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException①⑥①"><c- n>DOMException</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMException?" href="#dom-idbtransaction-error" id="ref-for-dom-idbtransaction-error"><c- g>error</c-></a>; <a data-link-type="idl-name" href="#idbobjectstore" id="ref-for-idbobjectstore①⑥"><c- n>IDBObjectStore</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbtransaction-objectstore" id="ref-for-dom-idbtransaction-objectstore"><c- g>objectStore</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="IDBTransaction/objectStore(name)" data-dfn-type="argument" data-export id="dom-idbtransaction-objectstore-name-name"><code><c- g>name</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 class="idl-code" data-link-type="method" href="#dom-idbtransaction-commit" id="ref-for-dom-idbtransaction-commit①"><c- g>commit</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-idbtransaction-abort" id="ref-for-dom-idbtransaction-abort①"><c- g>abort</c-></a>(); // Event handlers: <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-idbtransaction-onabort" id="ref-for-dom-idbtransaction-onabort"><c- g>onabort</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-idbtransaction-oncomplete" id="ref-for-dom-idbtransaction-oncomplete"><c- g>oncomplete</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-idbtransaction-onerror" id="ref-for-dom-idbtransaction-onerror"><c- g>onerror</c-></a>; }; <c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-idbtransactionmode"><code><c- g>IDBTransactionMode</c-></code></dfn> { <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransactionMode" data-dfn-type="enum-value" data-export id="dom-idbtransactionmode-readonly"><code><c- s>"readonly"</c-></code></dfn>, <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransactionMode" data-dfn-type="enum-value" data-export id="dom-idbtransactionmode-readwrite"><code><c- s>"readwrite"</c-></code></dfn>, <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransactionMode" data-dfn-type="enum-value" data-export id="dom-idbtransactionmode-versionchange"><code><c- s>"versionchange"</c-></code></dfn> }; </pre> <div class="domintro note" role="note"> <dl> <dt data-md><var>transaction</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-objectstorenames" id="ref-for-dom-idbtransaction-objectstorenames①">objectStoreNames</a></code> <dd data-md> <p>Returns a list of the names of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨⓪">object stores</a> in the transaction’s <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope⑨">scope</a>. For an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④③">upgrade transaction</a> this is all object stores in the <a data-link-type="dfn" href="#database" id="ref-for-database⑤③">database</a>.</p> <dt data-md><var>transaction</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-mode" id="ref-for-dom-idbtransaction-mode①">mode</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode⑧">mode</a> the transaction was created with ("<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readonly" id="ref-for-dom-idbtransactionmode-readonly⑤">readonly</a></code>" or "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-readwrite" id="ref-for-dom-idbtransactionmode-readwrite⑤">readwrite</a></code>"), or "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactionmode-versionchange" id="ref-for-dom-idbtransactionmode-versionchange②">versionchange</a></code>" for an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④④">upgrade transaction</a>.</p> <dt data-md><var>transaction</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-durability" id="ref-for-dom-idbtransaction-durability①">durability</a></code> <dd data-md> <p>Returns the <a data-link-type="dfn" href="#transaction-durability-hint" id="ref-for-transaction-durability-hint①">durability hint</a> the transaction was created with ("<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-strict" id="ref-for-dom-idbtransactiondurability-strict④">strict</a></code>", "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-relaxed" id="ref-for-dom-idbtransactiondurability-relaxed③">relaxed</a></code>"), or "<code class="idl"><a data-link-type="idl" href="#dom-idbtransactiondurability-default" id="ref-for-dom-idbtransactiondurability-default③">default</a></code>").</p> <dt data-md><var>transaction</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-db" id="ref-for-dom-idbtransaction-db①">db</a></code> <dd data-md> <p>Returns the transaction’s <a data-link-type="dfn" href="#transaction-connection" id="ref-for-transaction-connection①">connection</a>.</p> <dt data-md><var>transaction</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-error" id="ref-for-dom-idbtransaction-error①">error</a></code> <dd data-md> <p>If the transaction was <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort⑦">aborted</a>, returns the error (a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException①⑥②">DOMException</a></code>) providing the reason.</p> </dl> </div> <div class="algorithm" data-algorithm="objectStoreNames" data-algorithm-for="IDBTransaction"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="attribute" data-export id="dom-idbtransaction-objectstorenames"><code>objectStoreNames</code></dfn> getter steps are:</p> <ol> <li data-md> <p>Let <var>names</var> be a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑤">list</a> of the <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①⑦">names</a> of the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨①">object stores</a> in <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤⑦">this</a>'s <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope①⓪">scope</a>.</p> <li data-md> <p>Return the result (a <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist" id="ref-for-domstringlist⑥">DOMStringList</a></code>) of <a data-link-type="dfn" href="#create-a-sorted-name-list" id="ref-for-create-a-sorted-name-list②">creating a sorted name list</a> with <var>names</var>.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> The contents of each list returned by this attribute does not change, but subsequent calls to this attribute during an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④⑤">upgrade transaction</a> can return lists with different contents as <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨②">object stores</a> are created and deleted.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="attribute" data-export id="dom-idbtransaction-mode"><code>mode</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤⑧">this</a>'s <a data-link-type="dfn" href="#transaction-mode" id="ref-for-transaction-mode⑨">mode</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="attribute" data-export id="dom-idbtransaction-durability"><code>durability</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑤⑨">this</a>'s <a data-link-type="dfn" href="#transaction-durability-hint" id="ref-for-transaction-durability-hint②">durability hint</a>.</p> <div class="advisement"> 🚧 The <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-durability" id="ref-for-dom-idbtransaction-durability②">durability</a></code> attribute is new in this edition. It is supported in Chrome 82, Edge 82, Firefox 126, and Safari 15. 🚧 </div> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="attribute" data-export id="dom-idbtransaction-db"><code>db</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥⓪">this</a>'s <a data-link-type="dfn" href="#transaction-connection" id="ref-for-transaction-connection②">connection</a>'s associated <a data-link-type="dfn" href="#database" id="ref-for-database⑤④">database</a>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="attribute" data-export id="dom-idbtransaction-error"><code>error</code></dfn> getter steps are to return <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥①">this</a>'s <a data-link-type="dfn" href="#transaction-error" id="ref-for-transaction-error">error</a>, or null if none.</p> <p class="note" role="note"><span class="marker">NOTE:</span> If this <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥⑦">transaction</a> was aborted due to a failed <a data-link-type="dfn" href="#request" id="ref-for-request③⓪">request</a>, this will be the same as the <a data-link-type="dfn" href="#request" id="ref-for-request③①">request</a>'s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error⑥">error</a>. If this <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥⑧">transaction</a> was aborted due to an uncaught exception in an event handler, the error will be a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror①">AbortError</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>. If the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑥⑨">transaction</a> was aborted due to an error while committing, it will reflect the reason for the failure (e.g. "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#quotaexceedederror" id="ref-for-quotaexceedederror③">QuotaExceededError</a></code>", "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror⑨">ConstraintError</a></code>", or "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#unknownerror" id="ref-for-unknownerror②">UnknownError</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> <div class="domintro note" role="note"> <dl> <dt data-md><var>transaction</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-objectstore" id="ref-for-dom-idbtransaction-objectstore①">objectStore</a></code>(<var>name</var>) <dd data-md> <p>Returns an <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore①⑦">IDBObjectStore</a></code> in the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦⓪">transaction</a>'s <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope①①">scope</a>.</p> <dt data-md><var>transaction</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-abort" id="ref-for-dom-idbtransaction-abort②">abort()</a></code> <dd data-md> <p>Aborts the transaction. All pending <a data-link-type="dfn" href="#request" id="ref-for-request③②">requests</a> will fail with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror②">AbortError</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 all changes made to the database will be reverted.</p> <dt data-md><var>transaction</var> . <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-commit" id="ref-for-dom-idbtransaction-commit②">commit()</a></code> <dd data-md> <p>Attempts to commit the transaction. All pending <a data-link-type="dfn" href="#request" id="ref-for-request③③">requests</a> will be allowed to complete, but no new requests will be accepted. This can be used to force a transaction to quickly finish, without waiting for pending requests to fire <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success⑧">success</a></code> events before attempting to commit normally.</p> <p>The transaction will abort if a pending request fails, for example due to a constraint error. The <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success⑨">success</a></code> events for successful requests will still fire, but throwing an exception in an event handler will not abort the transaction. Similarly, <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error⑦">error</a></code> events for failed requests will still fire, but calling <code>preventDefault()</code> will not prevent the transaction from aborting.</p> </dl> </div> <div class="algorithm" data-algorithm="objectStore(name)" data-algorithm-for="IDBTransaction"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="method" data-export id="dom-idbtransaction-objectstore"><code>objectStore(<var>name</var>)</code></dfn> method steps are:</p> <ol> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥②">this</a>'s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③⑥">state</a> is <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①⑤">finished</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②⑤">throw</a> 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>.</p> <li data-md> <p>Let <var>store</var> be the <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨③">object store</a> <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①⑧">named</a> <var>name</var> in <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥③">this</a>'s <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope①②">scope</a>, or <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②⑥">throw</a> a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notfounderror" id="ref-for-notfounderror⑤">NotFoundError</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> if none.</p> <li data-md> <p>Return an <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle①⓪">object store handle</a> associated with <var>store</var> and <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥④">this</a>.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Each call to this method on the same <code class="idl"><a data-link-type="idl" href="#idbtransaction" id="ref-for-idbtransaction⑥">IDBTransaction</a></code> instance with the same name returns the same <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore①⑧">IDBObjectStore</a></code> instance.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The returned <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore①⑨">IDBObjectStore</a></code> instance is specific to this <code class="idl"><a data-link-type="idl" href="#idbtransaction" id="ref-for-idbtransaction⑦">IDBTransaction</a></code>. If this method is called on a different <code class="idl"><a data-link-type="idl" href="#idbtransaction" id="ref-for-idbtransaction⑧">IDBTransaction</a></code>, a different <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore②⓪">IDBObjectStore</a></code> instance is returned.</p> <div class="algorithm" data-algorithm="abort()" data-algorithm-for="IDBTransaction"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="method" data-export id="dom-idbtransaction-abort"><code>abort()</code></dfn> method steps are:</p> <ol> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥⑤">this</a>'s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③⑦">state</a> is <a data-link-type="dfn" href="#transaction-committing" id="ref-for-transaction-committing①">committing</a> or <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①⑥">finished</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②⑦">throw</a> 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>.</p> <li data-md> <p>Set <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥⑥">this</a>'s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③⑧">state</a> to <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive②">inactive</a> and run <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction③">abort a transaction</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥⑦">this</a> and null.</p> </ol> </div> <div class="algorithm" data-algorithm="commit()" data-algorithm-for="IDBTransaction"> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="method" data-export id="dom-idbtransaction-commit"><code>commit()</code></dfn> method steps are:</p> <ol> <li data-md> <p>If <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥⑧">this</a>'s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state③⑨">state</a> is not <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④①">active</a>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw①②⑧">throw</a> 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>.</p> <li data-md> <p>Run <a data-link-type="dfn" href="#commit-a-transaction" id="ref-for-commit-a-transaction">commit a transaction</a> with <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#this" id="ref-for-this①⑥⑨">this</a>.</p> </ol> </div> <div class="advisement"> 🚧 The <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-commit" id="ref-for-dom-idbtransaction-commit③">commit()</a></code> method is new in this edition. It is supported in Chrome 76, Edge 79, Firefox 74, and Safari 15. 🚧 </div> <p class="note" role="note"><span class="marker">NOTE:</span> It is not normally necessary to call <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-commit" id="ref-for-dom-idbtransaction-commit④">commit()</a></code> on a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦①">transaction</a>. A transaction will automatically commit when all outstanding requests have been satisfied and no new requests have been made. This call can be used to start the <a data-link-type="dfn" href="#transaction-commit" id="ref-for-transaction-commit⑦">commit</a> process without waiting for events from outstanding <a data-link-type="dfn" href="#request" id="ref-for-request③④">requests</a> to be dispatched.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="attribute" data-export id="dom-idbtransaction-onabort"><code>onabort</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type⑧">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbtransaction-abort" id="ref-for-eventdef-idbtransaction-abort②">abort</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="attribute" data-export id="dom-idbtransaction-oncomplete"><code>oncomplete</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type⑨">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbtransaction-complete" id="ref-for-eventdef-idbtransaction-complete①">complete</a></code>.</p> <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="IDBTransaction" data-dfn-type="attribute" data-export id="dom-idbtransaction-onerror"><code>onerror</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> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type" id="ref-for-event-handler-event-type①⓪">event handler event type</a> is <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error⑧">error</a></code>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> To determine if a <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦②">transaction</a> has completed successfully, listen to the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦③">transaction</a>'s <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbtransaction-complete" id="ref-for-eventdef-idbtransaction-complete②">complete</a></code> event rather than the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success①⓪">success</a></code> event of a particular <a data-link-type="dfn" href="#request" id="ref-for-request③⑤">request</a>, because the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦④">transaction</a> can still fail after the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-success" id="ref-for-eventdef-idbrequest-success①①">success</a></code> event fires.</p> <h2 class="heading settled" data-level="5" id="algorithms"><span class="secno">5. </span><span class="content">Algorithms</span><a class="self-link" href="#algorithms"></a></h2> <h3 class="heading settled" data-level="5.1" id="opening"><span class="secno">5.1. </span><span class="content">Opening a database connection</span><a class="self-link" href="#opening"></a></h3> <div class="algorithm" data-algorithm="open a database connection"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="open-a-database-connection">open a database connection</dfn> with <var>storageKey</var> which requested the <a data-link-type="dfn" href="#database" id="ref-for-database⑤⑤">database</a> to be opened, a database <var>name</var>, a database <var>version</var>, and a <var>request</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>queue</var> be the <a data-link-type="dfn" href="#connection-queue" id="ref-for-connection-queue②">connection queue</a> for <var>storageKey</var> and <var>name</var>.</p> <li data-md> <p>Add <var>request</var> to <var>queue</var>.</p> <li data-md> <p>Wait until all previous requests in <var>queue</var> have been processed.</p> <li data-md> <p>Let <var>db</var> be the <a data-link-type="dfn" href="#database" id="ref-for-database⑤⑥">database</a> <a data-link-type="dfn" href="#database-name" id="ref-for-database-name④">named</a> <var>name</var> in <var>storageKey</var>, or null otherwise.</p> <li data-md> <p>If <var>version</var> is undefined, let <var>version</var> be 1 if <var>db</var> is null, or <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version⑨">version</a> otherwise.</p> <li data-md> <p>If <var>db</var> is null, let <var>db</var> be a new <a data-link-type="dfn" href="#database" id="ref-for-database⑤⑦">database</a> with <a data-link-type="dfn" href="#database-name" id="ref-for-database-name⑤">name</a> <var>name</var>, <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①⓪">version</a> 0 (zero), and with no <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨④">object stores</a>. If this fails for any reason, return an appropriate error (e.g. a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#quotaexceedederror" id="ref-for-quotaexceedederror④">QuotaExceededError</a></code>" or "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#unknownerror" id="ref-for-unknownerror③">UnknownError</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>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①①">version</a> is greater than <var>version</var>, return a newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#versionerror" id="ref-for-versionerror①">VersionError</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 abort these steps.</p> <li data-md> <p>Let <var>connection</var> be a new <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤①">connection</a> to <var>db</var>.</p> <li data-md> <p>Set <var>connection</var>’s <a data-link-type="dfn" href="#connection-version" id="ref-for-connection-version②">version</a> to <var>version</var>.</p> <li data-md> <p>If <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①②">version</a> is less than <var>version</var>, then:</p> <ol> <li data-md> <p>Let <var>openConnections</var> be the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-set" id="ref-for-ordered-set②">set</a> of all <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤②">connections</a>, except <var>connection</var>, associated with <var>db</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate①">For each</a> <var>entry</var> of <var>openConnections</var> that does not have its <a data-link-type="dfn" href="#connection-close-pending-flag" id="ref-for-connection-close-pending-flag④">close pending flag</a> set to true, <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-a-version-change-event" id="ref-for-fire-a-version-change-event①">fire a version change event</a> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange⑧">versionchange</a></code> at <var>entry</var> with <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①③">version</a> and <var>version</var>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Firing this event might cause one or more of the other objects in <var>openConnections</var> to be closed, in which case the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange⑨">versionchange</a></code> event is not fired at those objects, even if that hasn’t yet been done.</p> <li data-md> <p>Wait for all of the events to be fired.</p> <li data-md> <p>If any of the <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤③">connections</a> in <var>openConnections</var> are still not closed, <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-a-version-change-event" id="ref-for-fire-a-version-change-event②">fire a version change event</a> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-blocked" id="ref-for-eventdef-idbopendbrequest-blocked④">blocked</a></code> at <var>request</var> with <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①④">version</a> and <var>version</var>.</p> <li data-md> <p><span id="version-change-close-block">Wait</span> until all <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤④">connections</a> in <var>openConnections</var> are <a data-link-type="dfn" href="#connection-closed" id="ref-for-connection-closed⑤">closed</a>.</p> <li data-md> <p>Run <a data-link-type="dfn" href="#upgrade-a-database" id="ref-for-upgrade-a-database②">upgrade a database</a> using <var>connection</var>, <var>version</var> and <var>request</var>.</p> <li data-md> <p>If <var>connection</var> was <a data-link-type="dfn" href="#connection-closed" id="ref-for-connection-closed⑥">closed</a>, return a newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception①">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror③">AbortError</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 abort these steps.</p> <li data-md> <p>If the <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④⑥">upgrade transaction</a> was aborted, run the steps to <a data-link-type="dfn" href="#close-a-database-connection" id="ref-for-close-a-database-connection④">close a database connection</a> with <var>connection</var>, return a newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception②">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror④">AbortError</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 abort these steps.</p> </ol> <li data-md> <p>Return <var>connection</var>.</p> </ol> </div> <h3 class="heading settled" data-level="5.2" id="closing-connection"><span class="secno">5.2. </span><span class="content">Closing a database connection</span><a class="self-link" href="#closing-connection"></a></h3> <div class="algorithm" data-algorithm="close a database connection"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="close-a-database-connection">close a database connection</dfn> with a <var>connection</var> object, and an optional <var>forced flag</var>, run these steps:</p> <ol> <li data-md> <p>Set <var>connection</var>’s <a data-link-type="dfn" href="#connection-close-pending-flag" id="ref-for-connection-close-pending-flag⑤">close pending flag</a> to true.</p> <li data-md> <p>If the <var>forced flag</var> is true, then for each <var>transaction</var> <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created⑦">created</a> using <var>connection</var> run <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction④">abort a transaction</a> with <var>transaction</var> and newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception③">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror⑤">AbortError</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>Wait for all transactions <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created⑧">created</a> using <var>connection</var> to complete. Once they are complete, <var>connection</var> is <a data-link-type="dfn" href="#connection-closed" id="ref-for-connection-closed⑦">closed</a>.</p> <li data-md> <p>If the <var>forced flag</var> is true, then <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 <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-close" id="ref-for-eventdef-idbdatabase-close①">close</a></code> at <var>connection</var>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-close" id="ref-for-eventdef-idbdatabase-close②">close</a></code> event only fires if the connection closes abnormally, e.g. if the <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-key" id="ref-for-storage-key⑥">storage key</a>'s storage is cleared, or there is corruption or an I/O error. If <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-close" id="ref-for-dom-idbdatabase-close④">close()</a></code> is called explicitly the event <em>does not</em> fire.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Once a <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤⑤">connection</a>'s <a data-link-type="dfn" href="#connection-close-pending-flag" id="ref-for-connection-close-pending-flag⑥">close pending flag</a> has been set to true, no new transactions can be <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created⑨">created</a> using the <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤⑥">connection</a>. All methods that <a data-link-type="dfn" href="#transaction-created" id="ref-for-transaction-created①⓪">create</a> transactions first check the <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤⑦">connection</a>'s <a data-link-type="dfn" href="#connection-close-pending-flag" id="ref-for-connection-close-pending-flag⑦">close pending flag</a> first and throw an exception if it is true.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Once the <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤⑧">connection</a> is closed, this can unblock the steps to <a data-link-type="dfn" href="#upgrade-a-database" id="ref-for-upgrade-a-database③">upgrade a database</a>, and the steps to <a data-link-type="dfn" href="#delete-a-database" id="ref-for-delete-a-database①">delete a database</a>, which <a href="#delete-close-block">both</a> <a href="#version-change-close-block">wait</a> for <a data-link-type="dfn" href="#connection" id="ref-for-connection⑤⑨">connections</a> to a given <a data-link-type="dfn" href="#database" id="ref-for-database⑤⑧">database</a> to be closed before continuing.</p> <h3 class="heading settled" data-level="5.3" id="deleting-a-database"><span class="secno">5.3. </span><span class="content">Deleting a database</span><a class="self-link" href="#deleting-a-database"></a></h3> <div class="algorithm" data-algorithm="delete a database"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="delete-a-database">delete a database</dfn> with the <var>storageKey</var> that requested the <a data-link-type="dfn" href="#database" id="ref-for-database⑤⑨">database</a> to be deleted, a database <var>name</var>, and a <var>request</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>queue</var> be the <a data-link-type="dfn" href="#connection-queue" id="ref-for-connection-queue③">connection queue</a> for <var>storageKey</var> and <var>name</var>.</p> <li data-md> <p>Add <var>request</var> to <var>queue</var>.</p> <li data-md> <p>Wait until all previous requests in <var>queue</var> have been processed.</p> <li data-md> <p>Let <var>db</var> be the <a data-link-type="dfn" href="#database" id="ref-for-database⑥⓪">database</a> <a data-link-type="dfn" href="#database-name" id="ref-for-database-name⑥">named</a> <var>name</var> in <var>storageKey</var>, if one exists. Otherwise, return 0 (zero).</p> <li data-md> <p>Let <var>openConnections</var> be the <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-set" id="ref-for-ordered-set③">set</a> of all <a data-link-type="dfn" href="#connection" id="ref-for-connection⑥⓪">connections</a> associated with <var>db</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate②">For each</a> <var>entry</var> of <var>openConnections</var> that does not have its <a data-link-type="dfn" href="#connection-close-pending-flag" id="ref-for-connection-close-pending-flag⑧">close pending flag</a> set to true, <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-a-version-change-event" id="ref-for-fire-a-version-change-event③">fire a version change event</a> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange①⓪">versionchange</a></code> at <var>entry</var> with <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①⑤">version</a> and null.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Firing this event might cause one or more of the other objects in <var>openConnections</var> to be closed, in which case the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbdatabase-versionchange" id="ref-for-eventdef-idbdatabase-versionchange①①">versionchange</a></code> event is not fired at those objects, even if that hasn’t yet been done.</p> <li data-md> <p>Wait for all of the events to be fired.</p> <li data-md> <p>If any of the <a data-link-type="dfn" href="#connection" id="ref-for-connection⑥①">connections</a> in <var>openConnections</var> are still not closed, <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-a-version-change-event" id="ref-for-fire-a-version-change-event④">fire a version change event</a> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-blocked" id="ref-for-eventdef-idbopendbrequest-blocked⑤">blocked</a></code> at <var>request</var> with <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①⑥">version</a> and null.</p> <li data-md> <p><span id="delete-close-block">Wait</span> until all <a data-link-type="dfn" href="#connection" id="ref-for-connection⑥②">connections</a> in <var>openConnections</var> are <a data-link-type="dfn" href="#connection-closed" id="ref-for-connection-closed⑧">closed</a>.</p> <li data-md> <p>Let <var>version</var> be <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①⑦">version</a>.</p> <li data-md> <p>Delete <var>db</var>. If this fails for any reason, return an appropriate error (e.g. "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#quotaexceedederror" id="ref-for-quotaexceedederror⑤">QuotaExceededError</a></code>" or "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#unknownerror" id="ref-for-unknownerror④">UnknownError</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>Return <var>version</var>.</p> </ol> </div> <h3 class="heading settled" data-level="5.4" id="commit-transaction"><span class="secno">5.4. </span><span class="content">Committing a transaction</span><a class="self-link" href="#commit-transaction"></a></h3> <div class="algorithm" data-algorithm="commit a transaction"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="commit-a-transaction">commit a transaction</dfn> with the <var>transaction</var> to commit, run these steps:</p> <ol> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④⓪">state</a> to <a data-link-type="dfn" href="#transaction-committing" id="ref-for-transaction-committing②">committing</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>Wait until every item in <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-request-list" id="ref-for-transaction-request-list">request list</a> is <a data-link-type="dfn" href="#request-processed" id="ref-for-request-processed①">processed</a>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④①">state</a> is no longer <a data-link-type="dfn" href="#transaction-committing" id="ref-for-transaction-committing③">committing</a>, then terminate these steps.</p> <li data-md> <p>Attempt to write any outstanding changes made by <var>transaction</var> to the <a data-link-type="dfn" href="#database" id="ref-for-database⑥①">database</a>, considering <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-durability-hint" id="ref-for-transaction-durability-hint③">durability hint</a>.</p> <li data-md> <p>If an error occurs while writing the changes to the <a data-link-type="dfn" href="#database" id="ref-for-database⑥②">database</a>, then run <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction⑤">abort a transaction</a> with <var>transaction</var> and an appropriate type for the error, for example "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#quotaexceedederror" id="ref-for-quotaexceedederror⑥">QuotaExceededError</a></code>" or "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#unknownerror" id="ref-for-unknownerror⑤">UnknownError</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 terminate these steps.</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 run these steps:</p> <ol> <li data-md> <p>If <var>transaction</var> is an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④⑦">upgrade transaction</a>, then set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-connection" id="ref-for-transaction-connection③">connection</a>'s associated <a data-link-type="dfn" href="#database" id="ref-for-database⑥③">database</a>'s <a data-link-type="dfn" href="#database-upgrade-transaction" id="ref-for-database-upgrade-transaction②">upgrade transaction</a> to null.</p> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④②">state</a> to <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①⑦">finished</a>.</p> <li data-md> <p><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 <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbtransaction-complete" id="ref-for-eventdef-idbtransaction-complete③">complete</a></code> at <var>transaction</var>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Even if an exception is thrown from one of the event handlers of this event, the transaction is still committed since writing the database changes happens before the event takes place. Only after the transaction has been successfully written is the <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbtransaction-complete" id="ref-for-eventdef-idbtransaction-complete④">complete</a></code> event fired.</p> <li data-md> <p>If <var>transaction</var> is an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④⑧">upgrade transaction</a>, then let <var>request</var> be the <a data-link-type="dfn" href="#request" id="ref-for-request③⑥">request</a> associated with <var>transaction</var> and set <var>request</var>’s <a data-link-type="dfn" href="#request-transaction" id="ref-for-request-transaction③">transaction</a> to null.</p> </ol> </ol> </ol> </div> <h3 class="heading settled" data-level="5.5" id="abort-transaction"><span class="secno">5.5. </span><span class="content">Aborting a transaction</span><a class="self-link" href="#abort-transaction"></a></h3> <div class="algorithm" data-algorithm="abort a transaction"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="abort-a-transaction">abort a transaction</dfn> with the <var>transaction</var> to abort, and <var>error</var>, run these steps:</p> <ol> <li data-md> <p>All the changes made to the <a data-link-type="dfn" href="#database" id="ref-for-database⑥④">database</a> by the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦⑤">transaction</a> are reverted. For <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction④⑨">upgrade transactions</a> this includes changes to the set of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨⑤">object stores</a> and <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept③⑨">indexes</a>, as well as the change to the <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①⑧">version</a>. Any <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨⑥">object stores</a> and <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④⓪">indexes</a> which were created during the transaction are now considered deleted for the purposes of other algorithms.</p> <li data-md> <p>If <var>transaction</var> is an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑤⓪">upgrade transaction</a>, run the steps to <a data-link-type="dfn" href="#abort-an-upgrade-transaction" id="ref-for-abort-an-upgrade-transaction①">abort an upgrade transaction</a> with <var>transaction</var>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> This reverts changes to all <a data-link-type="dfn" href="#connection" id="ref-for-connection⑥③">connection</a>, <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle①①">object store handle</a>, and <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle⑧">index handle</a> instances associated with <var>transaction</var>.</p> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④③">state</a> to <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①⑧">finished</a>.</p> <li data-md> <p>If <var>error</var> is not null, set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-error" id="ref-for-transaction-error①">error</a> to <var>error</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate③">For each</a> <var>request</var> of <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-request-list" id="ref-for-transaction-request-list①">request list</a>, abort the steps to <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request②③">asynchronously execute a request</a> for <var>request</var>, set <var>request</var>’s <a data-link-type="dfn" href="#request-processed-flag" id="ref-for-request-processed-flag⑤">processed flag</a> to true, and <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 these steps:</p> <ol> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①⑤">done flag</a> to true.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-result" id="ref-for-request-result⑦">result</a> to undefined.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error⑦">error</a> to a newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception④">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror⑥">AbortError</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><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 <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error⑨">error</a></code> at <var>request</var> with its <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-bubbles" id="ref-for-dom-event-bubbles③">bubbles</a></code> and <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-cancelable" id="ref-for-dom-event-cancelable③">cancelable</a></code> attributes initialized to true.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> This does not always result in any <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbrequest-error" id="ref-for-eventdef-idbrequest-error①⓪">error</a></code> events being fired. For example if a transaction is aborted due to an error while <a data-link-type="dfn" href="#transaction-committing" id="ref-for-transaction-committing④">committing</a> the transaction, or if it was the last remaining request that failed.</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 run these steps:</p> <ol> <li data-md> <p>If <var>transaction</var> is an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑤①">upgrade transaction</a>, then set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-connection" id="ref-for-transaction-connection④">connection</a>'s associated <a data-link-type="dfn" href="#database" id="ref-for-database⑥⑤">database</a>'s <a data-link-type="dfn" href="#database-upgrade-transaction" id="ref-for-database-upgrade-transaction③">upgrade transaction</a> to null.</p> <li data-md> <p><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 <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbtransaction-abort" id="ref-for-eventdef-idbtransaction-abort③">abort</a></code> at <var>transaction</var> with its <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-bubbles" id="ref-for-dom-event-bubbles④">bubbles</a></code> attribute initialized to true.</p> <li data-md> <p>If <var>transaction</var> is an <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑤②">upgrade transaction</a>, then:</p> <ol> <li data-md> <p>Let <var>request</var> be the <a data-link-type="dfn" href="#request-open-request" id="ref-for-request-open-request①③">open request</a> associated with <var>transaction</var>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-transaction" id="ref-for-request-transaction④">transaction</a> to null.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-result" id="ref-for-request-result⑧">result</a> to undefined.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-processed-flag" id="ref-for-request-processed-flag⑥">processed flag</a> to false.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①⑥">done flag</a> to false.</p> </ol> </ol> </ol> </div> <h3 class="heading settled" data-level="5.6" id="async-execute-request"><span class="secno">5.6. </span><span class="content">Asynchronously executing a <a data-link-type="dfn" href="#request" id="ref-for-request③⑦">request</a></span><a class="self-link" href="#async-execute-request"></a></h3> <div class="algorithm" data-algorithm="asynchronously execute a request"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="asynchronously-execute-a-request">asynchronously execute a request</dfn> with the <var>source</var> object and an <var>operation</var> to perform on a database, and an optional <var>request</var>, run these steps:</p> <p>These steps can be aborted at any point if the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦⑥">transaction</a> the created <a data-link-type="dfn" href="#request" id="ref-for-request③⑧">request</a> belongs to is <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort⑧">aborted</a> using the steps to <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction⑥">abort a transaction</a>.</p> <ol> <li data-md> <p>Let <var>transaction</var> be the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦⑦">transaction</a> associated with <var>source</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert①">Assert</a>: <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④④">state</a> is <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④②">active</a>.</p> <li data-md> <p>If <var>request</var> was not given, let <var>request</var> be a new <a data-link-type="dfn" href="#request" id="ref-for-request③⑨">request</a> with <a data-link-type="dfn" href="#request-source" id="ref-for-request-source③">source</a> as <var>source</var>.</p> <li data-md> <p>Add <var>request</var> to the end of <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-request-list" id="ref-for-transaction-request-list②">request list</a>.</p> <li data-md> <p>Run these 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>Wait until <var>request</var> is the first item in <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-request-list" id="ref-for-transaction-request-list③">request list</a> that is not <a data-link-type="dfn" href="#request-processed" id="ref-for-request-processed②">processed</a>.</p> <li data-md> <p>Let <var>result</var> be the result of performing <var>operation</var>.</p> <li data-md> <p>If <var>result</var> is an error and <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④⑤">state</a> is <a data-link-type="dfn" href="#transaction-committing" id="ref-for-transaction-committing⑤">committing</a>, then run <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction⑦">abort a transaction</a> with <var>transaction</var> and <var>result</var>, and terminate these steps.</p> <li data-md> <p>If <var>result</var> is an error, then revert all changes made by <var>operation</var>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> This only reverts the changes done by this request, not any other changes made by the transaction.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-processed-flag" id="ref-for-request-processed-flag⑦">processed flag</a> to true.</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 run these steps:</p> <ol> <li data-md> <p>Remove <var>request</var> from <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-request-list" id="ref-for-transaction-request-list④">request list</a>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①⑦">done flag</a> to true.</p> <li data-md> <p>If <var>result</var> is an error, then:</p> <ol> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-result" id="ref-for-request-result⑨">result</a> to undefined.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error⑧">error</a> to <var>result</var>.</p> <li data-md> <p><a data-link-type="dfn" href="#fire-an-error-event" id="ref-for-fire-an-error-event②">Fire an error event</a> at <var>request</var>.</p> </ol> <li data-md> <p>Otherwise:</p> <ol> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-result" id="ref-for-request-result①⓪">result</a> to <var>result</var>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error⑨">error</a> to undefined.</p> <li data-md> <p><a data-link-type="dfn" href="#fire-a-success-event" id="ref-for-fire-a-success-event②">Fire a success event</a> at <var>request</var>.</p> </ol> </ol> </ol> <li data-md> <p>Return <var>request</var>.</p> </ol> </div> <h3 class="heading settled" data-level="5.7" id="upgrade-transaction-steps"><span class="secno">5.7. </span><span class="content">Upgrading a database</span><a class="self-link" href="#upgrade-transaction-steps"></a></h3> <div class="algorithm" data-algorithm="upgrade a database"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="upgrade-a-database">upgrade a database</dfn> with <var>connection</var> (a <a data-link-type="dfn" href="#connection" id="ref-for-connection⑥④">connection</a>), a new <var>version</var>, and a <var>request</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>db</var> be <var>connection</var>’s <a data-link-type="dfn" href="#database" id="ref-for-database⑥⑥">database</a>.</p> <li data-md> <p>Let <var>transaction</var> be a new <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑤③">upgrade transaction</a> with <var>connection</var> used as <a data-link-type="dfn" href="#connection" id="ref-for-connection⑥⑤">connection</a>.</p> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-scope" id="ref-for-transaction-scope①③">scope</a> to <var>connection</var>’s <a data-link-type="dfn" href="#connection-object-store-set" id="ref-for-connection-object-store-set②">object store set</a>.</p> <li data-md> <p>Set <var>db</var>’s <a data-link-type="dfn" href="#database-upgrade-transaction" id="ref-for-database-upgrade-transaction④">upgrade transaction</a> to <var>transaction</var>.</p> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④⑥">state</a> to <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive③">inactive</a>.</p> <li data-md> <p>Start <var>transaction</var>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Note that until this <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦⑧">transaction</a> is finished, no other <a data-link-type="dfn" href="#connection" id="ref-for-connection⑥⑥">connections</a> can be opened to the same <a data-link-type="dfn" href="#database" id="ref-for-database⑥⑦">database</a>.</p> <li data-md> <p>Let <var>old version</var> be <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version①⑨">version</a>.</p> <li data-md> <p>Set <var>db</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version②⓪">version</a> to <var>version</var>. This change is considered part of the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑦⑨">transaction</a>, and so if the transaction is <a data-link-type="dfn" href="#transaction-abort" id="ref-for-transaction-abort⑨">aborted</a>, this change is reverted.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-processed-flag" id="ref-for-request-processed-flag⑧">processed flag</a> to true.</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 run these steps:</p> <ol> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-result" id="ref-for-request-result①①">result</a> to <var>connection</var>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-transaction" id="ref-for-request-transaction⑤">transaction</a> to <var>transaction</var>.</p> <li data-md> <p>Set <var>request</var>’s <a data-link-type="dfn" href="#request-done-flag" id="ref-for-request-done-flag①⑧">done flag</a> to true.</p> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④⑦">state</a> to <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④③">active</a>.</p> <li data-md> <p>Let <var>didThrow</var> be the result of <a data-link-type="dfn" href="#fire-a-version-change-event" id="ref-for-fire-a-version-change-event⑤">firing a version change event</a> named <code class="idl"><a class="idl-code" data-link-type="event" href="#eventdef-idbopendbrequest-upgradeneeded" id="ref-for-eventdef-idbopendbrequest-upgradeneeded①⓪">upgradeneeded</a></code> at <var>request</var> with <var>old version</var> and <var>version</var>.</p> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④⑧">state</a> to <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive④">inactive</a>.</p> <li data-md> <p>If <var>didThrow</var> is true, run <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction⑧">abort a transaction</a> with <var>transaction</var> and a newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception⑤">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror⑦">AbortError</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> </ol> <li data-md> <p>Wait for <var>transaction</var> to <a data-link-type="dfn" href="#transaction-finished" id="ref-for-transaction-finished①⑨">finish</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Some of the algorithms invoked during the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑧⓪">transaction</a>'s <a data-link-type="dfn" href="#transaction-lifetime" id="ref-for-transaction-lifetime①">lifetime</a>, such as the steps to <a data-link-type="dfn" href="#commit-a-transaction" id="ref-for-commit-a-transaction①">commit a transaction</a> and the steps to <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction⑨">abort a transaction</a>, include steps specific to <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑤④">upgrade transactions</a>.</p> </ol> </div> <h3 class="heading settled" data-level="5.8" id="abort-upgrade-transaction"><span class="secno">5.8. </span><span class="content">Aborting an upgrade transaction</span><a class="self-link" href="#abort-upgrade-transaction"></a></h3> <div class="algorithm" data-algorithm="abort an upgrade transaction"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="abort-an-upgrade-transaction">abort an upgrade transaction</dfn> with <var>transaction</var>, run these steps:</p> <p class="note" role="note"><span class="marker">NOTE:</span> These steps are run as needed by the steps to <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction①⓪">abort a transaction</a>, which revert changes to the <a data-link-type="dfn" href="#database" id="ref-for-database⑥⑧">database</a> including the set of associated <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨⑦">object stores</a> and <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④①">indexes</a>, as well as the change to the <a data-link-type="dfn" href="#database-version" id="ref-for-database-version②①">version</a>.</p> <ol> <li data-md> <p>Let <var>connection</var> be <var>transaction</var>’s <a data-link-type="dfn" href="#connection" id="ref-for-connection⑥⑦">connection</a>.</p> <li data-md> <p>Let <var>database</var> be <var>connection</var>’s <a data-link-type="dfn" href="#database" id="ref-for-database⑥⑨">database</a>.</p> <li data-md> <p>Set <var>connection</var>’s <a data-link-type="dfn" href="#connection-version" id="ref-for-connection-version③">version</a> to <var>database</var>’s <a data-link-type="dfn" href="#database-version" id="ref-for-database-version②②">version</a> if <var>database</var> previously existed, or 0 (zero) if <var>database</var> was newly created.</p> <p class="note" role="note"><span class="marker">NOTE:</span> This reverts the value of <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-version" id="ref-for-dom-idbdatabase-version②">version</a></code> returned by the <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase⑨">IDBDatabase</a></code> object.</p> <li data-md> <p>Set <var>connection</var>’s <a data-link-type="dfn" href="#connection-object-store-set" id="ref-for-connection-object-store-set③">object store set</a> to the set of <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨⑧">object stores</a> in <var>database</var> if <var>database</var> previously existed, or the empty set if <var>database</var> was newly created.</p> <p class="note" role="note"><span class="marker">NOTE:</span> This reverts the value of <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-objectstorenames" id="ref-for-dom-idbdatabase-objectstorenames④">objectStoreNames</a></code> returned by the <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase①⓪">IDBDatabase</a></code> object.</p> <li data-md> <p>For each <a data-link-type="dfn" href="#object-store-handle" id="ref-for-object-store-handle①②">object store handle</a> <var>handle</var> associated with <var>transaction</var>, including those for <a data-link-type="dfn" href="#object-store" id="ref-for-object-store⑨⑨">object stores</a> that were created or deleted during <var>transaction</var>:</p> <ol> <li data-md> <p>If <var>handle</var>’s <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①⑧">object store</a> was not newly created during <var>transaction</var>, set <var>handle</var>’s <a data-link-type="dfn" href="#object-store-handle-name" id="ref-for-object-store-handle-name①">name</a> to its <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store①⑨">object store</a>'s <a data-link-type="dfn" href="#object-store-name" id="ref-for-object-store-name①⑨">name</a>.</p> <li data-md> <p>Set <var>handle</var>’s <a data-link-type="dfn" href="#object-store-handle-index-set" id="ref-for-object-store-handle-index-set⑤">index set</a> to the set of <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④②">indexes</a> that reference its <a data-link-type="dfn" href="#object-store-handle-object-store" id="ref-for-object-store-handle-object-store②⓪">object store</a>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> This reverts the values of <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-name" id="ref-for-dom-idbobjectstore-name④">name</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-indexnames" id="ref-for-dom-idbobjectstore-indexnames④">indexNames</a></code> returned by related <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore②①">IDBObjectStore</a></code> objects.</p> <details class="note"> <summary>How is this observable?</summary> Although script cannot access an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⓪⓪">object store</a> by using the <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-objectstore" id="ref-for-dom-idbtransaction-objectstore②">objectStore()</a></code> method on an <code class="idl"><a data-link-type="idl" href="#idbtransaction" id="ref-for-idbtransaction⑨">IDBTransaction</a></code> instance after the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑧①">transaction</a> is aborted, it can still have references to <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore②②">IDBObjectStore</a></code> instances where the <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-name" id="ref-for-dom-idbobjectstore-name⑤">name</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-indexnames" id="ref-for-dom-idbobjectstore-indexnames⑤">indexNames</a></code> properties can be queried. </details> <li data-md> <p>For each <a data-link-type="dfn" href="#index-handle" id="ref-for-index-handle⑨">index handle</a> <var>handle</var> associated with <var>transaction</var>, including those for <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④③">indexes</a> that were created or deleted during <var>transaction</var>:</p> <ol> <li data-md> <p>If <var>handle</var>’s <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index①②">index</a> was not newly created during <var>transaction</var>, set <var>handle</var>’s <a data-link-type="dfn" href="#index-handle-name" id="ref-for-index-handle-name①">name</a> to its <a data-link-type="dfn" href="#index-handle-index" id="ref-for-index-handle-index①③">index</a>'s <a data-link-type="dfn" href="#index-name" id="ref-for-index-name①⑥">name</a>.</p> </ol> <p class="note" role="note"><span class="marker">NOTE:</span> This reverts the value of <code class="idl"><a data-link-type="idl" href="#dom-idbindex-name" id="ref-for-dom-idbindex-name④">name</a></code> returned by related <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex①⑤">IDBIndex</a></code> objects.</p> <details class="note"> <summary>How is this observable?</summary> Although script cannot access an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④④">index</a> by using the <code class="idl"><a data-link-type="idl" href="#dom-idbobjectstore-index" id="ref-for-dom-idbobjectstore-index①">index()</a></code> method on an <code class="idl"><a data-link-type="idl" href="#idbobjectstore" id="ref-for-idbobjectstore②③">IDBObjectStore</a></code> instance after the <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑧②">transaction</a> is aborted, it can still have references to <code class="idl"><a data-link-type="idl" href="#idbindex" id="ref-for-idbindex①⑥">IDBIndex</a></code> instances where the <code class="idl"><a data-link-type="idl" href="#dom-idbindex-name" id="ref-for-dom-idbindex-name⑤">name</a></code> property can be queried. </details> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> The <code class="idl"><a data-link-type="idl" href="#dom-idbdatabase-name" id="ref-for-dom-idbdatabase-name③">name</a></code> property of the <code class="idl"><a data-link-type="idl" href="#idbdatabase" id="ref-for-idbdatabase①①">IDBDatabase</a></code> instance is not modified, even if the aborted <a data-link-type="dfn" href="#upgrade-transaction" id="ref-for-upgrade-transaction⑤⑤">upgrade transaction</a> was creating a new <a data-link-type="dfn" href="#database" id="ref-for-database⑦⓪">database</a>.</p> <h3 class="heading settled" data-level="5.9" id="fire-success-event"><span class="secno">5.9. </span><span class="content">Firing a success event</span><a class="self-link" href="#fire-success-event"></a></h3> <div class="algorithm" data-algorithm="fire a success event"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="fire-a-success-event">fire a success event</dfn> at a <var>request</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>event</var> be the result of <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-create" id="ref-for-concept-event-create①">creating an event</a> using <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#event" id="ref-for-event①">Event</a></code>.</p> <li data-md> <p>Set <var>event</var>’s <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> attribute to "<code>success</code>".</p> <li data-md> <p>Set <var>event</var>’s <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-bubbles" id="ref-for-dom-event-bubbles⑤">bubbles</a></code> and <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-cancelable" id="ref-for-dom-event-cancelable④">cancelable</a></code> attributes to false.</p> <li data-md> <p>Let <var>transaction</var> be <var>request</var>’s <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑧③">transaction</a>.</p> <li data-md> <p>Let <var>legacyOutputDidListenersThrowFlag</var> be initially false.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state④⑨">state</a> is <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive⑤">inactive</a>, then set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤⓪">state</a> to <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④④">active</a>.</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> at <var>request</var> with <var>legacyOutputDidListenersThrowFlag</var>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤①">state</a> is <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④⑤">active</a>, then:</p> <ol> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤②">state</a> to <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive⑥">inactive</a>.</p> <li data-md> <p>If <var>legacyOutputDidListenersThrowFlag</var> is true, then run <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction①①">abort a transaction</a> with <var>transaction</var> and a newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception⑥">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror⑧">AbortError</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>transaction</var>’s <a data-link-type="dfn" href="#transaction-request-list" id="ref-for-transaction-request-list⑤">request list</a> is empty, then run <a data-link-type="dfn" href="#commit-a-transaction" id="ref-for-commit-a-transaction②">commit a transaction</a> with <var>transaction</var>.</p> </ol> </ol> </div> <h3 class="heading settled" data-level="5.10" id="fire-error-event"><span class="secno">5.10. </span><span class="content">Firing an error event</span><a class="self-link" href="#fire-error-event"></a></h3> <div class="algorithm" data-algorithm="fire an error event"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="fire-an-error-event">fire an error event</dfn> at a <var>request</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>event</var> be the result of <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-create" id="ref-for-concept-event-create②">creating an event</a> using <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#event" id="ref-for-event②">Event</a></code>.</p> <li data-md> <p>Set <var>event</var>’s <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> attribute to "<code>error</code>".</p> <li data-md> <p>Set <var>event</var>’s <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-bubbles" id="ref-for-dom-event-bubbles⑥">bubbles</a></code> and <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-cancelable" id="ref-for-dom-event-cancelable⑤">cancelable</a></code> attributes to true.</p> <li data-md> <p>Let <var>transaction</var> be <var>request</var>’s <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑧④">transaction</a>.</p> <li data-md> <p>Let <var>legacyOutputDidListenersThrowFlag</var> be initially false.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤③">state</a> is <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive⑦">inactive</a>, then set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤④">state</a> to <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④⑥">active</a>.</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> at <a data-link-type="dfn" href="#request" id="ref-for-request④⓪">request</a> with <var>legacyOutputDidListenersThrowFlag</var>.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤⑤">state</a> is <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④⑦">active</a>, then:</p> <ol> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤⑥">state</a> to <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive⑧">inactive</a>.</p> <li data-md> <p>If <var>legacyOutputDidListenersThrowFlag</var> is true, then run <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction①②">abort a transaction</a> with <var>transaction</var> and a newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception⑦">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror⑨">AbortError</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 terminate these steps. This is done even if <var>event</var>’s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#canceled-flag" id="ref-for-canceled-flag">canceled flag</a> is false.</p> <p class="note" role="note"><span class="marker">NOTE:</span> This means that if an error event is fired and any of the event handlers throw an exception, <var>transaction</var>’s <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-error" id="ref-for-dom-idbtransaction-error②">error</a></code> property is set to an <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#aborterror" id="ref-for-aborterror①⓪">AbortError</a></code> rather than <var>request</var>’s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error①⓪">error</a>, even if <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-preventdefault" id="ref-for-dom-event-preventdefault">preventDefault()</a></code> is never called.</p> <li data-md> <p>If <var>event</var>’s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#canceled-flag" id="ref-for-canceled-flag①">canceled flag</a> is false, then run <a data-link-type="dfn" href="#abort-a-transaction" id="ref-for-abort-a-transaction①③">abort a transaction</a> using <var>transaction</var> and <a data-link-type="dfn" href="#request" id="ref-for-request④①">request</a>'s <a data-link-type="dfn" href="#request-error" id="ref-for-request-error①①">error</a>, and terminate these steps.</p> <li data-md> <p>If <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-request-list" id="ref-for-transaction-request-list⑥">request list</a> is empty, then run <a data-link-type="dfn" href="#commit-a-transaction" id="ref-for-commit-a-transaction③">commit a transaction</a> with <var>transaction</var>.</p> </ol> </ol> </div> <h3 class="heading settled" data-level="5.11" id="clone-value"><span class="secno">5.11. </span><span class="content">Clone a value</span><a class="self-link" href="#clone-value"></a></h3> <div class="algorithm" data-algorithm="clone"> <p>To make a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="clone">clone</dfn> of <var>value</var> in <var>targetRealm</var> during <var>transaction</var>, run these steps:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert②">Assert</a>: <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤⑦">state</a> is <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④⑧">active</a>.</p> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤⑧">state</a> to <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive⑨">inactive</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> The <a data-link-type="dfn" href="#transaction-concept" id="ref-for-transaction-concept⑧⑤">transaction</a> is made <a data-link-type="dfn" href="#transaction-inactive" id="ref-for-transaction-inactive①⓪">inactive</a> so that getters or other side effects triggered by the cloning operation are unable to make additional requests against the transaction.</p> <li data-md> <p>Let <var>serialized</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions">?</a> <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage" id="ref-for-structuredserializeforstorage②">StructuredSerializeForStorage</a>(<var>value</var>).</p> <li data-md> <p>Let <var>clone</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①">?</a> <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize">StructuredDeserialize</a>(<var>serialized</var>, <var>targetRealm</var>).</p> <li data-md> <p>Set <var>transaction</var>’s <a data-link-type="dfn" href="#transaction-state" id="ref-for-transaction-state⑤⑨">state</a> to <a data-link-type="dfn" href="#transaction-active" id="ref-for-transaction-active④⑨">active</a>.</p> <li data-md> <p>Return <var>clone</var>.</p> </ol> </div> <h2 class="heading settled" data-level="6" id="database-operations"><span class="secno">6. </span><span class="content">Database operations</span><a class="self-link" href="#database-operations"></a></h2> <p>This section describes various operations done on the data in <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⓪①">object stores</a> and <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④⑤">indexes</a> in a <a data-link-type="dfn" href="#database" id="ref-for-database⑦①">database</a>. These operations are run by the steps to <a data-link-type="dfn" href="#asynchronously-execute-a-request" id="ref-for-asynchronously-execute-a-request②④">asynchronously execute a request</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Invocations of <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize①">StructuredDeserialize</a>() in the operation steps below can be asserted not to throw (as indicated by the <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions②">!</a> prefix) because they operate only on previous output of <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage" id="ref-for-structuredserializeforstorage③">StructuredSerializeForStorage</a>().</p> <h3 class="heading settled" data-level="6.1" id="object-store-storage-operation"><span class="secno">6.1. </span><span class="content">Object store storage operation</span><a class="self-link" href="#object-store-storage-operation"></a></h3> <div class="algorithm" data-algorithm="store a record into an object store"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="store-a-record-into-an-object-store">store a record into an object store</dfn> with <var>store</var>, <var>value</var>, an optional <var>key</var>, and a <var>no-overwrite flag</var>, run these steps:</p> <ol> <li data-md> <p>If <var>store</var> uses a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①⑧">key generator</a>, then:</p> <ol> <li data-md> <p>If <var>key</var> is undefined, then:</p> <ol> <li data-md> <p>Let <var>key</var> be the result of <a data-link-type="dfn" href="#generate-a-key" id="ref-for-generate-a-key">generating a key</a> for <var>store</var>.</p> <li data-md> <p>If <var>key</var> is failure, then this operation failed with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror①⓪">ConstraintError</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>. Abort this algorithm without taking any further steps.</p> <li data-md> <p>If <var>store</var> also uses <a data-link-type="dfn" href="#object-store-in-line-keys" id="ref-for-object-store-in-line-keys⑥">in-line keys</a>, then run <a data-link-type="dfn" href="#inject-a-key-into-a-value-using-a-key-path" id="ref-for-inject-a-key-into-a-value-using-a-key-path">inject a key into a value using a key path</a> with <var>value</var>, <var>key</var> and <var>store</var>’s <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①⑦">key path</a>.</p> </ol> <li data-md> <p>Otherwise, run <a data-link-type="dfn" href="#possibly-update-the-key-generator" id="ref-for-possibly-update-the-key-generator">possibly update the key generator</a> for <var>store</var> with <var>key</var>.</p> </ol> <li data-md> <p>If the <var>no-overwrite flag</var> was given to these steps and is true, and a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦④">record</a> already exists in <var>store</var> with its key <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①⓪">equal to</a> <var>key</var>, then this operation failed with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror①①">ConstraintError</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>. Abort this algorithm without taking any further steps.</p> <li data-md> <p>If a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦⑤">record</a> already exists in <var>store</var> with its key <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①①">equal to</a> <var>key</var>, then remove the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦⑥">record</a> from <var>store</var> using <a data-link-type="dfn" href="#delete-records-from-an-object-store" id="ref-for-delete-records-from-an-object-store②">delete records from an object store</a>.</p> <li data-md> <p>Store a record in <var>store</var> containing <var>key</var> as its key and <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions③">!</a> <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage" id="ref-for-structuredserializeforstorage④">StructuredSerializeForStorage</a>(<var>value</var>) as its value. The record is stored in the object store’s <a data-link-type="dfn" href="#object-store-list-of-records" id="ref-for-object-store-list-of-records">list of records</a> such that the list is sorted according to the key of the records in <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than⑧">ascending</a> order.</p> <li data-md> <p>For each <var>index</var> which <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced⑧">references</a> <var>store</var>:</p> <ol> <li data-md> <p>Let <var>index key</var> be the result of <a data-link-type="dfn" href="#extract-a-key-from-a-value-using-a-key-path" id="ref-for-extract-a-key-from-a-value-using-a-key-path③">extracting a key from a value using a key path</a> with <var>value</var>, <var>index</var>’s <a data-link-type="dfn" href="#index-key-path" id="ref-for-index-key-path⑤">key path</a>, and <var>index</var>’s <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag⑤">multiEntry flag</a>.</p> <li data-md> <p>If <var>index key</var> is an exception, or invalid, or failure, take no further actions for <var>index</var>, and continue these steps for the next index.</p> <p class="note" role="note"><span class="marker">NOTE:</span> An exception thrown in this step is not rethrown.</p> <li data-md> <p>If <var>index</var>’s <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag⑥">multiEntry flag</a> is false, or if <var>index key</var> is not an <a data-link-type="dfn" href="#array-key" id="ref-for-array-key④">array key</a>, and if <var>index</var> already contains a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦⑦">record</a> with <a data-link-type="dfn" href="#key" id="ref-for-key⑧②">key</a> <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①②">equal to</a> <var>index key</var>, and <var>index</var>’s <a data-link-type="dfn" href="#index-unique-flag" id="ref-for-index-unique-flag⑦">unique flag</a> is true, then this operation failed with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror①②">ConstraintError</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>. Abort this algorithm without taking any further steps.</p> <li data-md> <p>If <var>index</var>’s <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag⑦">multiEntry flag</a> is true and <var>index key</var> is an <a data-link-type="dfn" href="#array-key" id="ref-for-array-key⑤">array key</a>, and if <var>index</var> already contains a <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦⑧">record</a> with <a data-link-type="dfn" href="#key" id="ref-for-key⑧③">key</a> <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①③">equal to</a> any of the <a data-link-type="dfn" href="#subkeys" id="ref-for-subkeys①">subkeys</a> of <var>index key</var>, and <var>index</var>’s <a data-link-type="dfn" href="#index-unique-flag" id="ref-for-index-unique-flag⑧">unique flag</a> is true, then this operation failed with a "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#constrainterror" id="ref-for-constrainterror①③">ConstraintError</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>. Abort this algorithm without taking any further steps.</p> <li data-md> <p>If <var>index</var>’s <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag⑧">multiEntry flag</a> is false, or if <var>index key</var> is not an <a data-link-type="dfn" href="#array-key" id="ref-for-array-key⑥">array key</a> then store a record in <var>index</var> containing <var>index key</var> as its key and <var>key</var> as its value. The record is stored in <var>index</var>’s <a data-link-type="dfn" href="#index-list-of-records" id="ref-for-index-list-of-records">list of records</a> such that the list is sorted primarily on the records keys, and secondarily on the records values, in <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than⑨">ascending</a> order.</p> <li data-md> <p>If <var>index</var>’s <a data-link-type="dfn" href="#index-multientry-flag" id="ref-for-index-multientry-flag⑨">multiEntry flag</a> is true and <var>index key</var> is an <a data-link-type="dfn" href="#array-key" id="ref-for-array-key⑦">array key</a>, then for each <var>subkey</var> of the <a data-link-type="dfn" href="#subkeys" id="ref-for-subkeys②">subkeys</a> of <var>index key</var> store a record in <var>index</var> containing <var>subkey</var> as its key and <var>key</var> as its value. The records are stored in <var>index</var>’s <a data-link-type="dfn" href="#index-list-of-records" id="ref-for-index-list-of-records①">list of records</a> such that the list is sorted primarily on the records keys, and secondarily on the records values, in <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①⓪">ascending</a> order.</p> <p class="note" role="note"><span class="marker">NOTE:</span> It is valid for there to be no <a data-link-type="dfn" href="#subkeys" id="ref-for-subkeys③">subkeys</a>. In this case no records are added to the index.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Even if any member of <a data-link-type="dfn" href="#subkeys" id="ref-for-subkeys④">subkeys</a> is itself an <a data-link-type="dfn" href="#array-key" id="ref-for-array-key⑧">array key</a>, the member is used directly as the key for the index record. Nested <a data-link-type="dfn" href="#array-key" id="ref-for-array-key⑨">array keys</a> are not flattened or "unpacked" to produce multiple rows; only the outer-most <a data-link-type="dfn" href="#array-key" id="ref-for-array-key①⓪">array key</a> is.</p> </ol> <li data-md> <p>Return <var>key</var>.</p> </ol> </div> <h3 class="heading settled" data-level="6.2" id="object-store-retrieval-operation"><span class="secno">6.2. </span><span class="content">Object store retrieval operations</span><a class="self-link" href="#object-store-retrieval-operation"></a></h3> <div class="algorithm" data-algorithm="retrieve a value from an object store"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="retrieve-a-value-from-an-object-store">retrieve a value from an object store</dfn> with <var>targetRealm</var>, <var>store</var> and <var>range</var>, run these steps. They return undefined, an ECMAScript value, or an error (a <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> <ol> <li data-md> <p>Let <var>record</var> be the first <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑦⑨">record</a> in <var>store</var>’s <a data-link-type="dfn" href="#object-store-list-of-records" id="ref-for-object-store-list-of-records①">list of records</a> whose <a data-link-type="dfn" href="#key" id="ref-for-key⑧④">key</a> is <a data-link-type="dfn" href="#in" id="ref-for-in②">in</a> <var>range</var>, if any.</p> <li data-md> <p>If <var>record</var> was not found, return undefined.</p> <li data-md> <p>Let <var>serialized</var> be <var>record</var>’s <a data-link-type="dfn" href="#value" id="ref-for-value①⑧">value</a>. If an error occurs while reading the value from the underlying storage, return a newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception⑧">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notreadableerror" id="ref-for-notreadableerror①">NotReadableError</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>Return <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions④">!</a> <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize②">StructuredDeserialize</a>(<var>serialized</var>, <var>targetRealm</var>).</p> </ol> </div> <div class="algorithm" data-algorithm="retrieve multiple values from an object store"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="retrieve multiple values from an object store" data-noexport id="retrieve-multiple-values-from-an-object-store">retrieve multiple values from an object store</dfn> with <var>targetRealm</var>, <var>store</var>, <var>range</var> and optional <var>count</var>, run these steps. They return a <code><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence⑥">sequence</a><<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any③⑨">any</a></code>></code> or an error (a <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> <ol> <li data-md> <p>If <var>count</var> is not given or is 0 (zero), let <var>count</var> be infinity.</p> <li data-md> <p>Let <var>records</var> be a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list⑥">list</a> containing the first <var>count</var> <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧⓪">records</a> in <var>store</var>’s <a data-link-type="dfn" href="#object-store-list-of-records" id="ref-for-object-store-list-of-records②">list of records</a> whose <a data-link-type="dfn" href="#key" id="ref-for-key⑧⑤">key</a> is <a data-link-type="dfn" href="#in" id="ref-for-in③">in</a> <var>range</var>.</p> <li data-md> <p>Let <var>list</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><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate④">For each</a> <var>record</var> of <var>records</var>:</p> <ol> <li data-md> <p>Let <var>serialized</var> be <var>record</var>’s <a data-link-type="dfn" href="#value" id="ref-for-value①⑨">value</a>. If an error occurs while reading the value from the underlying storage, return a newly <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-create-exception" id="ref-for-dfn-create-exception⑨">created</a> "<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#notreadableerror" id="ref-for-notreadableerror②">NotReadableError</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>Let <var>entry</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions⑤">!</a> <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize③">StructuredDeserialize</a>(<var>serialized</var>, <var>targetRealm</var>).</p> <li data-md> <p>Append <var>entry</var> to <var>list</var>.</p> </ol> <li data-md> <p>Return <var>list</var> converted to a <code><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence⑦">sequence</a><<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any④⓪">any</a></code>></code>.</p> </ol> </div> <div class="algorithm" data-algorithm="retrieve a key from an object store"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="retrieve-a-key-from-an-object-store">retrieve a key from an object store</dfn> with <var>store</var> and <var>range</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>record</var> be the first <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧①">record</a> in <var>store</var>’s <a data-link-type="dfn" href="#object-store-list-of-records" id="ref-for-object-store-list-of-records③">list of records</a> whose <a data-link-type="dfn" href="#key" id="ref-for-key⑧⑥">key</a> is <a data-link-type="dfn" href="#in" id="ref-for-in④">in</a> <var>range</var>, if any.</p> <li data-md> <p>If <var>record</var> was not found, return undefined.</p> <li data-md> <p>Return the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value④">converting a key to a value</a> with <var>record</var>’s key.</p> </ol> </div> <div class="algorithm" data-algorithm="retrieve multiple keys from an object store"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="retrieve-multiple-keys-from-an-object-store">retrieve multiple keys from an object store</dfn> with <var>store</var>, <var>range</var> and optional <var>count</var>, run these steps:</p> <ol> <li data-md> <p>If <var>count</var> is not given or is 0 (zero), let <var>count</var> be infinity.</p> <li data-md> <p>Let <var>records</var> be a list containing the first <var>count</var> <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧②">records</a> in <var>store</var>’s <a data-link-type="dfn" href="#object-store-list-of-records" id="ref-for-object-store-list-of-records④">list of records</a> whose <a data-link-type="dfn" href="#key" id="ref-for-key⑧⑦">key</a> is <a data-link-type="dfn" href="#in" id="ref-for-in⑤">in</a> <var>range</var>.</p> <li data-md> <p>Let <var>list</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><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑤">For each</a> <var>record</var> of <var>records</var>:</p> <ol> <li data-md> <p>Let <var>entry</var> be the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value⑤">converting a key to a value</a> with <var>record</var>’s key.</p> <li data-md> <p>Append <var>entry</var> to <var>list</var>.</p> </ol> <li data-md> <p>Return <var>list</var> converted to a <code><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence⑧">sequence</a><<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any④①">any</a></code>></code>.</p> </ol> </div> <h3 class="heading settled" data-level="6.3" id="index-retrieval-operation"><span class="secno">6.3. </span><span class="content">Index retrieval operations</span><a class="self-link" href="#index-retrieval-operation"></a></h3> <div class="algorithm" data-algorithm="retrieve a referenced value from an index"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="retrieve-a-referenced-value-from-an-index">retrieve a referenced value from an index</dfn> with <var>targetRealm</var>, <var>index</var> and <var>range</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>record</var> be the first <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧③">record</a> in <var>index</var>’s <a data-link-type="dfn" href="#index-list-of-records" id="ref-for-index-list-of-records②">list of records</a> whose <a data-link-type="dfn" href="#index-keys" id="ref-for-index-keys①">key</a> is <a data-link-type="dfn" href="#in" id="ref-for-in⑥">in</a> <var>range</var>, if any.</p> <li data-md> <p>If <var>record</var> was not found, return undefined.</p> <li data-md> <p>Let <var>serialized</var> be <var>record</var>’s <a data-link-type="dfn" href="#index-referenced-value" id="ref-for-index-referenced-value④">referenced value</a>.</p> <li data-md> <p>Return <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions⑥">!</a> <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize④">StructuredDeserialize</a>(<var>serialized</var>, <var>targetRealm</var>).</p> </ol> </div> <div class="algorithm" data-algorithm="retrieve multiple referenced values from an index"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="retrieve multiple referenced values from an index" data-noexport id="retrieve-multiple-referenced-values-from-an-index">retrieve multiple referenced values from an index</dfn> with <var>targetRealm</var>, <var>index</var>, <var>range</var> and optional <var>count</var>, run these steps:</p> <ol> <li data-md> <p>If <var>count</var> is not given or is 0 (zero), let <var>count</var> be infinity.</p> <li data-md> <p>Let <var>records</var> be a list containing the first <var>count</var> <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧④">records</a> in <var>index</var>’s <a data-link-type="dfn" href="#index-list-of-records" id="ref-for-index-list-of-records③">list of records</a> whose <a data-link-type="dfn" href="#index-keys" id="ref-for-index-keys②">key</a> is <a data-link-type="dfn" href="#in" id="ref-for-in⑦">in</a> <var>range</var>.</p> <li data-md> <p>Let <var>list</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><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑥">For each</a> <var>record</var> of <var>records</var>:</p> <ol> <li data-md> <p>Let <var>serialized</var> be <var>record</var>’s <a data-link-type="dfn" href="#index-referenced-value" id="ref-for-index-referenced-value⑤">referenced value</a>.</p> <li data-md> <p>Let <var>entry</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions⑦">!</a> <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize⑤">StructuredDeserialize</a>(<var>serialized</var>, <var>targetRealm</var>).</p> <li data-md> <p>Append <var>entry</var> to <var>list</var>.</p> </ol> <li data-md> <p>Return <var>list</var> converted to a <code><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence⑨">sequence</a><<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any④②">any</a></code>></code>.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> The <a data-link-type="dfn" href="#index-values" id="ref-for-index-values">values</a> of an <a data-link-type="dfn" href="#index-records" id="ref-for-index-records②">record</a> in an index are the keys of <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧⑤">records</a> in the <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced⑨">referenced</a> object store.</p> <div class="algorithm" data-algorithm="retrieve a value from an index"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="retrieve-a-value-from-an-index">retrieve a value from an index</dfn> with <var>index</var> and <var>range</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>record</var> be the first <a data-link-type="dfn" href="#index-records" id="ref-for-index-records③">record</a> in <var>index</var>’s <a data-link-type="dfn" href="#index-list-of-records" id="ref-for-index-list-of-records④">list of records</a> whose <a data-link-type="dfn" href="#index-keys" id="ref-for-index-keys③">key</a> is <a data-link-type="dfn" href="#in" id="ref-for-in⑧">in</a> <var>range</var>, if any.</p> <li data-md> <p>If <var>record</var> was not found, return undefined.</p> <li data-md> <p>Return the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value⑥">converting a key to a value</a> with <var>record</var>’s <a data-link-type="dfn" href="#value" id="ref-for-value②⓪">value</a>.</p> </ol> </div> <div class="algorithm" data-algorithm="retrieve multiple values from an index"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="retrieve-multiple-values-from-an-index">retrieve multiple values from an index</dfn> with <var>index</var>, <var>range</var> and optional <var>count</var>, run these steps:</p> <ol> <li data-md> <p>If <var>count</var> is not given or is 0 (zero), let <var>count</var> be infinity.</p> <li data-md> <p>Let <var>records</var> be a list containing the first <var>count</var> <a data-link-type="dfn" href="#index-records" id="ref-for-index-records④">records</a> in <var>index</var>’s <a data-link-type="dfn" href="#index-list-of-records" id="ref-for-index-list-of-records⑤">list of records</a> whose <a data-link-type="dfn" href="#index-keys" id="ref-for-index-keys④">key</a> is <a data-link-type="dfn" href="#in" id="ref-for-in⑨">in</a> <var>range</var>.</p> <li data-md> <p>Let <var>list</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><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑦">For each</a> <var>record</var> of <var>records</var>:</p> <ol> <li data-md> <p>Let <var>entry</var> be the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value⑦">converting a key to a value</a> with <var>record</var>’s value.</p> <li data-md> <p>Append <var>entry</var> to <var>list</var>.</p> </ol> <li data-md> <p>Return <var>list</var> converted to a <code><a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence" id="ref-for-idl-sequence①⓪">sequence</a><<code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-any" id="ref-for-idl-any④③">any</a></code>></code>.</p> </ol> </div> <h3 class="heading settled" data-level="6.4" id="object-store-deletion-operation"><span class="secno">6.4. </span><span class="content">Object store deletion operation</span><a class="self-link" href="#object-store-deletion-operation"></a></h3> <div class="algorithm" data-algorithm="delete records from an object store"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="delete-records-from-an-object-store">delete records from an object store</dfn> with <var>store</var> and <var>range</var>, run these steps:</p> <ol> <li data-md> <p>Remove all records, if any, from <var>store</var>’s <a data-link-type="dfn" href="#object-store-list-of-records" id="ref-for-object-store-list-of-records⑤">list of records</a> with key <a data-link-type="dfn" href="#in" id="ref-for-in①⓪">in</a> <var>range</var>.</p> <li data-md> <p>For each <var>index</var> which <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced①⓪">references</a> <var>store</var>, remove every <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧⑥">record</a> from <var>index</var>’s <a data-link-type="dfn" href="#index-list-of-records" id="ref-for-index-list-of-records⑥">list of records</a> whose value is <a data-link-type="dfn" href="#in" id="ref-for-in①①">in</a> <var>range</var>, if any such records exist.</p> <li data-md> <p>Return undefined.</p> </ol> </div> <h3 class="heading settled" data-level="6.5" id="record-counting-operation"><span class="secno">6.5. </span><span class="content">Record counting operation</span><a class="self-link" href="#record-counting-operation"></a></h3> <div class="algorithm" data-algorithm="count the records in a range"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="count-the-records-in-a-range">count the records in a range</dfn> with <var>source</var> and <var>range</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>count</var> be the number of records, if any, in <var>source</var>’s list of records with key <a data-link-type="dfn" href="#in" id="ref-for-in①②">in</a> <var>range</var>.</p> <li data-md> <p>Return <var>count</var>.</p> </ol> </div> <h3 class="heading settled" data-level="6.6" id="object-store-clear-operation"><span class="secno">6.6. </span><span class="content">Object store clear operation</span><a class="self-link" href="#object-store-clear-operation"></a></h3> <div class="algorithm" data-algorithm="clear an object store"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="clear-an-object-store">clear an object store</dfn> with <var>store</var>, run these steps:</p> <ol> <li data-md> <p>Remove all records from <var>store</var>.</p> <li data-md> <p>In all <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④⑥">indexes</a> which <a data-link-type="dfn" href="#index-referenced" id="ref-for-index-referenced①①">reference</a> <var>store</var>, remove all <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧⑦">records</a>.</p> <li data-md> <p>Return undefined.</p> </ol> </div> <h3 class="heading settled" data-level="6.7" id="cursor-iteration-operation"><span class="secno">6.7. </span><span class="content">Cursor iteration operation</span><a class="self-link" href="#cursor-iteration-operation"></a></h3> <div class="algorithm" data-algorithm="iterate a cursor"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="iterate-a-cursor">iterate a cursor</dfn> with <var>targetRealm</var>, <var>cursor</var>, an optional <var>key</var> and <var>primaryKey</var> to iterate to, and an optional <var>count</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>source</var> be <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-source" id="ref-for-cursor-source②④">source</a>.</p> <li data-md> <p>Let <var>direction</var> be <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-direction" id="ref-for-cursor-direction①④">direction</a>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert③">Assert</a>: if <var>primaryKey</var> is given, <var>source</var> is an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④⑦">index</a> and <var>direction</var> is "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-next" id="ref-for-dom-idbcursordirection-next⑦">next</a></code>" or "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prev" id="ref-for-dom-idbcursordirection-prev⑦">prev</a></code>".</p> <li data-md> <p>Let <var>records</var> be the list of <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧⑧">records</a> in <var>source</var>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> <var>records</var> is always sorted in <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①①">ascending</a> <a data-link-type="dfn" href="#key" id="ref-for-key⑧⑧">key</a> order. In the case of <var>source</var> being an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④⑧">index</a>, <var>records</var> is secondarily sorted in <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①②">ascending</a> <a data-link-type="dfn" href="#value" id="ref-for-value②①">value</a> order (where the value in an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept④⑨">index</a> is the <a data-link-type="dfn" href="#key" id="ref-for-key⑧⑨">key</a> of the <a data-link-type="dfn" href="#object-store-record" id="ref-for-object-store-record⑧⑨">record</a> in the referenced <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⓪②">object store</a>).</p> <li data-md> <p>Let <var>range</var> be <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-range" id="ref-for-cursor-range①⓪">range</a>.</p> <li data-md> <p>Let <var>position</var> be <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position①③">position</a>.</p> <li data-md> <p>Let <var>object store position</var> be <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-object-store-position" id="ref-for-cursor-object-store-position④">object store position</a>.</p> <li data-md> <p>If <var>count</var> is not given, let <var>count</var> be 1.</p> <li data-md> <p>While <var>count</var> is greater than 0:</p> <ol> <li data-md> <p>Switch on <var>direction</var>:</p> <dl class="switch"> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-next" id="ref-for-dom-idbcursordirection-next⑧">next</a></code>" <dd data-md> <p>Let <var>found record</var> be the first record in <var>records</var> which satisfy all of the following requirements:</p> <ul> <li data-md> <p>If <var>key</var> is defined, the record’s key is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①③">greater than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①④">equal to</a> <var>key</var>.</p> <li data-md> <p>If <var>primaryKey</var> is defined, the record’s key is <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①⑤">equal to</a> <var>key</var> and the record’s value is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①④">greater than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①⑥">equal to</a> <var>primaryKey</var>, or the record’s key is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①⑤">greater than</a> <var>key</var>.</p> <li data-md> <p>If <var>position</var> is defined, and <var>source</var> is an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⓪③">object store</a>, the record’s key is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①⑥">greater than</a> <var>position</var>.</p> <li data-md> <p>If <var>position</var> is defined, and <var>source</var> is an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑤⓪">index</a>, the record’s key is <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①⑦">equal to</a> <var>position</var> and the record’s value is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①⑦">greater than</a> <var>object store position</var> or the record’s key is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①⑧">greater than</a> <var>position</var>.</p> <li data-md> <p>The record’s key is <a data-link-type="dfn" href="#in" id="ref-for-in①③">in</a> <var>range</var>.</p> </ul> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-nextunique" id="ref-for-dom-idbcursordirection-nextunique③">nextunique</a></code>" <dd data-md> <p>Let <var>found record</var> be the first record in <var>records</var> which satisfy all of the following requirements:</p> <ul> <li data-md> <p>If <var>key</var> is defined, the record’s key is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than①⑨">greater than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①⑧">equal to</a> <var>key</var>.</p> <li data-md> <p>If <var>position</var> is defined, the record’s key is <a data-link-type="dfn" href="#greater-than" id="ref-for-greater-than②⓪">greater than</a> <var>position</var>.</p> <li data-md> <p>The record’s key is <a data-link-type="dfn" href="#in" id="ref-for-in①④">in</a> <var>range</var>.</p> </ul> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prev" id="ref-for-dom-idbcursordirection-prev⑧">prev</a></code>" <dd data-md> <p>Let <var>found record</var> be the last record in <var>records</var> which satisfy all of the following requirements:</p> <ul> <li data-md> <p>If <var>key</var> is defined, the record’s key is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than⑤">less than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to①⑨">equal to</a> <var>key</var>.</p> <li data-md> <p>If <var>primaryKey</var> is defined, the record’s key is <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to②⓪">equal to</a> <var>key</var> and the record’s value is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than⑥">less than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to②①">equal to</a> <var>primaryKey</var>, or the record’s key is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than⑦">less than</a> <var>key</var>.</p> <li data-md> <p>If <var>position</var> is defined, and <var>source</var> is an <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⓪④">object store</a>, the record’s key is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than⑧">less than</a> <var>position</var>.</p> <li data-md> <p>If <var>position</var> is defined, and <var>source</var> is an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑤①">index</a>, the record’s key is <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to②②">equal to</a> <var>position</var> and the record’s value is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than⑨">less than</a> <var>object store position</var> or the record’s key is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than①⓪">less than</a> <var>position</var>.</p> <li data-md> <p>The record’s key is <a data-link-type="dfn" href="#in" id="ref-for-in①⑤">in</a> <var>range</var>.</p> </ul> <dt data-md>"<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prevunique" id="ref-for-dom-idbcursordirection-prevunique③">prevunique</a></code>" <dd data-md> <p>Let <var>temp record</var> be the last record in <var>records</var> which satisfy all of the following requirements:</p> <ul> <li data-md> <p>If <var>key</var> is defined, the record’s key is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than①①">less than</a> or <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to②③">equal to</a> <var>key</var>.</p> <li data-md> <p>If <var>position</var> is defined, the record’s key is <a data-link-type="dfn" href="#less-than" id="ref-for-less-than①②">less than</a> <var>position</var>.</p> <li data-md> <p>The record’s key is <a data-link-type="dfn" href="#in" id="ref-for-in①⑥">in</a> <var>range</var>.</p> </ul> <p>If <var>temp record</var> is defined, let <var>found record</var> be the first record in <var>records</var> whose <a data-link-type="dfn" href="#key" id="ref-for-key⑨⓪">key</a> is <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to②④">equal to</a> <var>temp record</var>’s <a data-link-type="dfn" href="#key" id="ref-for-key⑨①">key</a>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Iterating with "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-prevunique" id="ref-for-dom-idbcursordirection-prevunique④">prevunique</a></code>" visits the same records that "<code class="idl"><a data-link-type="idl" href="#dom-idbcursordirection-nextunique" id="ref-for-dom-idbcursordirection-nextunique④">nextunique</a></code>" visits, but in reverse order.</p> </dl> <li data-md> <p>If <var>found record</var> is not defined, then:</p> <ol> <li data-md> <p>Set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-key" id="ref-for-cursor-key⑦">key</a> to undefined.</p> <li data-md> <p>If <var>source</var> is an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑤②">index</a>, set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-object-store-position" id="ref-for-cursor-object-store-position⑤">object store position</a> to undefined.</p> <li data-md> <p>If <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag⑨">key only flag</a> is false, set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value⑧">value</a> to undefined.</p> <li data-md> <p>Return null.</p> </ol> <li data-md> <p>Let <var>position</var> be <var>found record</var>’s key.</p> <li data-md> <p>If <var>source</var> is an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑤③">index</a>, let <var>object store position</var> be <var>found record</var>’s value.</p> <li data-md> <p>Decrease <var>count</var> by 1.</p> </ol> <li data-md> <p>Set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-position" id="ref-for-cursor-position①④">position</a> to <var>position</var>.</p> <li data-md> <p>If <var>source</var> is an <a data-link-type="dfn" href="#index-concept" id="ref-for-index-concept⑤④">index</a>, set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-object-store-position" id="ref-for-cursor-object-store-position⑥">object store position</a> to <var>object store position</var>.</p> <li data-md> <p>Set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-key" id="ref-for-cursor-key⑧">key</a> to <var>found record</var>’s key.</p> <li data-md> <p>If <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-key-only-flag" id="ref-for-cursor-key-only-flag①⓪">key only flag</a> is false, then:</p> <ol> <li data-md> <p>Let <var>serialized</var> be <var>found record</var>’s <a data-link-type="dfn" href="#index-referenced-value" id="ref-for-index-referenced-value⑥">referenced value</a>.</p> <li data-md> <p>Set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-value" id="ref-for-cursor-value⑨">value</a> to <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions⑧">!</a> <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize⑥">StructuredDeserialize</a>(<var>serialized</var>, <var>targetRealm</var>)</p> </ol> <li data-md> <p>Set <var>cursor</var>’s <a data-link-type="dfn" href="#cursor-got-value-flag" id="ref-for-cursor-got-value-flag①⑤">got value flag</a> to true.</p> <li data-md> <p>Return <var>cursor</var>.</p> </ol> </div> <h2 class="heading settled" data-level="7" id="binding"><span class="secno">7. </span><span class="content">ECMAScript binding</span><a class="self-link" href="#binding"></a></h2> <p>This section defines how <a data-link-type="dfn" href="#key" id="ref-for-key⑨②">key</a> values defined in this specification are converted to and from ECMAScript values, and how they may be extracted from and injected into ECMAScript values using <a data-link-type="dfn" href="#key-path" id="ref-for-key-path④">key paths</a>. This section references types and algorithms and uses some algorithm conventions from the ECMAScript Language Specification. <a data-link-type="biblio" href="#biblio-ecma-262" title="ECMAScript Language Specification">[ECMA-262]</a> Conversions not detailed here are defined in <a data-link-type="biblio" href="#biblio-webidl" title="Web IDL Standard">[WEBIDL]</a>.</p> <h3 class="heading settled" data-level="7.1" id="extract-key-from-value"><span class="secno">7.1. </span><span class="content">Extract a key from a value</span><a class="self-link" href="#extract-key-from-value"></a></h3> <div class="algorithm" data-algorithm="extract a key from a value using a key path"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="extract-a-key-from-a-value-using-a-key-path">extract a key from a value using a key path</dfn> with <var>value</var>, <var>keyPath</var> and an optional <var>multiEntry flag</var>, run the following steps. The result of these steps is a <a data-link-type="dfn" href="#key" id="ref-for-key⑨③">key</a>, invalid, or failure, or the steps may throw an exception.</p> <ol> <li data-md> <p>Let <var>r</var> be the result of <a data-link-type="dfn" href="#evaluate-a-key-path-on-a-value" id="ref-for-evaluate-a-key-path-on-a-value">evaluating a key path on a value</a> with <var>value</var> and <var>keyPath</var>. Rethrow any exceptions.</p> <li data-md> <p>If <var>r</var> is failure, return failure.</p> <li data-md> <p>Let <var>key</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①④">converting a value to a key</a> with <var>r</var> if the <var>multiEntry flag</var> is false, and the result of <a data-link-type="dfn" href="#convert-a-value-to-a-multientry-key" id="ref-for-convert-a-value-to-a-multientry-key">converting a value to a multiEntry key</a> with <var>r</var> otherwise. Rethrow any exceptions.</p> <li data-md> <p>If <var>key</var> is invalid, return invalid.</p> <li data-md> <p>Return <var>key</var>.</p> </ol> </div> <div class="algorithm" data-algorithm="evaluate a key path on a value"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="evaluate-a-key-path-on-a-value">evaluate a key path on a value</dfn> with <var>value</var> and <var>keyPath</var>, run the following steps. The result of these steps is an ECMAScript value or failure, or the steps may throw an exception.</p> <ol> <li data-md> <p>If <var>keyPath</var> is a <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list①①">list</a> of strings, then:</p> <ol> <li data-md> <p>Let <var>result</var> be a new <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①②">Array</a></code> object created as if by the expression <code>[]</code>.</p> <li data-md> <p>Let <var>i</var> be 0.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑧">For each</a> <var>item</var> of <var>keyPath</var>:</p> <ol> <li data-md> <p>Let <var>key</var> be the result of recursively <a data-link-type="dfn" href="#evaluate-a-key-path-on-a-value" id="ref-for-evaluate-a-key-path-on-a-value①">evaluating a key path on a value</a> with <var>item</var> and <var>value</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert④">Assert</a>: <var>key</var> is not an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type" id="ref-for-sec-completion-record-specification-type">abrupt completion</a>.</p> <li data-md> <p>If <var>key</var> is failure, abort the overall algorithm and return failure.</p> <li data-md> <p>Let <var>p</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions⑨">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring" id="ref-for-sec-tostring">ToString</a>(<var>i</var>).</p> <li data-md> <p>Let <var>status</var> be <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty" id="ref-for-sec-createdataproperty">CreateDataProperty</a>(<var>result</var>, <var>p</var>, <var>key</var>).</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert⑤">Assert</a>: <var>status</var> is true.</p> <li data-md> <p>Increase <var>i</var> by 1.</p> </ol> <li data-md> <p>Return <var>result</var>.</p> <p class="note" role="note"><span class="marker">NOTE:</span> This will only ever "recurse" one level since <a data-link-type="dfn" href="#key-path" id="ref-for-key-path⑤">key path</a> sequences can’t ever be nested.</p> </ol> <li data-md> <p>If <var>keyPath</var> is the empty string, return <var>value</var> and skip the remaining steps.</p> <li data-md> <p>Let <var>identifiers</var> be the result of <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#strictly-split" id="ref-for-strictly-split">strictly splitting</a> <var>keyPath</var> on U+002E FULL STOP characters (.).</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate⑨">For each</a> <var>identifier</var> of <var>identifiers</var>, jump to the appropriate step below:</p> <dl class="switch"> <dt data-md>If <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values" id="ref-for-sec-ecmascript-data-types-and-values">Type</a>(<var>value</var>) is String, and <var>identifier</var> is "<code>length</code>" <dd data-md> <p>Let <var>value</var> be a Number equal to the number of elements in <var>value</var>.</p> <dt data-md>If <var>value</var> is an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①③">Array</a></code> and <var>identifier</var> is "<code>length</code>" <dd data-md> <p>Let <var>value</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①⓪">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tolength" id="ref-for-sec-tolength">ToLength</a>(<a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①①">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p">Get</a>(<var>value</var>, "<code>length</code>")).</p> <dt data-md>If <var>value</var> is a <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-Blob" id="ref-for-dfn-Blob②">Blob</a></code> and <var>identifier</var> is "<code>size</code>" <dd data-md> <p>Let <var>value</var> be a Number equal to <var>value</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-size" id="ref-for-dfn-size①">size</a></code>.</p> <dt data-md>If <var>value</var> is a <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-Blob" id="ref-for-dfn-Blob③">Blob</a></code> and <var>identifier</var> is "<code>type</code>" <dd data-md> <p>Let <var>value</var> be a String equal to <var>value</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-type" id="ref-for-dfn-type①">type</a></code>.</p> <dt data-md>If <var>value</var> is a <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-file" id="ref-for-dfn-file②">File</a></code> and <var>identifier</var> is "<code>name</code>" <dd data-md> <p>Let <var>value</var> be a String equal to <var>value</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-name" id="ref-for-dfn-name①">name</a></code>.</p> <dt data-md>If <var>value</var> is a <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-file" id="ref-for-dfn-file③">File</a></code> and <var>identifier</var> is "<code>lastModified</code>" <dd data-md> <p>Let <var>value</var> be a Number equal to <var>value</var>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-lastModified" id="ref-for-dfn-lastModified①">lastModified</a></code>.</p> <dt data-md>Otherwise <dd data-md> <ol> <li data-md> <p>If <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values" id="ref-for-sec-ecmascript-data-types-and-values①">Type</a>(<var>value</var>) is not Object, return failure.</p> <li data-md> <p>Let <var>hop</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①②">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-hasownproperty" id="ref-for-sec-hasownproperty">HasOwnProperty</a>(<var>value</var>, <var>identifier</var>).</p> <li data-md> <p>If <var>hop</var> is false, return failure.</p> <li data-md> <p>Let <var>value</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①③">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p①">Get</a>(<var>value</var>, <var>identifier</var>).</p> <li data-md> <p>If <var>value</var> is undefined, return failure.</p> </ol> </dl> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert⑥">Assert</a>: <var>value</var> is not an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type" id="ref-for-sec-completion-record-specification-type①">abrupt completion</a>.</p> <li data-md> <p>Return <var>value</var>.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Assertions can be made in the above steps because this algorithm is only applied to values that are the output of <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize⑦">StructuredDeserialize</a> and only access "own" properties.</p> <h3 class="heading settled" data-level="7.2" id="inject-key-into-value"><span class="secno">7.2. </span><span class="content">Inject a key into a value</span><a class="self-link" href="#inject-key-into-value"></a></h3> <p class="note" role="note"><span class="marker">NOTE:</span> The <a data-link-type="dfn" href="#key-path" id="ref-for-key-path⑥">key paths</a> used in this section are always strings and never sequences, since it is not possible to create a <a data-link-type="dfn" href="#object-store" id="ref-for-object-store①⓪⑤">object store</a> which has a <a data-link-type="dfn" href="#key-generator" id="ref-for-key-generator①⑨">key generator</a> and also has a <a data-link-type="dfn" href="#object-store-key-path" id="ref-for-object-store-key-path①⑧">key path</a> that is a sequence.</p> <div class="algorithm" data-algorithm="check that a key could be injected into a value"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="check-that-a-key-could-be-injected-into-a-value">check that a key could be injected into a value</dfn> with <var>value</var> and a <var>keyPath</var>, run the following steps. The result of these steps is either true or false.</p> <ol> <li data-md> <p>Let <var>identifiers</var> be the result of <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#strictly-split" id="ref-for-strictly-split①">strictly splitting</a> <var>keyPath</var> on U+002E FULL STOP characters (.).</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert⑦">Assert</a>: <var>identifiers</var> is not empty.</p> <li data-md> <p>Remove the last <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-item" id="ref-for-list-item①">item</a> of <var>identifiers</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate①⓪">For each</a> remaining <var>identifier</var> of <var>identifiers</var>, if any:</p> <ol> <li data-md> <p>If <var>value</var> is not an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object-objects" id="ref-for-sec-object-objects①">Object</a></code> or an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①④">Array</a></code>, return false.</p> <li data-md> <p>Let <var>hop</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①④">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-hasownproperty" id="ref-for-sec-hasownproperty①">HasOwnProperty</a>(<var>value</var>, <var>identifier</var>).</p> <li data-md> <p>If <var>hop</var> is false, return true.</p> <li data-md> <p>Let <var>value</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①⑤">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p②">Get</a>(<var>value</var>, <var>identifier</var>).</p> </ol> <li data-md> <p>Return true if <var>value</var> is an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object-objects" id="ref-for-sec-object-objects②">Object</a></code> or an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①⑤">Array</a></code>, or false otherwise.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Assertions can be made in the above steps because this algorithm is only applied to values that are the output of <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize⑧">StructuredDeserialize</a>.</p> <div class="algorithm" data-algorithm="inject a key into a value using a key path"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="inject-a-key-into-a-value-using-a-key-path">inject a key into a value using a key path</dfn> with <var>value</var>, a <var>key</var> and a <var>keyPath</var>, run these steps:</p> <ol> <li data-md> <p>Let <var>identifiers</var> be the result of <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#strictly-split" id="ref-for-strictly-split②">strictly splitting</a> <var>keyPath</var> on U+002E FULL STOP characters (.).</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert⑧">Assert</a>: <var>identifiers</var> is not empty.</p> <li data-md> <p>Let <var>last</var> be the last <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-item" id="ref-for-list-item②">item</a> of <var>identifiers</var> and remove it from the list.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate①①">For each</a> remaining <var>identifier</var> of <var>identifiers</var>:</p> <ol> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert⑨">Assert</a>: <var>value</var> is an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object-objects" id="ref-for-sec-object-objects③">Object</a></code> or an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①⑥">Array</a></code>.</p> <li data-md> <p>Let <var>hop</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①⑥">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-hasownproperty" id="ref-for-sec-hasownproperty②">HasOwnProperty</a>(<var>value</var>, <var>identifier</var>).</p> <li data-md> <p>If <var>hop</var> is false, then:</p> <ol> <li data-md> <p>Let <var>o</var> be a new <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object-objects" id="ref-for-sec-object-objects④">Object</a></code> created as if by the expression <code>({})</code>.</p> <li data-md> <p>Let <var>status</var> be <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty" id="ref-for-sec-createdataproperty①">CreateDataProperty</a>(<var>value</var>, <var>identifier</var>, <var>o</var>).</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert①⓪">Assert</a>: <var>status</var> is true.</p> </ol> <li data-md> <p>Let <var>value</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①⑦">!</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p③">Get</a>(<var>value</var>, <var>identifier</var>).</p> </ol> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert①①">Assert</a>: <var>value</var> is an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object-objects" id="ref-for-sec-object-objects⑤">Object</a></code> or an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①⑦">Array</a></code>.</p> <li data-md> <p>Let <var>keyValue</var> be the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value⑧">converting a key to a value</a> with <var>key</var>.</p> <li data-md> <p>Let <var>status</var> be <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty" id="ref-for-sec-createdataproperty②">CreateDataProperty</a>(<var>value</var>, <var>last</var>, <var>keyValue</var>).</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert①②">Assert</a>: <var>status</var> is true.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> Assertions can be made in the above steps because this algorithm is only applied to values that are the output of <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize" id="ref-for-structureddeserialize⑨">StructuredDeserialize</a>, and the steps to <a data-link-type="dfn" href="#check-that-a-key-could-be-injected-into-a-value" id="ref-for-check-that-a-key-could-be-injected-into-a-value①">check that a key could be injected into a value</a> have been run.</p> <h3 class="heading settled" data-level="7.3" id="convert-key-to-value"><span class="secno">7.3. </span><span class="content">Convert a key to a value</span><a class="self-link" href="#convert-key-to-value"></a></h3> <div class="algorithm" data-algorithm="convert a key to a value"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="convert-a-key-to-a-value">convert a key to a value</dfn> with <var>key</var>, run the following steps. The steps return an ECMAScript value.</p> <ol> <li data-md> <p>Let <var>type</var> be <var>key</var>’s <a data-link-type="dfn" href="#key-type" id="ref-for-key-type⑦">type</a>.</p> <li data-md> <p>Let <var>value</var> be <var>key</var>’s <a data-link-type="dfn" href="#key-value" id="ref-for-key-value⑤">value</a>.</p> <li data-md> <p>Switch on <var>type</var>:</p> <dl class="switch"> <dt data-md><em>number</em> <dd data-md> <p>Return an ECMAScript Number value equal to <var>value</var></p> <dt data-md><em>string</em> <dd data-md> <p>Return an ECMAScript String value equal to <var>value</var></p> <dt data-md><em>date</em> <dd data-md> <ol> <li data-md> <p>Let <var>date</var> be the result of executing the ECMAScript Date constructor with the single argument <var>value</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert①③">Assert</a>: <var>date</var> is not an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type" id="ref-for-sec-completion-record-specification-type②">abrupt completion</a>.</p> <li data-md> <p>Return <var>date</var>.</p> </ol> <dt data-md><em>binary</em> <dd data-md> <ol> <li data-md> <p>Let <var>len</var> be <var>value</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#byte-sequence-length" id="ref-for-byte-sequence-length">length</a>.</p> <li data-md> <p>Let <var>buffer</var> be the result of executing the ECMAScript ArrayBuffer constructor with <var>len</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert①④">Assert</a>: <var>buffer</var> is not an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type" id="ref-for-sec-completion-record-specification-type③">abrupt completion</a>.</p> <li data-md> <p>Set the entries in <var>buffer</var>’s [[ArrayBufferData]] internal slot to the entries in <var>value</var>.</p> <li data-md> <p>Return <var>buffer</var>.</p> </ol> <dt data-md><em>array</em> <dd data-md> <ol> <li data-md> <p>Let <var>array</var> be the result of executing the ECMAScript Array constructor with no arguments.</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert①⑤">Assert</a>: <var>array</var> is not an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type" id="ref-for-sec-completion-record-specification-type④">abrupt completion</a>.</p> <li data-md> <p>Let <var>len</var> be <var>value</var>’s <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-size" id="ref-for-list-size⑥">size</a>.</p> <li data-md> <p>Let <var>index</var> be 0.</p> <li data-md> <p>While <var>index</var> is less than <var>len</var>:</p> <ol> <li data-md> <p>Let <var>entry</var> be the result of <a data-link-type="dfn" href="#convert-a-key-to-a-value" id="ref-for-convert-a-key-to-a-value⑨">converting a key to a value</a> with <var>value</var>[<var>index</var>].</p> <li data-md> <p>Let <var>status</var> be <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty" id="ref-for-sec-createdataproperty③">CreateDataProperty</a>(<var>array</var>, <var>index</var>, <var>entry</var>).</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#assert" id="ref-for-assert①⑥">Assert</a>: <var>status</var> is true.</p> <li data-md> <p>Increase <var>index</var> by 1.</p> </ol> <li data-md> <p>Return <var>array</var>.</p> </ol> </dl> </ol> </div> <h3 class="heading settled" data-level="7.4" id="convert-value-to-key"><span class="secno">7.4. </span><span class="content">Convert a value to a key</span><a class="self-link" href="#convert-value-to-key"></a></h3> <div class="algorithm" data-algorithm="convert a value to a key"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="convert-a-value-to-a-key">convert a value to a key</dfn> with an ECMAScript value <var>input</var>, and an optional <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-set" id="ref-for-ordered-set④">set</a> <var>seen</var>, run the following steps. The result of these steps is a <a data-link-type="dfn" href="#key" id="ref-for-key⑨④">key</a> or invalid, or the steps may throw an exception.</p> <ol> <li data-md> <p>If <var>seen</var> was not given, then let <var>seen</var> be a new empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-set" id="ref-for-ordered-set⑤">set</a>.</p> <li data-md> <p>If <var>seen</var> <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-list-contain">contains</a> <var>input</var>, then return invalid.</p> <li data-md> <p>Jump to the appropriate step below:</p> <dl class="switch"> <dt data-md>If <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values" id="ref-for-sec-ecmascript-data-types-and-values②">Type</a>(<var>input</var>) is Number <dd data-md> <ol> <li data-md> <p>If <var>input</var> is NaN then return invalid.</p> <li data-md> <p>Otherwise, return a new <a data-link-type="dfn" href="#key" id="ref-for-key⑨⑤">key</a> with <a data-link-type="dfn" href="#key-type" id="ref-for-key-type⑧">type</a> <em>number</em> and <a data-link-type="dfn" href="#key-value" id="ref-for-key-value⑥">value</a> <var>input</var>.</p> </ol> <dt data-md>If <var>input</var> is a <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-objects" id="ref-for-sec-date-objects④">Date</a></code> (has a [[DateValue]] internal slot) <dd data-md> <ol> <li data-md> <p>Let <var>ms</var> be the value of <var>input</var>’s [[DateValue]] internal slot.</p> <li data-md> <p>If <var>ms</var> is NaN then return invalid.</p> <li data-md> <p>Otherwise, return a new <a data-link-type="dfn" href="#key" id="ref-for-key⑨⑥">key</a> with <a data-link-type="dfn" href="#key-type" id="ref-for-key-type⑨">type</a> <em>date</em> and <a data-link-type="dfn" href="#key-value" id="ref-for-key-value⑦">value</a> <var>ms</var>.</p> </ol> <dt data-md>If <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values" id="ref-for-sec-ecmascript-data-types-and-values③">Type</a>(<var>input</var>) is String <dd data-md> <ol> <li data-md> <p>Return a new <a data-link-type="dfn" href="#key" id="ref-for-key⑨⑦">key</a> with <a data-link-type="dfn" href="#key-type" id="ref-for-key-type①⓪">type</a> <em>string</em> and <a data-link-type="dfn" href="#key-value" id="ref-for-key-value⑧">value</a> <var>input</var>.</p> </ol> <dt data-md>If <var>input</var> is a <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-buffer-source-type" id="ref-for-dfn-buffer-source-type">buffer source type</a> <dd data-md> <ol> <li data-md> <p>Let <var>bytes</var> be the result of <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy" id="ref-for-dfn-get-buffer-source-copy">getting a copy of the bytes held by the buffer source</a> <var>input</var>. Rethrow any exceptions.</p> <li data-md> <p>Return a new <a data-link-type="dfn" href="#key" id="ref-for-key⑨⑧">key</a> with <a data-link-type="dfn" href="#key-type" id="ref-for-key-type①①">type</a> <em>binary</em> and <a data-link-type="dfn" href="#key-value" id="ref-for-key-value⑨">value</a> <var>bytes</var>.</p> </ol> <dt data-md>If <var>input</var> is an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#array-exotic-object" id="ref-for-array-exotic-object">Array exotic object</a> <dd data-md> <ol> <li data-md> <p>Let <var>len</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①⑧">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tolength" id="ref-for-sec-tolength①">ToLength</a>( <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions①⑨">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p④">Get</a>(<var>input</var>, "<code>length</code>")).</p> <li data-md> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#set-append" id="ref-for-set-append">Append</a> <var>input</var> to <var>seen</var>.</p> <li data-md> <p>Let <var>keys</var> be a new empty list.</p> <li data-md> <p>Let <var>index</var> be 0.</p> <li data-md> <p>While <var>index</var> is less than <var>len</var>:</p> <ol> <li data-md> <p>Let <var>hop</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions②⓪">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-hasownproperty" id="ref-for-sec-hasownproperty③">HasOwnProperty</a>(<var>input</var>, <var>index</var>).</p> <li data-md> <p>If <var>hop</var> is false, return invalid.</p> <li data-md> <p>Let <var>entry</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions②①">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p⑤">Get</a>(<var>input</var>, <var>index</var>).</p> <li data-md> <p>Let <var>key</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①⑤">converting a value to a key</a> with arguments <var>entry</var> and <var>seen</var>.</p> <li data-md> <p><a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-returnifabrupt" id="ref-for-sec-returnifabrupt">ReturnIfAbrupt</a>(<var>key</var>).</p> <li data-md> <p>If <var>key</var> is invalid abort these steps and return invalid.</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>key</var> to <var>keys</var>.</p> <li data-md> <p>Increase <var>index</var> by 1.</p> </ol> <li data-md> <p>Return a new <a data-link-type="dfn" href="#array-key" id="ref-for-array-key①①">array key</a> with <a data-link-type="dfn" href="#key-value" id="ref-for-key-value①⓪">value</a> <var>keys</var>.</p> </ol> <dt data-md>Otherwise <dd data-md> <p>Return invalid.</p> </dl> </ol> </div> <div class="algorithm" data-algorithm="convert a value to a multiEntry key"> <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="convert-a-value-to-a-multientry-key">convert a value to a multiEntry key</dfn> with an ECMAScript value <var>input</var>, run the following steps. The result of these steps is a <a data-link-type="dfn" href="#key" id="ref-for-key⑨⑨">key</a> or invalid, or the steps may throw an exception.</p> <ol> <li data-md> <p>If <var>input</var> is an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#array-exotic-object" id="ref-for-array-exotic-object①">Array exotic object</a>, then:</p> <ol> <li data-md> <p>Let <var>len</var> be <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions②②">?</a> ToLength( <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-algorithm-conventions" id="ref-for-sec-algorithm-conventions②③">?</a> <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p⑥">Get</a>(<var>input</var>, "<code>length</code>")).</p> <li data-md> <p>Let <var>seen</var> be a new <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ordered-set" id="ref-for-ordered-set⑥">set</a> containing only <var>input</var>.</p> <li data-md> <p>Let <var>keys</var> be a new empty <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>index</var> be 0.</p> <li data-md> <p>While <var>index</var> is less than <var>len</var>:</p> <ol> <li data-md> <p>Let <var>entry</var> be <a data-link-type="abstract-op" href="https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p" id="ref-for-sec-get-o-p⑦">Get</a>(<var>input</var>, <var>index</var>).</p> <li data-md> <p>If <var>entry</var> is not an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type" id="ref-for-sec-completion-record-specification-type⑤">abrupt completion</a>, then:</p> <ol> <li data-md> <p>Let <var>key</var> be the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①⑥">converting a value to a key</a> with arguments <var>entry</var> and <var>seen</var>.</p> <li data-md> <p>If <var>key</var> is not invalid or an <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type" id="ref-for-sec-completion-record-specification-type⑥">abrupt completion</a>, and there is no <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-item" id="ref-for-list-item③">item</a> in <var>keys</var> <a data-link-type="dfn" href="#equal-to" id="ref-for-equal-to②⑤">equal to</a> <var>key</var>, then <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append②">append</a> <var>key</var> to <var>keys</var>.</p> </ol> <li data-md> <p>Increase <var>index</var> by 1.</p> </ol> <li data-md> <p>Return a new <a data-link-type="dfn" href="#array-key" id="ref-for-array-key①②">array key</a> with <a data-link-type="dfn" href="#key-value" id="ref-for-key-value①①">value</a> set to <var>keys</var>.</p> </ol> <li data-md> <p>Otherwise, return the result of <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①⑦">converting a value to a key</a> with argument <var>input</var>. Rethrow any exceptions.</p> </ol> </div> <p class="note" role="note"><span class="marker">NOTE:</span> These steps are similar to those to <a data-link-type="dfn" href="#convert-a-value-to-a-key" id="ref-for-convert-a-value-to-a-key①⑧">convert a value to a key</a> but if the top-level value is an <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects" id="ref-for-sec-array-objects①⑧">Array</a></code> then members which can not be converted to keys are ignored, and duplicates are removed.</p> <p>For example, the value <code>[10, 20, null, 30, 20]</code> is converted to an <a data-link-type="dfn" href="#array-key" id="ref-for-array-key①③">array key</a> with <a data-link-type="dfn" href="#subkeys" id="ref-for-subkeys⑤">subkeys</a> 10, 20, 30.</p> <h2 class="heading settled" data-level="8" id="privacy"><span class="secno">8. </span><span class="content">Privacy considerations</span><a class="self-link" href="#privacy"></a></h2> <p><em>This section is non-normative.</em></p> <h3 class="heading settled" data-level="8.1" id="user-tracking"><span class="secno">8.1. </span><span class="content">User tracking</span><a class="self-link" href="#user-tracking"></a></h3> <p>A third-party host (or any object capable of getting content distributed to multiple sites) could use a unique identifier stored in its client-side database to track a user across multiple sessions, building a profile of the user’s activities. In conjunction with a site that is aware of the user’s real id object (for example an e-commerce site that requires authenticated credentials), this could allow oppressive groups to target individuals with greater accuracy than in a world with purely anonymous Web usage.</p> <p>There are a number of techniques that can be used to mitigate the risk of user tracking:</p> <dl> <dt data-md>Blocking third-party storage <dd data-md> <p>User agents may restrict access to the database objects to scripts originating at the domain of the top-level document of the <span>browsing context</span>, for instance denying access to the API for pages from other domains running in <code>iframe</code>s.</p> <dt data-md>Expiring stored data <dd data-md> <p>User agents may automatically delete stored data after a period of time.</p> <p>This can restrict the ability of a site to track a user, as the site would then only be able to track the user across multiple sessions when she authenticates with the site itself (e.g. by making a purchase or logging in to a service).</p> <p>However, this also puts the user’s data at risk.</p> <dt data-md>Treating persistent storage as cookies <dd data-md> <p>User agents should present the database feature to the user in a way that associates them strongly with HTTP session cookies. <a data-link-type="biblio" href="#biblio-cookies" title="HTTP State Management Mechanism">[COOKIES]</a></p> <p>This might encourage users to view such storage with healthy suspicion.</p> <dt data-md>Site-specific safe-listing of access to databases <dd data-md> <p>User agents may require the user to authorize access to databases before a site can use the feature.</p> <dt data-md>Attribution of third-party storage <dd data-md> <p>User agents may record the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin" id="ref-for-concept-origin">origins</a> of sites that contained content from third-party <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin" id="ref-for-concept-origin①">origins</a> that caused data to be stored.</p> <p>If this information is then used to present the view of data currently in persistent storage, it would allow the user to make informed decisions about which parts of the persistent storage to prune. Combined with a blocklist ("delete this data and prevent this domain from ever storing data again"), the user can restrict the use of persistent storage to sites that she trusts.</p> <dt data-md>Shared blocklists <dd data-md> <p>User agents may allow users to share their persistent storage domain blocklists.</p> <p>This would allow communities to act together to protect their privacy.</p> </dl> <p>While these suggestions prevent trivial use of this API for user tracking, they do not block it altogether. Within a single domain, a site can continue to track the user during a session, and can then pass all this information to the third party along with any identifying information (names, credit card numbers, addresses) obtained by the site. If a third party cooperates with multiple sites to obtain such information, a profile can still be created.</p> <p>However, user tracking is to some extent possible even with no cooperation from the user agent whatsoever, for instance by using session identifiers in URLs, a technique already commonly used for innocuous purposes but easily repurposed for user tracking (even retroactively). This information can then be shared with other sites, using visitors' IP addresses and other user-specific data (e.g. user-agent headers and configuration settings) to combine separate sessions into coherent user profiles.</p> <h3 class="heading settled" data-level="8.2" id="cookie-resurrection"><span class="secno">8.2. </span><span class="content">Cookie resurrection</span><a class="self-link" href="#cookie-resurrection"></a></h3> <p>If the user interface for persistent storage presents data in the persistent storage features described in this specification separately from data in HTTP session cookies, then users are likely to delete data in one and not the other. This would allow sites to use the two features as redundant backup for each other, defeating a user’s attempts to protect his privacy.</p> <h3 class="heading settled" data-level="8.3" id="sensitivity-of-data"><span class="secno">8.3. </span><span class="content">Sensitivity of data</span><a class="self-link" href="#sensitivity-of-data"></a></h3> <p>User agents should treat persistently stored data as potentially sensitive; it is quite possible for e-mails, calendar appointments, health records, or other confidential documents to be stored in this mechanism.</p> <p>To this end, user agents should ensure that when deleting data, it is promptly deleted from the underlying storage.</p> <h2 class="heading settled" data-level="9" id="security"><span class="secno">9. </span><span class="content">Security considerations</span><a class="self-link" href="#security"></a></h2> <h3 class="heading settled" data-level="9.1" id="dns-spoofing-attacks"><span class="secno">9.1. </span><span class="content">DNS spoofing attacks</span><a class="self-link" href="#dns-spoofing-attacks"></a></h3> <p>Because of the potential for DNS spoofing attacks, one cannot guarantee that a host claiming to be in a certain domain really is from that domain. To mitigate this, pages can use TLS. Pages using TLS can be sure that only pages using TLS that have certificates identifying them as being from the same domain can access their databases.</p> <h3 class="heading settled" data-level="9.2" id="cross-directory-attacks"><span class="secno">9.2. </span><span class="content">Cross-directory attacks</span><a class="self-link" href="#cross-directory-attacks"></a></h3> <p>Different authors sharing one host name, for example users hosting content on <code>geocities.com</code>, all share one set of databases.</p> <p>There is no feature to restrict the access by pathname. Authors on shared hosts are therefore recommended to avoid using these features, as it would be trivial for other authors to read the data and overwrite it.</p> <p class="note" role="note"><span class="marker">NOTE:</span> Even if a path-restriction feature was made available, the usual DOM scripting security model would make it trivial to bypass this protection and access the data from any path.</p> <h3 class="heading settled" data-level="9.3" id="implementation-risks"><span class="secno">9.3. </span><span class="content">Implementation risks</span><a class="self-link" href="#implementation-risks"></a></h3> <p>The two primary risks when implementing these persistent storage features are letting hostile sites read information from other domains, and letting hostile sites write information that is then read from other domains.</p> <p>Letting third-party sites read data that is not supposed to be read from their domain causes <em>information leakage</em>, For example, a user’s shopping wish list on one domain could be used by another domain for targeted advertising; or a user’s work-in-progress confidential documents stored by a word-processing site could be examined by the site of a competing company.</p> <p>Letting third-party sites write data to the persistent storage of other domains can result in <em>information spoofing</em>, which is equally dangerous. For example, a hostile site could add records to a user’s wish list; or a hostile site could set a user’s session identifier to a known ID that the hostile site can then use to track the user’s actions on the victim site.</p> <p>Thus, strictly following the storage key partitioning model described in this specification is important for user security.</p> <p>If host names or database names are used to construct paths for persistence to a file system they must be appropriately escaped to prevent an adversary from accessing information from other <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-key" id="ref-for-storage-key⑦">storage keys</a> using relative paths such as "<code>../</code>".</p> <h3 class="heading settled" data-level="9.4" id="persistence-risks"><span class="secno">9.4. </span><span class="content">Persistence risks</span><a class="self-link" href="#persistence-risks"></a></h3> <p>Practical implementations will persist data to a non-volatile storage medium. Data will be serialized when stored and deserialized when retrieved, although the details of the serialization format will be user-agent specific. User agents are likely to change their serialization format over time. For example, the format may be updated to handle new data types, or to improve performance. To satisfy the operational requirements of this specification, implementations must therefore handle older serialization formats in some way. Improper handling of older data can result in security issues. In addition to basic serialization concerns, serialized data could encode assumptions which are not valid in newer versions of the user agent.</p> <p>A practical example of this is the <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/text-processing.html#sec-regexp-regular-expression-objects" id="ref-for-sec-regexp-regular-expression-objects">RegExp</a></code> type. The <a data-link-type="abstract-op" href="https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage" id="ref-for-structuredserializeforstorage⑤">StructuredSerializeForStorage</a> operation allows serializing <code class="idl"><a data-link-type="idl" href="https://tc39.es/ecma262/multipage/text-processing.html#sec-regexp-regular-expression-objects" id="ref-for-sec-regexp-regular-expression-objects①">RegExp</a></code> objects. A typical user agent will compile a regular expression into native machine instructions, with assumptions about how the input data is passed and results returned. If this internal state was serialized as part of the data stored to the database, various problems could arise when the internal representation was later deserialized. For example, the means by which data was passed into the code could have changed. Security bugs in the compiler output could have been identified and fixed in updates to the user agent, but remain in the serialized internal state.</p> <p>User agents must identify and handle older data appropriately. One approach is to include version identifiers in the serialization format, and to reconstruct any internal state from script-visible state when older data is encountered.</p> <h2 class="heading settled" data-level="10" id="accessibility"><span class="secno">10. </span><span class="content">Accessibility considerations</span><a class="self-link" href="#accessibility"></a></h2> <p><em>This section is non-normative.</em></p> <p>The API described by this specification has limited accesibility considerations:</p> <ul> <li data-md> <p>It does not provide for visual rendering of content, or control over color.</p> <li data-md> <p>It does not provide features to accept user input.</p> <li data-md> <p>It does not provide user interaction features.</p> <li data-md> <p>It does not define document semantics.</p> <li data-md> <p>It does not provide time-based visual media.</p> <li data-md> <p>It does not allow time limits.</p> <li data-md> <p>It does not directly provide content for end-users, either in textual, graphical or other or non-textual form.</p> <li data-md> <p>It does not define a transmission protocol.</p> </ul> <p>The API does allow storage of structured content. Textual content can be stored as strings. Support exists in the API for developers to store alternative non-textual content such as images or audio as <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-Blob" id="ref-for-dfn-Blob④">Blob</a></code>, <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-file" id="ref-for-dfn-file④">File</a></code>, or <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/canvas.html#imagedata" id="ref-for-imagedata①">ImageData</a></code> objects. Developers producing dynamic content applications using the API should ensure that the content is accessible to users with a variety of technologies and needs.</p> <p>While the API itself does not define a specific mechanism for it, storage of structured content also allows developers to store internationalized content, using different records or structure within records to hold language alternatives.</p> <p>The API does not define or require any a user agent to generate a user interface to enable interaction with the API. User agents may optionally provide user interface elements to support the API. Examples include prompts to users when additional storage quota is required, functionality to observe storage used by particular web sites, or tools specific to the API’s storage such as inspecting, modifying, or deleting records. Any such user interface elements must be designed with accessibility tools in mind. For example, a user interface presenting the fraction of storage quota used in graphical form must also provide the same data to tools such as screen readers.</p> <h2 class="heading settled" data-level="11" id="revision-history"><span class="secno">11. </span><span class="content">Revision history</span><a class="self-link" href="#revision-history"></a></h2> <p><em>This section is non-normative.</em></p> <p>The following is an informative summary of the changes since the last publication of this specification. A complete revision history can be found <a href="https://github.com/w3c/IndexedDB/">here</a>. For the revision history of the first edition, see <a href="https://www.w3.org/TR/2015/REC-IndexedDB-20150108/#revision-history">that document’s Revision History</a>. For the revision history of the second edition, see <a href="https://www.w3.org/TR/IndexedDB-2/#revision-history">that document’s Revision History</a>.</p> <ul> <li data-md> <p>The <a data-link-type="dfn" href="#cleanup-indexed-database-transactions" id="ref-for-cleanup-indexed-database-transactions">cleanup Indexed Database transactions</a> algorithm now returns a value for integration with other specs. (<a href="https://github.com/w3c/IndexedDB/pull/232">PR #232</a>)</p> <li data-md> <p>Updated <a href="#global-scope">partial interface definition</a> since <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope" id="ref-for-windoworworkerglobalscope①">WindowOrWorkerGlobalScope</a></code> is now a <code>mixin</code> (<a href="https://github.com/w3c/IndexedDB/pull/238">PR #238</a>).</p> <li data-md> <p>Added <code class="idl"><a data-link-type="idl" href="#dom-idbfactory-databases" id="ref-for-dom-idbfactory-databases③">databases()</a></code> method. (<a href="https://github.com/w3c/IndexedDB/issues/31">Issue #31</a>)</p> <li data-md> <p>Added <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-commit" id="ref-for-dom-idbtransaction-commit⑤">commit()</a></code> method. (<a href="https://github.com/w3c/IndexedDB/issues/234">Issue #234</a>)</p> <li data-md> <p>Added <code class="idl"><a data-link-type="idl" href="#dom-idbcursor-request" id="ref-for-dom-idbcursor-request③">request</a></code> attribute. (<a href="https://github.com/w3c/IndexedDB/issues/255">Issue #255</a>)</p> <li data-md> <p>Removed handling for nonstandard <code>lastModifiedDate</code> property of <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/FileAPI/#dfn-file" id="ref-for-dfn-file⑤">File</a></code> objects. (<a href="https://github.com/w3c/IndexedDB/issues/215">Issue #215</a>)</p> <li data-md> <p>Remove escaping <code class="idl"><a data-link-type="idl" href="#dom-idbkeyrange-includes" id="ref-for-dom-idbkeyrange-includes②">includes()</a></code> method. (<a href="https://github.com/w3c/IndexedDB/issues/294">Issue #294</a>)</p> <li data-md> <p>Restrict array keys to <a data-link-type="dfn" href="https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#array-exotic-object" id="ref-for-array-exotic-object②">Array exotic objects</a> (i.e. disallow proxies). (<a href="https://github.com/w3c/IndexedDB/issues/309">Issue #309</a>)</p> <li data-md> <p>Transactions are now temporarily made inactive during clone operations.</p> <li data-md> <p>Added <code class="idl"><a data-link-type="idl" href="#dom-idbtransactionoptions-durability" id="ref-for-dom-idbtransactionoptions-durability④">durability</a></code> option and <code class="idl"><a data-link-type="idl" href="#dom-idbtransaction-durability" id="ref-for-dom-idbtransaction-durability③">durability</a></code> attribute. (<a href="https://github.com/w3c/IndexedDB/issues/50">Issue #50</a>)</p> <li data-md> <p>Specified <a href="#transaction-scheduling">§ 2.7.2 Transaction scheduling</a> more precisely and disallow starting read/write transactions while read-only transactions with overlapping scope are running. (<a href="https://github.com/w3c/IndexedDB/issues/253">Issue #253</a>)</p> <li data-md> <p>Added <a href="#accessibility">Accessibility considerations</a> section. (<a href="https://github.com/w3c/IndexedDB/issues/327">Issue #327</a>)</p> <li data-md> <p>Used <a data-link-type="biblio" href="#biblio-infra" title="Infra Standard">[infra]</a>'s list sorting definition. (<a href="https://github.com/w3c/IndexedDB/issues/346">Issue #346</a>)</p> <li data-md> <p>Added a definition for <a data-link-type="dfn" href="#transaction-live" id="ref-for-transaction-live①②">live</a> transactions, and renamed "run an upgrade transaction" to <a data-link-type="dfn" href="#upgrade-a-database" id="ref-for-upgrade-a-database④">upgrade a database</a>, to disambiguate "running". (<a href="https://github.com/w3c/IndexedDB/issues/408">Issue #408</a>)</p> <li data-md> <p>Specified the <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#idl-DOMException" id="ref-for-idl-DOMException①⑧⑨">DOMException</a></code> type for failures when reading a value from the underlying storage in <a href="#object-store-retrieval-operation">§ 6.2 Object store retrieval operations</a>. (<a href="https://github.com/w3c/IndexedDB/issues/423">Issue #423</a>)</p> </ul> <h2 class="heading settled" data-level="12" id="acknowledgements"><span class="secno">12. </span><span class="content">Acknowledgements</span><a class="self-link" href="#acknowledgements"></a></h2> <p><em>This section is non-normative.</em></p> <p>Special thanks to Nikunj Mehta, the original author of the first edition, and Jonas Sicking, Eliot Graff, Andrei Popescu, and Jeremy Orlow, additional editors of the first edition.</p> <p>Garret Swart was extremely influential in the design of this specification.</p> <p>Thanks to Tab Atkins, Jr. for creating and maintaining <a href="https://github.com/tabatkins/bikeshed">Bikeshed</a>, the specification authoring tool used to create this document, and for his general authoring advice.</p> <p>Special thanks to Abhishek Shanthkumar, Adam Klein, Addison Phillips, Adrienne Walker, Alec Flett, Andrea Marchesini, Andreas Butler, Andrew Sutherland, Anne van Kesteren, Anthony Ramine, Ari Chivukula, Arun Ranganathan, Ben Dilts, Ben Turner, Bevis Tseng, Boris Zbarsky, Brett Zamir, Chris Anderson, Dana Florescu, Danillo Paiva, David Grogan, Domenic Denicola, Dominique Hazael-Massieux, Evan Stade, Glenn Maynard, Hans Wennborg, Isiah Meadows, Israel Hilerio, Jake Archibald, Jake Drew, Jerome Hode, Josh Matthews, João Eiras, Kagami Sascha Rosylight, Kang-Hao Lu, Kris Zyp, Kristof Degrave, Kyaw Tun, Kyle Huey, Laxminarayan G Kamath A, Maciej Stachowiak, Marcos Cáceres, Margo Seltzer, Marijn Kruisselbrink, Ms2ger, Odin Omdal, Olli Pettay, Pablo Castro, Philip Jägenstedt, Shawn Wilsher, Simon Pieters, Tobie Langel, Victor Costan, Xiaoqian Wu, Yannic Bonenberger, Yaron Tausky, Yonathan Randolph, and Zhiqiang Zhang, all of whose feedback and suggestions have led to improvements to this specification.</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> abort <ul> <li><a href="#transaction-abort">dfn for transaction</a><span>, in § 2.7.1</span> <li><a href="#eventdef-idbtransaction-abort">event for IDBTransaction</a><span>, in § 2.7.1</span> </ul> <li><a href="#dom-idbtransaction-abort">abort()</a><span>, in § 4.9</span> <li><a href="#abort-an-upgrade-transaction">abort an upgrade transaction</a><span>, in § 5.8</span> <li><a href="#abort-a-transaction">abort a transaction</a><span>, in § 5.5</span> <li><a href="#transaction-abort">aborted</a><span>, in § 2.7.1</span> <li><a href="#transaction-abort">aborting</a><span>, in § 2.7.1</span> <li><a href="#transaction-active">active</a><span>, in § 2.7.1</span> <li><a href="#add-or-put">add or put</a><span>, in § 4.5</span> <li><a href="#dom-idbobjectstore-add">add(value)</a><span>, in § 4.5</span> <li><a href="#dom-idbobjectstore-add">add(value, key)</a><span>, in § 4.5</span> <li><a href="#dom-idbcursor-advance">advance(count)</a><span>, in § 4.8</span> <li><a href="#array-key">array key</a><span>, in § 2.4</span> <li><a href="#greater-than">ascending</a><span>, in § 2.4</span> <li><a href="#asynchronously-execute-a-request">asynchronously execute a request</a><span>, in § 5.6</span> <li> autoIncrement <ul> <li><a href="#dom-idbobjectstore-autoincrement">attribute for IDBObjectStore</a><span>, in § 4.5</span> <li><a href="#dom-idbobjectstoreparameters-autoincrement">dict-member for IDBObjectStoreParameters</a><span>, in § 4.4</span> </ul> <li><a href="#eventdef-idbopendbrequest-blocked">blocked</a><span>, in § 2.8.1</span> <li><a href="#dom-idbkeyrange-bound">bound(lower, upper)</a><span>, in § 4.7</span> <li><a href="#dom-idbkeyrange-bound">bound(lower, upper, lowerOpen)</a><span>, in § 4.7</span> <li><a href="#dom-idbkeyrange-bound">bound(lower, upper, lowerOpen, upperOpen)</a><span>, in § 4.7</span> <li><a href="#check-that-a-key-could-be-injected-into-a-value">check that a key could be injected into a value</a><span>, in § 7.2</span> <li><a href="#transaction-cleanup-event-loop">cleanup event loop</a><span>, in § 2.7</span> <li><a href="#cleanup-indexed-database-transactions">cleanup Indexed Database transactions</a><span>, in § 2.7.1</span> <li><a href="#dom-idbobjectstore-clear">clear()</a><span>, in § 4.5</span> <li><a href="#clear-an-object-store">clear an object store</a><span>, in § 6.6</span> <li><a href="#clone">clone</a><span>, in § 5.11</span> <li><a href="#eventdef-idbdatabase-close">close</a><span>, in § 2.1.1</span> <li><a href="#dom-idbdatabase-close">close()</a><span>, in § 4.4</span> <li><a href="#close-a-database-connection">close a database connection</a><span>, in § 5.2</span> <li><a href="#connection-closed">closed</a><span>, in § 2.1.1</span> <li><a href="#connection-close-pending-flag">close pending flag</a><span>, in § 2.1.1</span> <li><a href="#dom-idbfactory-cmp">cmp(first, second)</a><span>, in § 4.3</span> <li><a href="#transaction-commit">commit</a><span>, in § 2.7.1</span> <li><a href="#dom-idbtransaction-commit">commit()</a><span>, in § 4.9</span> <li><a href="#commit-a-transaction">commit a transaction</a><span>, in § 5.4</span> <li><a href="#transaction-commit">committed</a><span>, in § 2.7.1</span> <li><a href="#transaction-committing">committing</a><span>, in § 2.7.1</span> <li><a href="#compare-two-keys">compare two keys</a><span>, in § 2.4</span> <li><a href="#eventdef-idbtransaction-complete">complete</a><span>, in § 2.7.1</span> <li><a href="#connection">connected</a><span>, in § 2.1.1</span> <li> connection <ul> <li><a href="#connection">definition of</a><span>, in § 2.1.1</span> <li><a href="#transaction-connection">dfn for transaction</a><span>, in § 2.7</span> </ul> <li><a href="#connection-queue">connection queue</a><span>, in § 2.8.2</span> <li><a href="#dom-idbversionchangeevent-idbversionchangeevent">constructor(type)</a><span>, in § 4.2</span> <li><a href="#dom-idbversionchangeevent-idbversionchangeevent">constructor(type, eventInitDict)</a><span>, in § 4.2</span> <li><a href="#containing-only">containing only</a><span>, in § 2.9</span> <li><a href="#dom-idbcursor-continue">continue()</a><span>, in § 4.8</span> <li><a href="#dom-idbcursor-continue">continue(key)</a><span>, in § 4.8</span> <li><a href="#dom-idbcursor-continueprimarykey">continuePrimaryKey(key, primaryKey)</a><span>, in § 4.8</span> <li><a href="#convert-a-key-to-a-value">convert a key to a value</a><span>, in § 7.3</span> <li><a href="#convert-a-value-to-a-key">convert a value to a key</a><span>, in § 7.4</span> <li><a href="#convert-a-value-to-a-key-range">convert a value to a key range</a><span>, in § 2.9</span> <li><a href="#convert-a-value-to-a-multientry-key">convert a value to a multiEntry key</a><span>, in § 7.4</span> <li> count() <ul> <li><a href="#dom-idbindex-count">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-count">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> count(query) <ul> <li><a href="#dom-idbindex-count">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-count">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li><a href="#count-the-records-in-a-range">count the records in a range</a><span>, in § 6.5</span> <li><a href="#create-a-sorted-name-list">create a sorted name list</a><span>, in § 2</span> <li><a href="#transaction-created">created</a><span>, in § 2.7.1</span> <li><a href="#dom-idbobjectstore-createindex">createIndex(name, keyPath)</a><span>, in § 4.5</span> <li><a href="#dom-idbobjectstore-createindex">createIndex(name, keyPath, options)</a><span>, in § 4.5</span> <li><a href="#dom-idbdatabase-createobjectstore">createObjectStore(name)</a><span>, in § 4.4</span> <li><a href="#dom-idbdatabase-createobjectstore">createObjectStore(name, options)</a><span>, in § 4.4</span> <li><a href="#key-generator-current-number">current number</a><span>, in § 2.11</span> <li><a href="#cursor">cursor</a><span>, in § 2.10</span> <li><a href="#database">database</a><span>, in § 2.1</span> <li><a href="#database-access-task-source">database access task source</a><span>, in § 4</span> <li><a href="#dom-idbfactory-databases">databases()</a><span>, in § 4.3</span> <li><a href="#dom-idbtransaction-db">db</a><span>, in § 4.9</span> <li><a href="#dom-idbtransactiondurability-default">"default"</a><span>, in § 4.4</span> <li><a href="#dom-idbcursor-delete">delete()</a><span>, in § 4.8</span> <li><a href="#delete-a-database">delete a database</a><span>, in § 5.3</span> <li><a href="#dom-idbfactory-deletedatabase">deleteDatabase(name)</a><span>, in § 4.3</span> <li><a href="#dom-idbobjectstore-deleteindex">deleteIndex(name)</a><span>, in § 4.5</span> <li><a href="#dom-idbdatabase-deleteobjectstore">deleteObjectStore(name)</a><span>, in § 4.4</span> <li><a href="#dom-idbobjectstore-delete">delete(query)</a><span>, in § 4.5</span> <li><a href="#delete-records-from-an-object-store">delete records from an object store</a><span>, in § 6.4</span> <li> direction <ul> <li><a href="#dom-idbcursor-direction">attribute for IDBCursor</a><span>, in § 4.8</span> <li><a href="#cursor-direction">dfn for cursor</a><span>, in § 2.10</span> </ul> <li><a href="#dom-idbrequestreadystate-done">"done"</a><span>, in § 4.1</span> <li><a href="#request-done-flag">done flag</a><span>, in § 2.8</span> <li> durability <ul> <li><a href="#dom-idbtransaction-durability">attribute for IDBTransaction</a><span>, in § 4.9</span> <li><a href="#dom-idbtransactionoptions-durability">dict-member for IDBTransactionOptions</a><span>, in § 4.4</span> </ul> <li><a href="#transaction-durability-hint">durability hint</a><span>, in § 2.7</span> <li><a href="#cursor-effective-key">effective key</a><span>, in § 2.10</span> <li><a href="#cursor-effective-object-store">effective object store</a><span>, in § 2.10</span> <li><a href="#equal-to">equal to</a><span>, in § 2.4</span> <li> error <ul> <li><a href="#dom-idbrequest-error">attribute for IDBRequest</a><span>, in § 4.1</span> <li><a href="#dom-idbtransaction-error">attribute for IDBTransaction</a><span>, in § 4.9</span> <li><a href="#request-error">dfn for request</a><span>, in § 2.8</span> <li><a href="#transaction-error">dfn for transaction</a><span>, in § 2.7</span> <li><a href="#eventdef-idbrequest-error">event for IDBRequest</a><span>, in § 2.8</span> </ul> <li><a href="#evaluate-a-key-path-on-a-value">evaluate a key path on a value</a><span>, in § 7.1</span> <li><a href="#extract-a-key-from-a-value-using-a-key-path">extract a key from a value using a key path</a><span>, in § 7.1</span> <li><a href="#transaction-finished">finished</a><span>, in § 2.7.1</span> <li><a href="#fire-an-error-event">fire an error event</a><span>, in § 5.10</span> <li><a href="#fire-a-success-event">fire a success event</a><span>, in § 5.9</span> <li><a href="#fire-a-version-change-event">fire a version change event</a><span>, in § 4.2</span> <li><a href="#generate-a-key">generate a key</a><span>, in § 2.11</span> <li> getAll() <ul> <li><a href="#dom-idbindex-getall">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-getall">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> getAllKeys() <ul> <li><a href="#dom-idbindex-getallkeys">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-getallkeys">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> getAllKeys(query) <ul> <li><a href="#dom-idbindex-getallkeys">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-getallkeys">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> getAllKeys(query, count) <ul> <li><a href="#dom-idbindex-getallkeys">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-getallkeys">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> getAll(query) <ul> <li><a href="#dom-idbindex-getall">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-getall">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> getAll(query, count) <ul> <li><a href="#dom-idbindex-getall">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-getall">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> getKey(query) <ul> <li><a href="#dom-idbindex-getkey">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-getkey">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> get(query) <ul> <li><a href="#dom-idbindex-get">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-get">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li><a href="#cursor-got-value-flag">got value flag</a><span>, in § 2.10</span> <li><a href="#greater-than">greater than</a><span>, in § 2.4</span> <li><a href="#idbcursor">IDBCursor</a><span>, in § 4.8</span> <li><a href="#enumdef-idbcursordirection">IDBCursorDirection</a><span>, in § 4.8</span> <li><a href="#idbcursorwithvalue">IDBCursorWithValue</a><span>, in § 4.8</span> <li><a href="#idbdatabase">IDBDatabase</a><span>, in § 4.4</span> <li><a href="#dictdef-idbdatabaseinfo">IDBDatabaseInfo</a><span>, in § 4.3</span> <li><a href="#idbfactory">IDBFactory</a><span>, in § 4.3</span> <li><a href="#idbindex">IDBIndex</a><span>, in § 4.6</span> <li><a href="#dictdef-idbindexparameters">IDBIndexParameters</a><span>, in § 4.5</span> <li><a href="#idbkeyrange">IDBKeyRange</a><span>, in § 4.7</span> <li><a href="#idbobjectstore">IDBObjectStore</a><span>, in § 4.5</span> <li><a href="#dictdef-idbobjectstoreparameters">IDBObjectStoreParameters</a><span>, in § 4.4</span> <li><a href="#idbopendbrequest">IDBOpenDBRequest</a><span>, in § 4.1</span> <li><a href="#idbrequest">IDBRequest</a><span>, in § 4.1</span> <li><a href="#enumdef-idbrequestreadystate">IDBRequestReadyState</a><span>, in § 4.1</span> <li><a href="#idbtransaction">IDBTransaction</a><span>, in § 4.9</span> <li><a href="#enumdef-idbtransactiondurability">IDBTransactionDurability</a><span>, in § 4.4</span> <li><a href="#enumdef-idbtransactionmode">IDBTransactionMode</a><span>, in § 4.9</span> <li><a href="#dictdef-idbtransactionoptions">IDBTransactionOptions</a><span>, in § 4.4</span> <li><a href="#idbversionchangeevent">IDBVersionChangeEvent</a><span>, in § 4.2</span> <li><a href="#dictdef-idbversionchangeeventinit">IDBVersionChangeEventInit</a><span>, in § 4.2</span> <li><a href="#dom-idbversionchangeevent-idbversionchangeevent">IDBVersionChangeEvent(type)</a><span>, in § 4.2</span> <li><a href="#dom-idbversionchangeevent-idbversionchangeevent">IDBVersionChangeEvent(type, eventInitDict)</a><span>, in § 4.2</span> <li><a href="#identifier">identifier</a><span>, in § 2.5</span> <li><a href="#in">in</a><span>, in § 2.9</span> <li><a href="#transaction-inactive">inactive</a><span>, in § 2.7.1</span> <li><a href="#dom-idbkeyrange-includes">includes(key)</a><span>, in § 4.7</span> <li> index <ul> <li><a href="#index-concept">definition of</a><span>, in § 2.6</span> <li><a href="#index-handle-index">dfn for index-handle</a><span>, in § 2.6.1</span> </ul> <li><a href="#dom-windoworworkerglobalscope-indexeddb">indexedDB</a><span>, in § 4.3</span> <li><a href="#index-handle">index handle</a><span>, in § 2.6.1</span> <li><a href="#dom-idbobjectstore-index">index(name)</a><span>, in § 4.5</span> <li><a href="#dom-idbobjectstore-indexnames">indexNames</a><span>, in § 4.5</span> <li><a href="#object-store-handle-index-set">index set</a><span>, in § 2.2.1</span> <li><a href="#inject-a-key-into-a-value-using-a-key-path">inject a key into a value using a key path</a><span>, in § 7.2</span> <li><a href="#object-store-in-line-keys">in-line keys</a><span>, in § 2.2</span> <li><a href="#iterate-a-cursor">iterate a cursor</a><span>, in § 6.7</span> <li> key <ul> <li><a href="#dom-idbcursor-key">attribute for IDBCursor</a><span>, in § 4.8</span> <li><a href="#key">definition of</a><span>, in § 2.4</span> <li><a href="#cursor-key">dfn for cursor</a><span>, in § 2.10</span> </ul> <li><a href="#key-generator">key generator</a><span>, in § 2.11</span> <li><a href="#cursor-key-only-flag">key only flag</a><span>, in § 2.10</span> <li> key path <ul> <li><a href="#key-path">definition of</a><span>, in § 2.5</span> <li><a href="#index-key-path">dfn for index</a><span>, in § 2.6</span> <li><a href="#object-store-key-path">dfn for object-store</a><span>, in § 2.2</span> </ul> <li> keyPath <ul> <li><a href="#dom-idbindex-keypath">attribute for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-keypath">attribute for IDBObjectStore</a><span>, in § 4.5</span> <li><a href="#dom-idbobjectstoreparameters-keypath">dict-member for IDBObjectStoreParameters</a><span>, in § 4.4</span> </ul> <li><a href="#key-range">key range</a><span>, in § 2.9</span> <li><a href="#index-keys">keys</a><span>, in § 2.6</span> <li><a href="#less-than">less than</a><span>, in § 2.4</span> <li><a href="#transaction-lifetime">lifetime</a><span>, in § 2.7.1</span> <li> list of records <ul> <li><a href="#index-list-of-records">dfn for index</a><span>, in § 2.6</span> <li><a href="#object-store-list-of-records">dfn for object-store</a><span>, in § 2.2</span> </ul> <li><a href="#transaction-live">live</a><span>, in § 2.7.1</span> <li><a href="#dom-idbkeyrange-lower">lower</a><span>, in § 4.7</span> <li><a href="#key-range-lower-bound">lower bound</a><span>, in § 2.9</span> <li><a href="#dom-idbkeyrange-lowerbound">lowerBound(lower)</a><span>, in § 4.7</span> <li><a href="#dom-idbkeyrange-lowerbound">lowerBound(lower, open)</a><span>, in § 4.7</span> <li><a href="#dom-idbkeyrange-loweropen">lowerOpen</a><span>, in § 4.7</span> <li><a href="#key-range-lower-open-flag">lower open flag</a><span>, in § 2.9</span> <li> mode <ul> <li><a href="#dom-idbtransaction-mode">attribute for IDBTransaction</a><span>, in § 4.9</span> <li><a href="#transaction-mode">dfn for transaction</a><span>, in § 2.7</span> </ul> <li> multiEntry <ul> <li><a href="#dom-idbindex-multientry">attribute for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbindexparameters-multientry">dict-member for IDBIndexParameters</a><span>, in § 4.5</span> </ul> <li><a href="#index-multientry-flag">multiEntry flag</a><span>, in § 2.6</span> <li> name <ul> <li><a href="#dom-idbdatabase-name">attribute for IDBDatabase</a><span>, in § 4.4</span> <li><a href="#dom-idbindex-name">attribute for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-name">attribute for IDBObjectStore</a><span>, in § 4.5</span> <li><a href="#name">definition of</a><span>, in § 2</span> <li><a href="#database-name">dfn for database</a><span>, in § 2.1</span> <li><a href="#index-name">dfn for index</a><span>, in § 2.6</span> <li><a href="#index-handle-name">dfn for index-handle</a><span>, in § 2.6.1</span> <li><a href="#object-store-name">dfn for object-store</a><span>, in § 2.2</span> <li><a href="#object-store-handle-name">dfn for object-store-handle</a><span>, in § 2.2.1</span> <li><a href="#dom-idbdatabaseinfo-name">dict-member for IDBDatabaseInfo</a><span>, in § 4.3</span> </ul> <li> newVersion <ul> <li><a href="#dom-idbversionchangeevent-newversion">attribute for IDBVersionChangeEvent</a><span>, in § 4.2</span> <li><a href="#dom-idbversionchangeeventinit-newversion">dict-member for IDBVersionChangeEventInit</a><span>, in § 4.2</span> </ul> <li><a href="#dom-idbcursordirection-next">"next"</a><span>, in § 4.8</span> <li><a href="#dom-idbcursordirection-nextunique">"nextunique"</a><span>, in § 4.8</span> <li> object store <ul> <li><a href="#object-store">definition of</a><span>, in § 2.2</span> <li><a href="#object-store-handle-object-store">dfn for object-store-handle</a><span>, in § 2.2.1</span> </ul> <li><a href="#dom-idbindex-objectstore">objectStore</a><span>, in § 4.6</span> <li> object store handle <ul> <li><a href="#object-store-handle">definition of</a><span>, in § 2.2.1</span> <li><a href="#index-handle-object-store-handle">dfn for index-handle</a><span>, in § 2.6.1</span> </ul> <li><a href="#dom-idbtransaction-objectstore">objectStore(name)</a><span>, in § 4.9</span> <li> objectStoreNames <ul> <li><a href="#dom-idbdatabase-objectstorenames">attribute for IDBDatabase</a><span>, in § 4.4</span> <li><a href="#dom-idbtransaction-objectstorenames">attribute for IDBTransaction</a><span>, in § 4.9</span> </ul> <li><a href="#cursor-object-store-position">object store position</a><span>, in § 2.10</span> <li><a href="#connection-object-store-set">object store set</a><span>, in § 2.1.1</span> <li> oldVersion <ul> <li><a href="#dom-idbversionchangeevent-oldversion">attribute for IDBVersionChangeEvent</a><span>, in § 4.2</span> <li><a href="#dom-idbversionchangeeventinit-oldversion">dict-member for IDBVersionChangeEventInit</a><span>, in § 4.2</span> </ul> <li> onabort <ul> <li><a href="#dom-idbdatabase-onabort">attribute for IDBDatabase</a><span>, in § 4.4</span> <li><a href="#dom-idbtransaction-onabort">attribute for IDBTransaction</a><span>, in § 4.9</span> </ul> <li><a href="#dom-idbopendbrequest-onblocked">onblocked</a><span>, in § 4.1</span> <li><a href="#dom-idbdatabase-onclose">onclose</a><span>, in § 4.4</span> <li><a href="#dom-idbtransaction-oncomplete">oncomplete</a><span>, in § 4.9</span> <li> onerror <ul> <li><a href="#dom-idbdatabase-onerror">attribute for IDBDatabase</a><span>, in § 4.4</span> <li><a href="#dom-idbrequest-onerror">attribute for IDBRequest</a><span>, in § 4.1</span> <li><a href="#dom-idbtransaction-onerror">attribute for IDBTransaction</a><span>, in § 4.9</span> </ul> <li><a href="#dom-idbkeyrange-only">only(value)</a><span>, in § 4.7</span> <li><a href="#dom-idbrequest-onsuccess">onsuccess</a><span>, in § 4.1</span> <li><a href="#dom-idbopendbrequest-onupgradeneeded">onupgradeneeded</a><span>, in § 4.1</span> <li><a href="#dom-idbdatabase-onversionchange">onversionchange</a><span>, in § 4.4</span> <li><a href="#open-a-database-connection">open a database connection</a><span>, in § 5.1</span> <li> openCursor() <ul> <li><a href="#dom-idbindex-opencursor">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-opencursor">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> openCursor(query) <ul> <li><a href="#dom-idbindex-opencursor">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-opencursor">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> openCursor(query, direction) <ul> <li><a href="#dom-idbindex-opencursor">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-opencursor">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> openKeyCursor() <ul> <li><a href="#dom-idbindex-openkeycursor">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-openkeycursor">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> openKeyCursor(query) <ul> <li><a href="#dom-idbindex-openkeycursor">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-openkeycursor">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li> openKeyCursor(query, direction) <ul> <li><a href="#dom-idbindex-openkeycursor">method for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbobjectstore-openkeycursor">method for IDBObjectStore</a><span>, in § 4.5</span> </ul> <li><a href="#dom-idbfactory-open">open(name)</a><span>, in § 4.3</span> <li><a href="#dom-idbfactory-open">open(name, version)</a><span>, in § 4.3</span> <li><a href="#request-open-request">open request</a><span>, in § 2.8.1</span> <li><a href="#object-store-out-of-line-keys">out-of-line keys</a><span>, in § 2.2</span> <li><a href="#transaction-overlap">overlap</a><span>, in § 2.7</span> <li><a href="#transaction-overlap">overlapping scope</a><span>, in § 2.7</span> <li><a href="#dom-idbrequestreadystate-pending">"pending"</a><span>, in § 4.1</span> <li><a href="#request-placed">placed</a><span>, in § 2.8</span> <li><a href="#cursor-position">position</a><span>, in § 2.10</span> <li><a href="#possibly-update-the-key-generator">possibly update the key generator</a><span>, in § 2.11</span> <li><a href="#dom-idbcursordirection-prev">"prev"</a><span>, in § 4.8</span> <li><a href="#dom-idbcursordirection-prevunique">"prevunique"</a><span>, in § 4.8</span> <li><a href="#dom-idbcursor-primarykey">primaryKey</a><span>, in § 4.8</span> <li><a href="#request-processed">processed</a><span>, in § 2.8</span> <li><a href="#request-processed-flag">processed flag</a><span>, in § 2.8</span> <li><a href="#dom-idbobjectstore-put">put(value)</a><span>, in § 4.5</span> <li><a href="#dom-idbobjectstore-put">put(value, key)</a><span>, in § 4.5</span> <li><a href="#cursor-range">range</a><span>, in § 2.10</span> <li><a href="#dom-idbtransactionmode-readonly">"readonly"</a><span>, in § 4.9</span> <li><a href="#transaction-read-only-transaction">read-only transaction</a><span>, in § 2.7</span> <li><a href="#dom-idbtransactionmode-readwrite">"readwrite"</a><span>, in § 4.9</span> <li><a href="#transaction-read-write-transaction">read/write transaction</a><span>, in § 2.7</span> <li><a href="#dom-idbrequest-readystate">readyState</a><span>, in § 4.1</span> <li><a href="#object-store-record">record</a><span>, in § 2.2</span> <li><a href="#index-records">records</a><span>, in § 2.6</span> <li><a href="#index-referenced">referenced</a><span>, in § 2.6</span> <li><a href="#index-referenced-value">referenced value</a><span>, in § 2.6</span> <li><a href="#index-referenced">references</a><span>, in § 2.6</span> <li><a href="#dom-idbtransactiondurability-relaxed">"relaxed"</a><span>, in § 4.4</span> <li> request <ul> <li><a href="#dom-idbcursor-request">attribute for IDBCursor</a><span>, in § 4.8</span> <li><a href="#request">definition of</a><span>, in § 2.8</span> <li><a href="#cursor-request">dfn for cursor</a><span>, in § 2.10</span> </ul> <li><a href="#transaction-request-list">request list</a><span>, in § 2.7</span> <li> result <ul> <li><a href="#dom-idbrequest-result">attribute for IDBRequest</a><span>, in § 4.1</span> <li><a href="#request-result">dfn for request</a><span>, in § 2.8</span> </ul> <li><a href="#retrieve-a-key-from-an-object-store">retrieve a key from an object store</a><span>, in § 6.2</span> <li><a href="#retrieve-a-referenced-value-from-an-index">retrieve a referenced value from an index</a><span>, in § 6.3</span> <li><a href="#retrieve-a-value-from-an-index">retrieve a value from an index</a><span>, in § 6.3</span> <li><a href="#retrieve-a-value-from-an-object-store">retrieve a value from an object store</a><span>, in § 6.2</span> <li><a href="#retrieve-multiple-keys-from-an-object-store">retrieve multiple keys from an object store</a><span>, in § 6.2</span> <li><a href="#retrieve-multiple-referenced-values-from-an-index">retrieve multiple referenced values from an index</a><span>, in § 6.3</span> <li><a href="#retrieve-multiple-values-from-an-index">retrieve multiple values from an index</a><span>, in § 6.3</span> <li><a href="#retrieve-multiple-values-from-an-object-store">retrieve multiple values from an object store</a><span>, in § 6.2</span> <li><a href="#transaction-scope">scope</a><span>, in § 2.7</span> <li> source <ul> <li><a href="#dom-idbcursor-source">attribute for IDBCursor</a><span>, in § 4.8</span> <li><a href="#dom-idbrequest-source">attribute for IDBRequest</a><span>, in § 4.1</span> <li><a href="#cursor-source">dfn for cursor</a><span>, in § 2.10</span> <li><a href="#request-source">dfn for request</a><span>, in § 2.8</span> </ul> <li><a href="#transaction-start">start</a><span>, in § 2.7.1</span> <li><a href="#transaction-start">started</a><span>, in § 2.7.1</span> <li><a href="#transaction-state">state</a><span>, in § 2.7.1</span> <li><a href="#store-a-record-into-an-object-store">store a record into an object store</a><span>, in § 6.1</span> <li><a href="#dom-idbtransactiondurability-strict">"strict"</a><span>, in § 4.4</span> <li><a href="#subkeys">subkeys</a><span>, in § 2.4</span> <li><a href="#eventdef-idbrequest-success">success</a><span>, in § 2.8</span> <li> transaction <ul> <li><a href="#dom-idbobjectstore-transaction">attribute for IDBObjectStore</a><span>, in § 4.5</span> <li><a href="#dom-idbrequest-transaction">attribute for IDBRequest</a><span>, in § 4.1</span> <li><a href="#transaction-concept">definition of</a><span>, in § 2.7</span> <li><a href="#cursor-transaction">dfn for cursor</a><span>, in § 2.10</span> <li><a href="#index-handle-transaction">dfn for index-handle</a><span>, in § 2.6.1</span> <li><a href="#object-store-handle-transaction">dfn for object-store-handle</a><span>, in § 2.2.1</span> <li><a href="#request-transaction">dfn for request</a><span>, in § 2.8</span> </ul> <li><a href="#dom-idbdatabase-transaction">transaction(storeNames)</a><span>, in § 4.4</span> <li><a href="#dom-idbdatabase-transaction">transaction(storeNames, mode)</a><span>, in § 4.4</span> <li><a href="#dom-idbdatabase-transaction">transaction(storeNames, mode, options)</a><span>, in § 4.4</span> <li><a href="#key-type">type</a><span>, in § 2.4</span> <li><a href="#unbounded-key-range">unbounded key range</a><span>, in § 2.9</span> <li> unique <ul> <li><a href="#dom-idbindex-unique">attribute for IDBIndex</a><span>, in § 4.6</span> <li><a href="#dom-idbindexparameters-unique">dict-member for IDBIndexParameters</a><span>, in § 4.5</span> </ul> <li><a href="#index-unique-flag">unique flag</a><span>, in § 2.6</span> <li><a href="#dom-idbcursor-update">update(value)</a><span>, in § 4.8</span> <li><a href="#upgrade-a-database">upgrade a database</a><span>, in § 5.7</span> <li><a href="#eventdef-idbopendbrequest-upgradeneeded">upgradeneeded</a><span>, in § 2.8.1</span> <li> upgrade transaction <ul> <li><a href="#upgrade-transaction">definition of</a><span>, in § 2.7.3</span> <li><a href="#database-upgrade-transaction">dfn for database</a><span>, in § 2.1</span> </ul> <li><a href="#dom-idbkeyrange-upper">upper</a><span>, in § 4.7</span> <li><a href="#key-range-upper-bound">upper bound</a><span>, in § 2.9</span> <li><a href="#dom-idbkeyrange-upperbound">upperBound(upper)</a><span>, in § 4.7</span> <li><a href="#dom-idbkeyrange-upperbound">upperBound(upper, open)</a><span>, in § 4.7</span> <li><a href="#dom-idbkeyrange-upperopen">upperOpen</a><span>, in § 4.7</span> <li><a href="#key-range-upper-open-flag">upper open flag</a><span>, in § 2.9</span> <li><a href="#valid-key-path">valid key path</a><span>, in § 2.5</span> <li> value <ul> <li><a href="#dom-idbcursorwithvalue-value">attribute for IDBCursorWithValue</a><span>, in § 4.8</span> <li><a href="#value">definition of</a><span>, in § 2.3</span> <li><a href="#cursor-value">dfn for cursor</a><span>, in § 2.10</span> <li><a href="#key-value">dfn for key</a><span>, in § 2.4</span> </ul> <li><a href="#index-values">values</a><span>, in § 2.6</span> <li> version <ul> <li><a href="#dom-idbdatabase-version">attribute for IDBDatabase</a><span>, in § 4.4</span> <li><a href="#connection-version">dfn for connection</a><span>, in § 2.1.1</span> <li><a href="#database-version">dfn for database</a><span>, in § 2.1</span> <li><a href="#dom-idbdatabaseinfo-version">dict-member for IDBDatabaseInfo</a><span>, in § 4.3</span> </ul> <li><a href="#dom-idbtransactionmode-versionchange">"versionchange"</a><span>, in § 4.9</span> <li><a href="#eventdef-idbdatabase-versionchange">versionchange</a><span>, in § 2.1.1</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="0c0ceb78">bubbles</span> <li><span class="dfn-paneled" id="8c407366">cancelable</span> <li><span class="dfn-paneled" id="2e9f6464">canceled flag</span> <li><span class="dfn-paneled" id="8abfc3b6">creating an event</span> <li><span class="dfn-paneled" id="1372f92a">dispatch</span> <li><span class="dfn-paneled" id="26b82890">event</span> <li><span class="dfn-paneled" id="5fd23811">fire an event</span> <li><span class="dfn-paneled" id="a7257e38">get the parent</span> <li><span class="dfn-paneled" id="fefe0433">preventDefault()</span> <li><span class="dfn-paneled" id="9d09d04c">type</span> </ul> <li> <a data-link-type="biblio">[ECMA-262]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="b5eaabb9">!</span> <li><span class="dfn-paneled" id="5456c8a8">?</span> <li><span class="dfn-paneled" id="f426b2a9">Array</span> <li><span class="dfn-paneled" id="d2c61922">CreateDataProperty</span> <li><span class="dfn-paneled" id="8c8cc336">Date</span> <li><span class="dfn-paneled" id="abf85593">Get</span> <li><span class="dfn-paneled" id="020eb03c">HasOwnProperty</span> <li><span class="dfn-paneled" id="5f9c7266">Number</span> <li><span class="dfn-paneled" id="a6e67972">Object</span> <li><span class="dfn-paneled" id="7716447b">RegExp</span> <li><span class="dfn-paneled" id="9032aa9e">String</span> <li><span class="dfn-paneled" id="17acf60b">ToLength</span> <li><span class="dfn-paneled" id="4a854a91">ToString</span> <li><span class="dfn-paneled" id="c6bfef29">abrupt completion</span> <li><span class="dfn-paneled" id="8c491ba9">array exotic object</span> <li><span class="dfn-paneled" id="614f2b27">array exotic objects</span> <li><span class="dfn-paneled" id="8f7667e0">IdentifierName</span> <li><span class="dfn-paneled" id="a5f015e3">realm</span> <li><span class="dfn-paneled" id="d609dea6">ReturnIfAbrupt</span> <li><span class="dfn-paneled" id="62d5a433">sort(comparator)</span> <li><span class="dfn-paneled" id="06137087">the current Realm Record</span> <li><span class="dfn-paneled" id="c4df1374">Type</span> </ul> <li> <a data-link-type="biblio">[FileAPI]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="119fb4df">Blob</span> <li><span class="dfn-paneled" id="7e1d7596">File</span> <li><span class="dfn-paneled" id="c5019b63">lastModified</span> <li><span class="dfn-paneled" id="9784d14c">name</span> <li><span class="dfn-paneled" id="3935e4b5">size</span> <li><span class="dfn-paneled" id="49d6d0a2">type</span> </ul> <li> <a data-link-type="biblio">[HTML]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="18fe3a3b">DOMStringList</span> <li><span class="dfn-paneled" id="f0951476">EventHandler</span> <li><span class="dfn-paneled" id="56d576c8">ImageData</span> <li><span class="dfn-paneled" id="0800bdf4">StructuredDeserialize</span> <li><span class="dfn-paneled" id="f534ab0c">StructuredSerializeForStorage</span> <li><span class="dfn-paneled" id="5f6d392d">WindowOrWorkerGlobalScope</span> <li><span class="dfn-paneled" id="0d0390b4">browsing context</span> <li><span class="dfn-paneled" id="cc2ecc32">domain</span> <li><span class="dfn-paneled" id="9d386f55">event handler event type</span> <li><span class="dfn-paneled" id="03675365">event handler IDL attribute</span> <li><span class="dfn-paneled" id="c6d19e56">event loop</span> <li><span class="dfn-paneled" id="a72449dd">in parallel</span> <li><span class="dfn-paneled" id="086e3aff">origin</span> <li><span class="dfn-paneled" id="9a517a7d">queue a task</span> <li><span class="dfn-paneled" id="9c4c1e66">relevant settings object</span> <li><span class="dfn-paneled" id="0a422d04">serializable object</span> <li><span class="dfn-paneled" id="80726755">task queues</span> </ul> <li> <a data-link-type="biblio">[INFRA]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="53275e46">append <small>(for list)</small></span> <li><span class="dfn-paneled" id="a3b18719">append <small>(for set)</small></span> <li><span class="dfn-paneled" id="77b4c09a">assert</span> <li><span class="dfn-paneled" id="f5354b9d">byte</span> <li><span class="dfn-paneled" id="6e4c081e">byte less than</span> <li><span class="dfn-paneled" id="3de9e659">byte sequence</span> <li><span class="dfn-paneled" id="4135591f">code unit less than</span> <li><span class="dfn-paneled" id="ae8def21">contain</span> <li><span class="dfn-paneled" id="16d07e10">for each</span> <li><span class="dfn-paneled" id="5afbefcd">item</span> <li><span class="dfn-paneled" id="36333997">length</span> <li><span class="dfn-paneled" id="649608b9">list</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="5ecc2082">sort in ascending order</span> <li><span class="dfn-paneled" id="7a3dbdb1">strictly split a string</span> <li><span class="dfn-paneled" id="0698d556">string</span> </ul> <li> <a data-link-type="biblio">[STORAGE]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="c9858f6e">obtain a storage key</span> <li><span class="dfn-paneled" id="6148dd37">storage bucket</span> <li><span class="dfn-paneled" id="7f6a70d1">storage key</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="2f8afbfe">ArrayBuffer</span> <li><span class="dfn-paneled" id="48c6127a">ConstraintError</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="d54f5897">DataCloneError</span> <li><span class="dfn-paneled" id="24fec0b4">DataError</span> <li><span class="dfn-paneled" id="c01cbda0">EnforceRange</span> <li><span class="dfn-paneled" id="889e932f">Exposed</span> <li><span class="dfn-paneled" id="37afd48d">InvalidAccessError</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="9eda9b58">NotFoundError</span> <li><span class="dfn-paneled" id="0be3911e">NotReadableError</span> <li><span class="dfn-paneled" id="bdbd19d1">Promise</span> <li><span class="dfn-paneled" id="5e129c74">QuotaExceededError</span> <li><span class="dfn-paneled" id="93d2e29e">ReadOnlyError</span> <li><span class="dfn-paneled" id="a5c91173">SameObject</span> <li><span class="dfn-paneled" id="c3e881ef">SecurityError</span> <li><span class="dfn-paneled" id="be2d2b4c">SyntaxError</span> <li><span class="dfn-paneled" id="d6b0abab">TransactionInactiveError</span> <li><span class="dfn-paneled" id="82ca3efc">TypeError</span> <li><span class="dfn-paneled" id="95d7775a">Uint8Array</span> <li><span class="dfn-paneled" id="81dd847b">UnknownError</span> <li><span class="dfn-paneled" id="ea70ff86">VersionError</span> <li><span class="dfn-paneled" id="dacde8b5">a new promise</span> <li><span class="dfn-paneled" id="d0b4a948">a promise rejected with</span> <li><span class="dfn-paneled" id="6c6b1005">any</span> <li><span class="dfn-paneled" id="5372cca8">boolean</span> <li><span class="dfn-paneled" id="b05bf85d">buffer source types</span> <li><span class="dfn-paneled" id="f4813f78">byte</span> <li><span class="dfn-paneled" id="6a73c310">create</span> <li><span class="dfn-paneled" id="92d13070">get a copy of the buffer source</span> <li><span class="dfn-paneled" id="7787d359">record</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="47574099">short</span> <li><span class="dfn-paneled" id="3b5f2424">the given value</span> <li><span class="dfn-paneled" id="4013a022">this</span> <li><span class="dfn-paneled" id="b4cfa5ce">throw</span> <li><span class="dfn-paneled" id="5f90bbfb">undefined</span> <li><span class="dfn-paneled" id="11e0b87f">unrestricted double</span> <li><span class="dfn-paneled" id="e97a9688">unsigned long</span> <li><span class="dfn-paneled" id="f14b47b8">unsigned long long</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-ecma-262">[ECMA-262] <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-fileapi">[FileAPI] <dd>Marijn Kruisselbrink. <a href="https://www.w3.org/TR/FileAPI/"><cite>File API</cite></a>. 24 October 2024. WD. URL: <a href="https://www.w3.org/TR/FileAPI/">https://www.w3.org/TR/FileAPI/</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-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-storage">[STORAGE] <dd>Anne van Kesteren. <a href="https://storage.spec.whatwg.org/"><cite>Storage Standard</cite></a>. Living Standard. URL: <a href="https://storage.spec.whatwg.org/">https://storage.spec.whatwg.org/</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> </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-charmod-norm">[Charmod-Norm] <dd>Addison Phillips; et al. <a href="https://www.w3.org/TR/charmod-norm/"><cite>Character Model for the World Wide Web: String Matching</cite></a>. 11 August 2021. NOTE. URL: <a href="https://www.w3.org/TR/charmod-norm/">https://www.w3.org/TR/charmod-norm/</a> <dt id="biblio-cookies">[COOKIES] <dd>A. Barth. <a href="https://httpwg.org/specs/rfc6265.html"><cite>HTTP State Management Mechanism</cite></a>. April 2011. Proposed Standard. URL: <a href="https://httpwg.org/specs/rfc6265.html">https://httpwg.org/specs/rfc6265.html</a> <dt id="biblio-webstorage">[WEBSTORAGE] <dd>Ian Hickson. <a href="https://www.w3.org/TR/webstorage/"><cite>Web Storage (Second Edition)</cite></a>. 28 January 2021. REC. URL: <a href="https://www.w3.org/TR/webstorage/">https://www.w3.org/TR/webstorage/</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">[<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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbrequest"><code><c- g>IDBRequest</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget"><c- n>EventTarget</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-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbrequest-result"><c- g>result</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#idl-DOMException"><c- n>DOMException</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMException?" href="#dom-idbrequest-error"><c- g>error</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> (<a data-link-type="idl-name" href="#idbobjectstore"><c- n>IDBObjectStore</c-></a> <c- b>or</c-> <a data-link-type="idl-name" href="#idbindex"><c- n>IDBIndex</c-></a> <c- b>or</c-> <a data-link-type="idl-name" href="#idbcursor"><c- n>IDBCursor</c-></a>)? <a class="idl-code" data-link-type="attribute" data-readonly data-type="(IDBObjectStore or IDBIndex or IDBCursor)?" href="#dom-idbrequest-source"><c- g>source</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#idbtransaction"><c- n>IDBTransaction</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBTransaction?" href="#dom-idbrequest-transaction"><c- g>transaction</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-idbrequestreadystate"><c- n>IDBRequestReadyState</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBRequestReadyState" href="#dom-idbrequest-readystate"><c- g>readyState</c-></a>; // Event handlers: <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-idbrequest-onsuccess"><c- g>onsuccess</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-idbrequest-onerror"><c- g>onerror</c-></a>; }; <c- b>enum</c-> <a href="#enumdef-idbrequestreadystate"><code><c- g>IDBRequestReadyState</c-></code></a> { <a href="#dom-idbrequestreadystate-pending"><code><c- s>"pending"</c-></code></a>, <a href="#dom-idbrequestreadystate-done"><code><c- s>"done"</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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbopendbrequest"><code><c- g>IDBOpenDBRequest</c-></code></a> : <a data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> { // Event handlers: <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-idbopendbrequest-onblocked"><c- g>onblocked</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-idbopendbrequest-onupgradeneeded"><c- g>onupgradeneeded</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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbversionchangeevent"><code><c- g>IDBVersionChangeEvent</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event"><c- n>Event</c-></a> { <a href="#dom-idbversionchangeevent-idbversionchangeevent"><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-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-idbversionchangeeventinit"><c- n>IDBVersionChangeEventInit</c-></a> <a href="#dom-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</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-unsigned-long-long"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long long" href="#dom-idbversionchangeevent-oldversion"><c- g>oldVersion</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-long"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long long?" href="#dom-idbversionchangeevent-newversion"><c- g>newVersion</c-></a>; }; <c- b>dictionary</c-> <a href="#dictdef-idbversionchangeeventinit"><code><c- g>IDBVersionChangeEventInit</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit"><c- n>EventInit</c-></a> { <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long-long"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <a data-default="0" data-type="unsigned long long" href="#dom-idbversionchangeeventinit-oldversion"><code><c- g>oldVersion</c-></code></a> = 0; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long-long"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a>? <a data-default="null" data-type="unsigned long long?" href="#dom-idbversionchangeeventinit-newversion"><code><c- g>newVersion</c-></code></a> = <c- b>null</c->; }; <c- b>partial</c-> <c- b>interface</c-> <c- b>mixin</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope"><c- g>WindowOrWorkerGlobalScope</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="#idbfactory"><c- n>IDBFactory</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBFactory" href="#dom-windoworworkerglobalscope-indexeddb"><c- g>indexedDB</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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbfactory"><code><c- g>IDBFactory</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 data-link-type="idl-name" href="#idbopendbrequest"><c- n>IDBOpenDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbfactory-open"><c- g>open</c-></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-idbfactory-open-name-version-name"><code><c- g>name</c-></code></a>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</c-></a>] <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long-long"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <a href="#dom-idbfactory-open-name-version-version"><code><c- g>version</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 data-link-type="idl-name" href="#idbopendbrequest"><c- n>IDBOpenDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbfactory-deletedatabase"><c- g>deleteDatabase</c-></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-idbfactory-deletedatabase-name-name"><code><c- g>name</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 data-link-type="dfn" href="https://webidl.spec.whatwg.org/#idl-sequence"><c- b>sequence</c-></a><<a data-link-type="idl-name" href="#dictdef-idbdatabaseinfo"><c- n>IDBDatabaseInfo</c-></a>>> <a class="idl-code" data-link-type="method" href="#dom-idbfactory-databases"><c- g>databases</c-></a>(); <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-short"><c- b>short</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbfactory-cmp"><c- g>cmp</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbfactory-cmp-first-second-first"><code><c- g>first</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbfactory-cmp-first-second-second"><code><c- g>second</c-></code></a>); }; <c- b>dictionary</c-> <a href="#dictdef-idbdatabaseinfo"><code><c- g>IDBDatabaseInfo</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 data-type="DOMString" href="#dom-idbdatabaseinfo-name"><code><c- g>name</c-></code></a>; <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unsigned-long-long"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <a data-type="unsigned long long" href="#dom-idbdatabaseinfo-version"><code><c- g>version</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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbdatabase"><code><c- g>IDBDatabase</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget"><c- n>EventTarget</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-DOMString"><c- b>DOMString</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMString" href="#dom-idbdatabase-name"><c- g>name</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-long"><c- b>unsigned</c-> <c- b>long</c-> <c- b>long</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="unsigned long long" href="#dom-idbdatabase-version"><c- g>version</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist"><c- n>DOMStringList</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMStringList" href="#dom-idbdatabase-objectstorenames"><c- g>objectStoreNames</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="#idbtransaction"><c- n>IDBTransaction</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbdatabase-transaction"><c- g>transaction</c-></a>((<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a> <c- b>or</c-> <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 href="#dom-idbdatabase-transaction-storenames-mode-options-storenames"><code><c- g>storeNames</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbtransactionmode"><c- n>IDBTransactionMode</c-></a> <a href="#dom-idbdatabase-transaction-storenames-mode-options-mode"><code><c- g>mode</c-></code></a> = "readonly", <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-idbtransactionoptions"><c- n>IDBTransactionOptions</c-></a> <a href="#dom-idbdatabase-transaction-storenames-mode-options-options"><code><c- g>options</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-idbdatabase-close"><c- g>close</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="#idbobjectstore"><c- n>IDBObjectStore</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbdatabase-createobjectstore"><c- g>createObjectStore</c-></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-idbdatabase-createobjectstore-name-options-name"><code><c- g>name</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-idbobjectstoreparameters"><c- n>IDBObjectStoreParameters</c-></a> <a href="#dom-idbdatabase-createobjectstore-name-options-options"><code><c- g>options</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-idbdatabase-deleteobjectstore"><c- g>deleteObjectStore</c-></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-idbdatabase-deleteobjectstore-name-name"><code><c- g>name</c-></code></a>); // Event handlers: <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-idbdatabase-onabort"><c- g>onabort</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-idbdatabase-onclose"><c- g>onclose</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-idbdatabase-onerror"><c- g>onerror</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-idbdatabase-onversionchange"><c- g>onversionchange</c-></a>; }; <c- b>enum</c-> <a href="#enumdef-idbtransactiondurability"><code><c- g>IDBTransactionDurability</c-></code></a> { <a href="#dom-idbtransactiondurability-default"><code><c- s>"default"</c-></code></a>, <a href="#dom-idbtransactiondurability-strict"><code><c- s>"strict"</c-></code></a>, <a href="#dom-idbtransactiondurability-relaxed"><code><c- s>"relaxed"</c-></code></a> }; <c- b>dictionary</c-> <a href="#dictdef-idbtransactionoptions"><code><c- g>IDBTransactionOptions</c-></code></a> { <a data-link-type="idl-name" href="#enumdef-idbtransactiondurability"><c- n>IDBTransactionDurability</c-></a> <a data-default=""default"" data-type="IDBTransactionDurability" href="#dom-idbtransactionoptions-durability"><code><c- g>durability</c-></code></a> = "default"; }; <c- b>dictionary</c-> <a href="#dictdef-idbobjectstoreparameters"><code><c- g>IDBObjectStoreParameters</c-></code></a> { (<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a> <c- b>or</c-> <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-default="null" data-type="(DOMString or sequence<DOMString>)?" href="#dom-idbobjectstoreparameters-keypath"><code><c- g>keyPath</c-></code></a> = <c- b>null</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-idbobjectstoreparameters-autoincrement"><code><c- g>autoIncrement</c-></code></a> = <c- b>false</c->; }; [<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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbobjectstore"><code><c- g>IDBObjectStore</c-></code></a> { <c- b>attribute</c-> <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-type="DOMString" href="#dom-idbobjectstore-name"><c- g>name</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-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbobjectstore-keypath"><c- g>keyPath</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist"><c- n>DOMStringList</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMStringList" href="#dom-idbobjectstore-indexnames"><c- g>indexNames</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="#idbtransaction"><c- n>IDBTransaction</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBTransaction" href="#dom-idbobjectstore-transaction"><c- g>transaction</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-idbobjectstore-autoincrement"><c- g>autoIncrement</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="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-put"><c- g>put</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-put-value-key-value"><code><c- g>value</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-put-value-key-key"><code><c- g>key</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-add"><c- g>add</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-add-value-key-value"><code><c- g>value</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-add-value-key-key"><code><c- g>key</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-delete"><c- g>delete</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-delete-query-query"><code><c- g>query</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-clear"><c- g>clear</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="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-get"><c- g>get</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-get-query-query"><code><c- g>query</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-getkey"><c- g>getKey</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-getkey-query-query"><code><c- g>query</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-getall"><c- g>getAll</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-getall-query-count-query"><code><c- g>query</c-></code></a>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</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-idbobjectstore-getall-query-count-count"><code><c- g>count</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-getallkeys"><c- g>getAllKeys</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-getallkeys-query-count-query"><code><c- g>query</c-></code></a>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</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-idbobjectstore-getallkeys-query-count-count"><code><c- g>count</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-count"><c- g>count</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-count-query-query"><code><c- g>query</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-opencursor"><c- g>openCursor</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-opencursor-query-direction-query"><code><c- g>query</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection"><c- n>IDBCursorDirection</c-></a> <a href="#dom-idbobjectstore-opencursor-query-direction-direction"><code><c- g>direction</c-></code></a> = "next"); [<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="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-openkeycursor"><c- g>openKeyCursor</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbobjectstore-openkeycursor-query-direction-query"><code><c- g>query</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection"><c- n>IDBCursorDirection</c-></a> <a href="#dom-idbobjectstore-openkeycursor-query-direction-direction"><code><c- g>direction</c-></code></a> = "next"); <a data-link-type="idl-name" href="#idbindex"><c- n>IDBIndex</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-index"><c- g>index</c-></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-idbobjectstore-index-name-name"><code><c- g>name</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 data-link-type="idl-name" href="#idbindex"><c- n>IDBIndex</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbobjectstore-createindex"><c- g>createIndex</c-></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-idbobjectstore-createindex-name-keypath-options-name"><code><c- g>name</c-></code></a>, (<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString"><c- b>DOMString</c-></a> <c- b>or</c-> <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 href="#dom-idbobjectstore-createindex-name-keypath-options-keypath"><code><c- g>keyPath</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#dictdef-idbindexparameters"><c- n>IDBIndexParameters</c-></a> <a href="#dom-idbobjectstore-createindex-name-keypath-options-options"><code><c- g>options</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-idbobjectstore-deleteindex"><c- g>deleteIndex</c-></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-idbobjectstore-deleteindex-name-name"><code><c- g>name</c-></code></a>); }; <c- b>dictionary</c-> <a href="#dictdef-idbindexparameters"><code><c- g>IDBIndexParameters</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="false" data-type="boolean" href="#dom-idbindexparameters-unique"><code><c- g>unique</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="false" data-type="boolean" href="#dom-idbindexparameters-multientry"><code><c- g>multiEntry</c-></code></a> = <c- b>false</c->; }; [<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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbindex"><code><c- g>IDBIndex</c-></code></a> { <c- b>attribute</c-> <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-type="DOMString" href="#dom-idbindex-name"><c- g>name</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="#idbobjectstore"><c- n>IDBObjectStore</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBObjectStore" href="#dom-idbindex-objectstore"><c- g>objectStore</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-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbindex-keypath"><c- g>keyPath</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-idbindex-multientry"><c- g>multiEntry</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-idbindex-unique"><c- g>unique</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="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-get"><c- g>get</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbindex-get-query-query"><code><c- g>query</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-getkey"><c- g>getKey</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbindex-getkey-query-query"><code><c- g>query</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-getall"><c- g>getAll</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbindex-getall-query-count-query"><code><c- g>query</c-></code></a>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</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-idbindex-getall-query-count-count"><code><c- g>count</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-getallkeys"><c- g>getAllKeys</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbindex-getallkeys-query-count-query"><code><c- g>query</c-></code></a>, <c- b>optional</c-> [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</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-idbindex-getallkeys-query-count-count"><code><c- g>count</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-count"><c- g>count</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbindex-count-query-query"><code><c- g>query</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-opencursor"><c- g>openCursor</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbindex-opencursor-query-direction-query"><code><c- g>query</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection"><c- n>IDBCursorDirection</c-></a> <a href="#dom-idbindex-opencursor-query-direction-direction"><code><c- g>direction</c-></code></a> = "next"); [<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="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbindex-openkeycursor"><c- g>openKeyCursor</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbindex-openkeycursor-query-direction-query"><code><c- g>query</c-></code></a>, <c- b>optional</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection"><c- n>IDBCursorDirection</c-></a> <a href="#dom-idbindex-openkeycursor-query-direction-direction"><code><c- g>direction</c-></code></a> = "next"); }; [<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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbkeyrange"><code><c- g>IDBKeyRange</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-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbkeyrange-lower"><c- g>lower</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-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbkeyrange-upper"><c- g>upper</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-idbkeyrange-loweropen"><c- g>lowerOpen</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-idbkeyrange-upperopen"><c- g>upperOpen</c-></a>; // Static construction methods: [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject"><c- g>NewObject</c-></a>] <c- b>static</c-> <a data-link-type="idl-name" href="#idbkeyrange"><c- n>IDBKeyRange</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbkeyrange-only"><c- g>only</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbkeyrange-only-value-value"><code><c- g>value</c-></code></a>); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject"><c- g>NewObject</c-></a>] <c- b>static</c-> <a data-link-type="idl-name" href="#idbkeyrange"><c- n>IDBKeyRange</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbkeyrange-lowerbound"><c- g>lowerBound</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbkeyrange-lowerbound-lower-open-lower"><code><c- g>lower</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a href="#dom-idbkeyrange-lowerbound-lower-open-open"><code><c- g>open</c-></code></a> = <c- b>false</c->); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject"><c- g>NewObject</c-></a>] <c- b>static</c-> <a data-link-type="idl-name" href="#idbkeyrange"><c- n>IDBKeyRange</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbkeyrange-upperbound"><c- g>upperBound</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbkeyrange-upperbound-upper-open-upper"><code><c- g>upper</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a href="#dom-idbkeyrange-upperbound-upper-open-open"><code><c- g>open</c-></code></a> = <c- b>false</c->); [<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#NewObject"><c- g>NewObject</c-></a>] <c- b>static</c-> <a data-link-type="idl-name" href="#idbkeyrange"><c- n>IDBKeyRange</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbkeyrange-bound"><c- g>bound</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-lower"><code><c- g>lower</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upper"><code><c- g>upper</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a href="#dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-loweropen"><code><c- g>lowerOpen</c-></code></a> = <c- b>false</c->, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean"><c- b>boolean</c-></a> <a href="#dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upperopen"><code><c- g>upperOpen</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 class="idl-code" data-link-type="method" href="#dom-idbkeyrange-includes"><c- g>includes</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbkeyrange-includes-key-key"><code><c- g>key</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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbcursor"><code><c- g>IDBCursor</c-></code></a> { <c- b>readonly</c-> <c- b>attribute</c-> (<a data-link-type="idl-name" href="#idbobjectstore"><c- n>IDBObjectStore</c-></a> <c- b>or</c-> <a data-link-type="idl-name" href="#idbindex"><c- n>IDBIndex</c-></a>) <a class="idl-code" data-link-type="attribute" data-readonly data-type="(IDBObjectStore or IDBIndex)" href="#dom-idbcursor-source"><c- g>source</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-idbcursordirection"><c- n>IDBCursorDirection</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBCursorDirection" href="#dom-idbcursor-direction"><c- g>direction</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-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbcursor-key"><c- g>key</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-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbcursor-primarykey"><c- g>primaryKey</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="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBRequest" href="#dom-idbcursor-request"><c- g>request</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-idbcursor-advance"><c- g>advance</c-></a>([<a class="idl-code" data-link-type="extended-attribute" href="https://webidl.spec.whatwg.org/#EnforceRange"><c- g>EnforceRange</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-idbcursor-advance-count-count"><code><c- g>count</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-idbcursor-continue"><c- g>continue</c-></a>(<c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbcursor-continue-key-key"><code><c- g>key</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-idbcursor-continueprimarykey"><c- g>continuePrimaryKey</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbcursor-continueprimarykey-key-primarykey-key"><code><c- g>key</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbcursor-continueprimarykey-key-primarykey-primarykey"><code><c- g>primaryKey</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbcursor-update"><c- g>update</c-></a>(<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-any"><c- b>any</c-></a> <a href="#dom-idbcursor-update-value-value"><code><c- g>value</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 data-link-type="idl-name" href="#idbrequest"><c- n>IDBRequest</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbcursor-delete"><c- g>delete</c-></a>(); }; <c- b>enum</c-> <a href="#enumdef-idbcursordirection"><code><c- g>IDBCursorDirection</c-></code></a> { <a href="#dom-idbcursordirection-next"><code><c- s>"next"</c-></code></a>, <a href="#dom-idbcursordirection-nextunique"><code><c- s>"nextunique"</c-></code></a>, <a href="#dom-idbcursordirection-prev"><code><c- s>"prev"</c-></code></a>, <a href="#dom-idbcursordirection-prevunique"><code><c- s>"prevunique"</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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbcursorwithvalue"><code><c- g>IDBCursorWithValue</c-></code></a> : <a data-link-type="idl-name" href="#idbcursor"><c- n>IDBCursor</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-any"><c- b>any</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="any" href="#dom-idbcursorwithvalue-value"><c- g>value</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- n>Worker</c->)] <c- b>interface</c-> <a href="#idbtransaction"><code><c- g>IDBTransaction</c-></code></a> : <a data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget"><c- n>EventTarget</c-></a> { <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist"><c- n>DOMStringList</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMStringList" href="#dom-idbtransaction-objectstorenames"><c- g>objectStoreNames</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-idbtransactionmode"><c- n>IDBTransactionMode</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBTransactionMode" href="#dom-idbtransaction-mode"><c- g>mode</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="#enumdef-idbtransactiondurability"><c- n>IDBTransactionDurability</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBTransactionDurability" href="#dom-idbtransaction-durability"><c- g>durability</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="#idbdatabase"><c- n>IDBDatabase</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="IDBDatabase" href="#dom-idbtransaction-db"><c- g>db</c-></a>; <c- b>readonly</c-> <c- b>attribute</c-> <a data-link-type="idl-name" href="https://webidl.spec.whatwg.org/#idl-DOMException"><c- n>DOMException</c-></a>? <a class="idl-code" data-link-type="attribute" data-readonly data-type="DOMException?" href="#dom-idbtransaction-error"><c- g>error</c-></a>; <a data-link-type="idl-name" href="#idbobjectstore"><c- n>IDBObjectStore</c-></a> <a class="idl-code" data-link-type="method" href="#dom-idbtransaction-objectstore"><c- g>objectStore</c-></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-idbtransaction-objectstore-name-name"><code><c- g>name</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-idbtransaction-commit"><c- g>commit</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-idbtransaction-abort"><c- g>abort</c-></a>(); // Event handlers: <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-idbtransaction-onabort"><c- g>onabort</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-idbtransaction-oncomplete"><c- g>oncomplete</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-idbtransaction-onerror"><c- g>onerror</c-></a>; }; <c- b>enum</c-> <a href="#enumdef-idbtransactionmode"><code><c- g>IDBTransactionMode</c-></code></a> { <a href="#dom-idbtransactionmode-readonly"><code><c- s>"readonly"</c-></code></a>, <a href="#dom-idbtransactionmode-readwrite"><code><c- s>"readwrite"</c-></code></a>, <a href="#dom-idbtransactionmode-versionchange"><code><c- s>"versionchange"</c-></code></a> }; </pre> <details class="mdn-anno unpositioned" data-anno-for="ref-for-dom-idbcursor-advance①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/advance" title="The advance() method of the IDBCursor interface sets the number of times a cursor should move its position forward.">IDBCursor/advance</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbcursor-continue①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/continue" title="The continue() method of the IDBCursor interface advances the cursor to the next position along its direction, to the item whose key matches the optional key parameter. If no key is specified, the cursor advances to the immediate next position, based on its direction.">IDBCursor/continue</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbcursor-continueprimarykey①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/continuePrimaryKey" title="The continuePrimaryKey() method of the IDBCursor interface advances the cursor to the item whose key matches the key parameter as well as whose primary key matches the primary key parameter.">IDBCursor/continuePrimaryKey</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>58+</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 yes"><span>Firefox for Android</span><span>51+</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="ref-for-dom-idbcursor-delete①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/delete" title="The delete() method of the IDBCursor interface returns an IDBRequest object, and, in a separate thread, deletes the record at the cursor's position, without changing the cursor's position. Once the record is deleted, the cursor's value is set to null.">IDBCursor/delete</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbcursor-direction①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/direction" title="The direction read-only property of the IDBCursor interface is a string that returns the direction of traversal of the cursor (set using IDBObjectStore.openCursor for example). See the Values section below for possible values.">IDBCursor/direction</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbcursor-key①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/key" title="The key read-only property of the IDBCursor interface returns the key for the record at the cursor's position. If the cursor is outside its range, this is set to undefined. The cursor's key can be any data type.">IDBCursor/key</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbcursor-primarykey①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/primaryKey" title="The primaryKey read-only property of the IDBCursor interface returns the cursor's current effective key. If the cursor is currently being iterated or has iterated outside its range, this is set to undefined. The cursor's primary key can be any data type.">IDBCursor/primaryKey</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbcursor-request①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/request" title="The request read-only property of the IDBCursor interface returns the IDBRequest used to obtain the cursor.">IDBCursor/request</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>77+</span></span><span class="safari yes"><span>Safari</span><span>15+</span></span><span class="chrome yes"><span>Chrome</span><span>76+</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>?</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="ref-for-dom-idbcursor-source①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/source" title="The source read-only property of the IDBCursor interface returns the IDBObjectStore or IDBIndex that the cursor is iterating over. This function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.">IDBCursor/source</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbcursor-update①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/update" title="The update() method of the IDBCursor interface returns an IDBRequest object, and, in a separate thread, updates the value at the current position of the cursor in the object store. If the cursor points to a record that has just been deleted, a new record is created.">IDBCursor/update</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="cursor-interface"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor" title="The IDBCursor interface of the IndexedDB API represents a cursor for traversing or iterating over multiple records in a database.">IDBCursor</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>44+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>43+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="ref-for-dom-idbcursorwithvalue-value①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursorWithValue/value" title="The value read-only property of the IDBCursorWithValue interface returns the value of the current cursor, whatever that is.">IDBCursorWithValue/value</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-idbcursorwithvalue②"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBCursorWithValue" title="The IDBCursorWithValue interface of the IndexedDB API represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property.">IDBCursorWithValue</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>15+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>14+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="ref-for-dom-idbdatabase-close②"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/close" title="The close() method of the IDBDatabase interface returns immediately and closes the connection in a separate thread.">IDBDatabase/close</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="closing-connection"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/close_event" title="The close event is fired on IDBDatabase when the database connection is unexpectedly closed. This could happen, for example, if the underlying storage is removed or if the user clears the database in the browser's history preferences.">IDBDatabase/close_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>50+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>30+</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 yes"><span>Android WebView</span><span>37+</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-idbdatabase-onclose"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/close_event" title="The close event is fired on IDBDatabase when the database connection is unexpectedly closed. This could happen, for example, if the underlying storage is removed or if the user clears the database in the browser's history preferences.">IDBDatabase/close_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>50+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>30+</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 yes"><span>Android WebView</span><span>37+</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="ref-for-dom-idbdatabase-createobjectstore①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createObjectStore" title="The createObjectStore() method of the IDBDatabase interface creates and returns a new IDBObjectStore.">IDBDatabase/createObjectStore</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbdatabase-deleteobjectstore①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/deleteObjectStore" title="The deleteObjectStore() method of the IDBDatabase interface destroys the object store with the given name in the connected database, along with any indexes that reference it.">IDBDatabase/deleteObjectStore</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbdatabase-name①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/name" title="The name read-only property of the IDBDatabase interface is a string that contains the name of the connected database.">IDBDatabase/name</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbdatabase-objectstorenames①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/objectStoreNames" title="The objectStoreNames read-only property of the IDBDatabase interface is a DOMStringList containing a list of the names of the object stores currently in the connected database.">IDBDatabase/objectStoreNames</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbdatabase-transaction③"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/transaction" title="The transaction method of the IDBDatabase interface immediately returns a transaction object (IDBTransaction) containing the IDBTransaction.objectStore method, which you can use to access your object store.">IDBDatabase/transaction</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbdatabase-version①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/version" title="The version property of the IDBDatabase interface is a 64-bit integer that contains the version of the connected database. When a database is first created, this attribute is an empty string.">IDBDatabase/version</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="eventdef-idbdatabase-versionchange"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/versionchange_event" title="The versionchange event is fired when a database structure change (upgradeneeded event send on an IDBOpenDBRequest or IDBFactory.deleteDatabase) was requested elsewhere (most probably in another window/tab on the same computer).">IDBDatabase/versionchange_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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-idbdatabase-onversionchange"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/versionchange_event" title="The versionchange event is fired when a database structure change (upgradeneeded event send on an IDBOpenDBRequest or IDBFactory.deleteDatabase) was requested elsewhere (most probably in another window/tab on the same computer).">IDBDatabase/versionchange_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="database-interface"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase" title="The IDBDatabase interface of the IndexedDB API provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database.">IDBDatabase</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>15+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>14+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="ref-for-dom-idbfactory-cmp①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBFactory/cmp" title="The cmp() method of the IDBFactory interface compares two values as keys to determine equality and ordering for IndexedDB operations, such as storing and iterating.">IDBFactory/cmp</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbfactory-databases①"> <summary><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBFactory/databases" title="The databases method of the IDBFactory interface returns a list representing all the available databases, including their names and versions.">IDBFactory/databases</a></p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari yes"><span>Safari</span><span>14+</span></span><span class="chrome yes"><span>Chrome</span><span>72+</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>?</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="ref-for-dom-idbfactory-deletedatabase①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBFactory/deleteDatabase" title="The deleteDatabase() method of the IDBFactory interface requests the deletion of a database. The method returns an IDBOpenDBRequest object immediately, and performs the deletion operation asynchronously.">IDBFactory/deleteDatabase</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbfactory-open②"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBFactory/open" title="The open() method of the IDBFactory interface requests opening a connection to a database.">IDBFactory/open</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="factory-interface"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBFactory" title="The IDBFactory interface of the IndexedDB API lets applications asynchronously access the indexed databases. The object that implements the interface is window.indexedDB. You open — that is, create and access — and delete a database with this object, and not directly with IDBFactory.">IDBFactory</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>15+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>14+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="ref-for-dom-idbindex-count①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/count" title="The count() method of the IDBIndex interface returns an IDBRequest object, and in a separate thread, returns the number of records within a key range.">IDBIndex/count</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbindex-get①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/get" title="The get() method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the value in the referenced object store that corresponds to the given key or the first corresponding value, if key is set to an IDBKeyRange.">IDBIndex/get</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbindex-getall①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getAll" title="The getAll() method of the IDBIndex interface retrieves all objects that are inside the index.">IDBIndex/getAll</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>44+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>48+</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>?</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="ref-for-dom-idbindex-getallkeys①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getAllKeys" title="The getAllKeys() method of the IDBIndex interface asynchronously retrieves the primary keys of all objects inside the index, setting them as the result of the request object.">IDBIndex/getAllKeys</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>44+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>48+</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>?</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="ref-for-dom-idbindex-getkey①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getKey" title="The getKey() method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an IDBKeyRange.">IDBIndex/getKey</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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-idbindex-keypath"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/keyPath" title="The keyPath property of the IDBIndex interface returns the key path of the current index. If null, this index is not auto-populated.">IDBIndex/keyPath</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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-idbindex-multientry"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/multiEntry" title="The multiEntry read-only property of the IDBIndex interface returns a boolean value that affects how the index behaves when the result of evaluating the index's key path yields an array.">IDBIndex/multiEntry</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbindex-name①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/name" title="The name property of the IDBIndex interface contains a string which names the index.">IDBIndex/name</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbindex-objectstore①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/objectStore" title="The objectStore property of the IDBIndex interface returns the name of the object store referenced by the current index.">IDBIndex/objectStore</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbindex-opencursor②"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/openCursor" title="The openCursor() method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, creates a cursor over the specified key range.">IDBIndex/openCursor</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbindex-openkeycursor①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/openKeyCursor" title="The openKeyCursor() method of the IDBIndex interface returns an IDBRequest object, and, in a separate thread, creates a cursor over the specified key range, as arranged by this index.">IDBIndex/openKeyCursor</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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-idbindex-unique"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/unique" title="The unique read-only property returns a boolean that states whether the index allows duplicate keys.">IDBIndex/unique</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="index-interface"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex" title="IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data.">IDBIndex</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>15+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>14+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="ref-for-dom-idbkeyrange-bound①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange/bound_static" title="The bound() static method of the IDBKeyRange interface creates a new key range with the specified upper and lower bounds. The bounds can be open (that is, the bounds exclude the endpoint values) or closed (that is, the bounds include the endpoint values). By default, the bounds are closed.">IDBKeyRange/bound_static</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbkeyrange-includes①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange/includes" title="The includes() method of the IDBKeyRange interface returns a boolean indicating whether a specified key is inside the key range.">IDBKeyRange/includes</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>47+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>52+</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>?</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="ref-for-dom-idbkeyrange-lower①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange/lower" title="The lower read-only property of the IDBKeyRange interface returns the lower bound of the key range.">IDBKeyRange/lower</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbkeyrange-lowerbound①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange/lowerBound_static" title="The lowerBound() static method of the IDBKeyRange interface creates a new key range with only a lower bound. By default, it includes the lower endpoint value and is closed.">IDBKeyRange/lowerBound_static</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbkeyrange-loweropen①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange/lowerOpen" title="The lowerOpen read-only property of the IDBKeyRange interface returns a boolean indicating whether the lower-bound value is included in the key range.">IDBKeyRange/lowerOpen</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbkeyrange-only①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange/only_static" title="The only() static method of the IDBKeyRange interface creates a new key range containing a single value.">IDBKeyRange/only_static</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbkeyrange-upper①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange/upper" title="The upper read-only property of the IDBKeyRange interface returns the upper bound of the key range.">IDBKeyRange/upper</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbkeyrange-upperbound①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange/upperBound_static" title="The upperBound() static method of the IDBKeyRange interface creates a new upper-bound key range. By default, it includes the upper endpoint value and is closed.">IDBKeyRange/upperBound_static</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbkeyrange-upperopen①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange/upperOpen" title="The upperOpen read-only property of the IDBKeyRange interface returns a boolean indicating whether the upper-bound value is included in the key range.">IDBKeyRange/upperOpen</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="keyrange"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange" title="The IDBKeyRange interface of the IndexedDB API represents a continuous interval over some data type that is used for keys. Records can be retrieved from IDBObjectStore and IDBIndex objects using keys or a range of keys. You can limit the range using lower and upper bounds. For example, you can iterate over all values of a key in the value range A–Z.">IDBKeyRange</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>14+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="ref-for-dom-idbobjectstore-add①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/add" title="The add() method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, creates a structured clone of the value, and stores the cloned value in the object store. This is for adding new records to an object store.">IDBObjectStore/add</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-autoincrement①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/autoIncrement" title="The autoIncrement read-only property of the IDBObjectStore interface returns the value of the auto increment flag for this object store.">IDBObjectStore/autoIncrement</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-clear③"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/clear" title="The clear() method of the IDBObjectStore interface creates and immediately returns an IDBRequest object, and clears this object store in a separate thread. This is for deleting all the current data out of an object store.">IDBObjectStore/clear</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-count①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/count" title="The count() method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the total number of records that match the provided key or IDBKeyRange. If no arguments are provided, it returns the total number of records in the store.">IDBObjectStore/count</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-createindex①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex" title="The createIndex() method of the IDBObjectStore interface creates and returns a new IDBIndex object in the connected database. It creates a new field/column defining a new data point for each database record to contain.">IDBObjectStore/createIndex</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-delete①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/delete" title="The delete() method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, deletes the specified record or records.">IDBObjectStore/delete</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-deleteindex①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/deleteIndex" title="The deleteIndex() method of the IDBObjectStore interface destroys the index with the specified name in the connected database, used during a version upgrade.">IDBObjectStore/deleteIndex</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-get①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/get" title="The get() method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the object selected by the specified key. This is for retrieving specific records from an object store.">IDBObjectStore/get</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-getall①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAll" title="The getAll() method of the IDBObjectStore interface returns an IDBRequest object containing all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.">IDBObjectStore/getAll</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>44+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>48+</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 yes"><span>Firefox for Android</span><span>48+</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="ref-for-dom-idbobjectstore-getallkeys①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAllKeys" title="The getAllKeys() method of the IDBObjectStore interface returns an IDBRequest object retrieves record keys for all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.">IDBObjectStore/getAllKeys</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>44+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>48+</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 yes"><span>Firefox for Android</span><span>48+</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="ref-for-dom-idbobjectstore-getkey①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getKey" title="The getKey() method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store.">IDBObjectStore/getKey</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>51+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>48+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>45+</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 yes"><span>Firefox for Android</span><span>58+</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 yes"><span>Opera Mobile</span><span>43+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-idbobjectstore-index"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/index" title="The index() method of the IDBObjectStore interface opens a named index in the current object store, after which it can be used to, for example, return a series of records sorted by that index using a cursor.">IDBObjectStore/index</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-indexnames①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/indexNames" title="The indexNames read-only property of the IDBObjectStore interface returns a list of the names of indexes on objects in this object store.">IDBObjectStore/indexNames</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-keypath①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/keyPath" title="The keyPath read-only property of the IDBObjectStore interface returns the key path of this object store.">IDBObjectStore/keyPath</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-name①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/name" title="The name property of the IDBObjectStore interface indicates the name of this object store.">IDBObjectStore/name</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-opencursor②"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor" title="The openCursor() method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, returns a new IDBCursorWithValue object. Used for iterating through an object store with a cursor.">IDBObjectStore/openCursor</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-openkeycursor①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openKeyCursor" title="The openKeyCursor() method of the IDBObjectStore interface returns an IDBRequest object whose result will be set to an IDBCursor that can be used to iterate through matching results. Used for iterating through the keys of an object store with a cursor.">IDBObjectStore/openKeyCursor</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>44+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>IE</span><span>10+</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="ref-for-dom-idbobjectstore-put①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/put" title="The put() method of the IDBObjectStore interface updates a given record in a database, or inserts a new record if the given item does not already exist.">IDBObjectStore/put</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbobjectstore-transaction①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/transaction" title="The transaction read-only property of the IDBObjectStore interface returns the transaction object to which this object store belongs.">IDBObjectStore/transaction</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="object-store-interface"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore" title="The IDBObjectStore interface of the IndexedDB API represents an object store in a database. Records within an object store are sorted according to their keys. This sorting enables fast insertion, look-up, and ordered retrieval.">IDBObjectStore</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>15+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>14+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="eventdef-idbopendbrequest-blocked"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBOpenDBRequest/blocked_event" title="The blocked handler is executed when an open connection to a database is blocking a versionchange transaction on the same database.">IDBOpenDBRequest/blocked_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="eventdef-idbopendbrequest-upgradeneeded"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBOpenDBRequest/upgradeneeded_event" title="The upgradeneeded event is fired when an attempt was made to open a database with a version number higher than its current version.">IDBOpenDBRequest/upgradeneeded_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="idbopendbrequest"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBOpenDBRequest" title="The IDBOpenDBRequest interface of the IndexedDB API provides access to the results of requests to open or delete databases (performed using IDBFactory.open and IDBFactory.deleteDatabase), using specific event handler attributes.">IDBOpenDBRequest</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>15+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>14+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="ref-for-dom-idbrequest-error①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/error" title="The error read-only property of the IDBRequest interface returns the error in the event of an unsuccessful request.">IDBRequest/error</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="eventdef-idbrequest-error"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/error_event" title="The error handler is executed when an error caused a request to fail.">IDBRequest/error_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/error_event" title="The error event is fired on IDBTransaction when a request returns an error and the event bubbles up to the transaction object.">IDBTransaction/error_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbrequest-readystate①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/readyState" title="The readyState read-only property of the IDBRequest interface returns the state of the request.">IDBRequest/readyState</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbrequest-result①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/result" title="The result read-only property of the IDBRequest interface returns the result of the request. If the request is not completed, the result is not available and an InvalidStateError exception is thrown.">IDBRequest/result</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbrequest-source①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/source" title="The source read-only property of the IDBRequest interface returns the source of the request, such as an Index or an object store. If no source exists (such as when calling IDBFactory.open), it returns null.">IDBRequest/source</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="eventdef-idbrequest-success"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/success_event" title="The success event is fired when an IDBRequest succeeds.">IDBRequest/success_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbrequest-transaction①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/transaction" title="The transaction read-only property of the IDBRequest interface returns the transaction for the request, that is, the transaction the request is being made inside.">IDBRequest/transaction</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="request-api"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest" title="The IDBRequest interface of the IndexedDB API provides access to results of asynchronous requests to databases and database objects using event handler attributes. Each reading and writing operation on a database is done using a request.">IDBRequest</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>15+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android yes"><span>Chrome for Android</span><span>25+</span></span><span class="webview_android yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>14+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="ref-for-dom-idbtransaction-abort②"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/abort" title="The abort() method of the IDBTransaction interface rolls back all the changes to objects in the database associated with this transaction.">IDBTransaction/abort</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="eventdef-idbtransaction-abort"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/abort_event" title="The abort event is fired when an IndexedDB transaction is aborted.">IDBTransaction/abort_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbtransaction-commit②"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/commit" title="The commit() method of the IDBTransaction interface commits the transaction if it is called on an active transaction.">IDBTransaction/commit</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>74+</span></span><span class="safari yes"><span>Safari</span><span>15+</span></span><span class="chrome yes"><span>Chrome</span><span>76+</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>?</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-idbtransaction-complete"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/complete_event" title="The complete event of the IndexedDB API is fired when the transaction successfully completed.">IDBTransaction/complete_event</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbtransaction-db①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/db" title="The db read-only property of the IDBTransaction interface returns the database connection with which this transaction is associated.">IDBTransaction/db</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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-idbtransaction-durability"> <summary><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/durability" title="The durability read-only property of the IDBTransaction interface returns the durability hint the transaction was created with. This is a hint to the user agent of whether to prioritize performance or durability when committing the transaction.">IDBTransaction/durability</a></p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari yes"><span>Safari</span><span>15+</span></span><span class="chrome yes"><span>Chrome</span><span>83+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>70+</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>?</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="ref-for-dom-idbtransaction-error①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/error" title="The IDBTransaction.error property of the IDBTransaction interface returns the type of error when there is an unsuccessful transaction.">IDBTransaction/error</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbtransaction-mode①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/mode" title="The mode read-only property of the IDBTransaction interface returns the current mode for accessing the data in the object stores in the scope of the transaction (i.e. is the mode to be read-only, or do you want to write to the object stores?) The default value is readonly.">IDBTransaction/mode</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbtransaction-objectstore①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/objectStore" title="The objectStore() method of the IDBTransaction interface returns an object store that has already been added to the scope of this transaction.">IDBTransaction/objectStore</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="ref-for-dom-idbtransaction-objectstorenames①"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/objectStoreNames" title="The objectStoreNames read-only property of the IDBTransaction interface returns a DOMStringList of names of IDBObjectStore objects.">IDBTransaction/objectStoreNames</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>10.1+</span></span><span class="chrome yes"><span>Chrome</span><span>48+</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 yes"><span>Firefox for Android</span><span>22+</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="transaction"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction" title="The IDBTransaction interface of the IndexedDB API provides a static, asynchronous transaction on a database using event handler attributes. All reading and writing of data is done within transactions. You use IDBDatabase to start transactions, IDBTransaction to set the mode of the transaction (e.g. is it readonly or readwrite), and you access an IDBObjectStore to make a request. You can also use an IDBTransaction object to abort transactions.">IDBTransaction</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>15+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>14+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dom-idbversionchangeevent-idbversionchangeevent"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/IDBVersionChangeEvent" title="The IDBVersionChangeEvent() constructor creates a new IDBVersionChangeEvent object, which is used to represent when a version of the database has changed, as a result of the onupgradeneeded event handler.">IDBVersionChangeEvent/IDBVersionChangeEvent</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>25+</span></span><span class="safari yes"><span>Safari</span><span>10+</span></span><span class="chrome yes"><span>Chrome</span><span>41+</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>?</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-idbversionchangeevent-newversion"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/newVersion" title="The newVersion read-only property of the IDBVersionChangeEvent interface returns the new version number of the database.">IDBVersionChangeEvent/newVersion</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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-idbversionchangeevent-oldversion"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent/oldVersion" title="The oldVersion read-only property of the IDBVersionChangeEvent interface returns the old version number of the database.">IDBVersionChangeEvent/oldVersion</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>10+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>23+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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="events"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeEvent" title="The IDBVersionChangeEvent interface of the IndexedDB API indicates that the version of the database has changed, as the result of an onupgradeneeded event handler function.">IDBVersionChangeEvent</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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 yes"><span>Android WebView</span><span>4.4+</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-windoworworkerglobalscope-indexeddb"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/indexedDB" title="The global indexedDB read-only property provides a mechanism for applications to asynchronously access the capabilities of indexed databases.">indexedDB</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="safari yes"><span>Safari</span><span>8+</span></span><span class="chrome yes"><span>Chrome</span><span>24+</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 yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>10+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>22+</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> <script>/* Boilerplate: script-dom-helper */ "use strict"; 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-dfn-panel */ "use strict"; { let dfnPanelData = { "0204d188": {"dfnID":"0204d188","dfnText":"size","external":true,"refSections":[{"refs":[{"id":"ref-for-list-size"},{"id":"ref-for-list-size\u2460"},{"id":"ref-for-list-size\u2461"},{"id":"ref-for-list-size\u2462"},{"id":"ref-for-list-size\u2463"},{"id":"ref-for-list-size\u2464"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-list-size\u2465"}],"title":"7.3. Convert a key to a value"}],"url":"https://infra.spec.whatwg.org/#list-size"}, "020eb03c": {"dfnID":"020eb03c","dfnText":"HasOwnProperty","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-hasownproperty"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-sec-hasownproperty\u2460"},{"id":"ref-for-sec-hasownproperty\u2461"}],"title":"7.2. Inject a key into a value"},{"refs":[{"id":"ref-for-sec-hasownproperty\u2462"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-hasownproperty"}, "03675365": {"dfnID":"03675365","dfnText":"event handler IDL attribute","external":true,"refSections":[{"refs":[{"id":"ref-for-event-handler-idl-attributes"},{"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"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"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"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-event-handler-idl-attributes\u2468"},{"id":"ref-for-event-handler-idl-attributes\u2460\u24ea"},{"id":"ref-for-event-handler-idl-attributes\u2460\u2460"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes"}, "06137087": {"dfnID":"06137087","dfnText":"the current Realm Record","external":true,"refSections":[{"refs":[{"id":"ref-for-current-realm"},{"id":"ref-for-current-realm\u2460"},{"id":"ref-for-current-realm\u2461"},{"id":"ref-for-current-realm\u2462"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-current-realm\u2463"},{"id":"ref-for-current-realm\u2464"},{"id":"ref-for-current-realm\u2465"},{"id":"ref-for-current-realm\u2466"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-current-realm\u2467"},{"id":"ref-for-current-realm\u2468"},{"id":"ref-for-current-realm\u2460\u24ea"}],"title":"4.8. The IDBCursor interface"}],"url":"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm"}, "0698d556": {"dfnID":"0698d556","dfnText":"string","external":true,"refSections":[{"refs":[{"id":"ref-for-string"}],"title":"2. Constructs"}],"url":"https://infra.spec.whatwg.org/#string"}, "0800bdf4": {"dfnID":"0800bdf4","dfnText":"StructuredDeserialize","external":true,"refSections":[{"refs":[{"id":"ref-for-structureddeserialize"}],"title":"5.11. Clone a value"},{"refs":[{"id":"ref-for-structureddeserialize\u2460"}],"title":"6. Database operations"},{"refs":[{"id":"ref-for-structureddeserialize\u2461"},{"id":"ref-for-structureddeserialize\u2462"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-structureddeserialize\u2463"},{"id":"ref-for-structureddeserialize\u2464"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-structureddeserialize\u2465"}],"title":"6.7. Cursor iteration operation"},{"refs":[{"id":"ref-for-structureddeserialize\u2466"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-structureddeserialize\u2467"},{"id":"ref-for-structureddeserialize\u2468"}],"title":"7.2. Inject a key into a value"}],"url":"https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize"}, "086e3aff": {"dfnID":"086e3aff","dfnText":"origin","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-origin"},{"id":"ref-for-concept-origin\u2460"}],"title":"8.1. User tracking"}],"url":"https://html.spec.whatwg.org/multipage/browsers.html#concept-origin"}, "0a422d04": {"dfnID":"0a422d04","dfnText":"serializable object","external":true,"refSections":[{"refs":[{"id":"ref-for-serializable-objects"}],"title":"2.3. Values"}],"url":"https://html.spec.whatwg.org/multipage/structured-data.html#serializable-objects"}, "0be3911e": {"dfnID":"0be3911e","dfnText":"NotReadableError","external":true,"refSections":[{"refs":[{"id":"ref-for-notreadableerror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-notreadableerror\u2460"},{"id":"ref-for-notreadableerror\u2461"}],"title":"6.2. Object store retrieval operations"}],"url":"https://webidl.spec.whatwg.org/#notreadableerror"}, "0c0ceb78": {"dfnID":"0c0ceb78","dfnText":"bubbles","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-event-bubbles"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-dom-event-bubbles\u2460"},{"id":"ref-for-dom-event-bubbles\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-dom-event-bubbles\u2462"},{"id":"ref-for-dom-event-bubbles\u2463"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-dom-event-bubbles\u2464"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-dom-event-bubbles\u2465"}],"title":"5.10. Firing an error event"}],"url":"https://dom.spec.whatwg.org/#dom-event-bubbles"}, "0d0390b4": {"dfnID":"0d0390b4","dfnText":"browsing context","external":true,"refSections":[{"refs":[{"id":"ref-for-browsing-context"}],"title":"2.8.2. Connection queues"}],"url":"https://html.spec.whatwg.org/multipage/document-sequences.html#browsing-context"}, "119fb4df": {"dfnID":"119fb4df","dfnText":"Blob","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-Blob"}],"title":"2.3. Values"},{"refs":[{"id":"ref-for-dfn-Blob\u2460"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-dfn-Blob\u2461"},{"id":"ref-for-dfn-Blob\u2462"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-dfn-Blob\u2463"}],"title":"10. Accessibility considerations"}],"url":"https://www.w3.org/TR/FileAPI/#dfn-Blob"}, "11e0b87f": {"dfnID":"11e0b87f","dfnText":"unrestricted double","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-unrestricted-double"}],"title":"2.4. Keys"}],"url":"https://webidl.spec.whatwg.org/#idl-unrestricted-double"}, "129bdae8": {"dfnID":"129bdae8","dfnText":"Event","external":true,"refSections":[{"refs":[{"id":"ref-for-event"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-event\u2460"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-event\u2461"}],"title":"5.10. Firing an error event"}],"url":"https://dom.spec.whatwg.org/#event"}, "1372f92a": {"dfnID":"1372f92a","dfnText":"dispatch","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-event-dispatch"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-concept-event-dispatch\u2460"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-concept-event-dispatch\u2461"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-concept-event-dispatch\u2462"}],"title":"5.10. Firing an error event"}],"url":"https://dom.spec.whatwg.org/#concept-event-dispatch"}, "15e48c39": {"dfnID":"15e48c39","dfnText":"set","external":true,"refSections":[{"refs":[{"id":"ref-for-ordered-set"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-ordered-set\u2460"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-ordered-set\u2461"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-ordered-set\u2462"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-ordered-set\u2463"},{"id":"ref-for-ordered-set\u2464"},{"id":"ref-for-ordered-set\u2465"}],"title":"7.4. Convert a value to a key"}],"url":"https://infra.spec.whatwg.org/#ordered-set"}, "16d07e10": {"dfnID":"16d07e10","dfnText":"for each","external":true,"refSections":[{"refs":[{"id":"ref-for-list-iterate"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-list-iterate\u2460"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-list-iterate\u2461"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-list-iterate\u2462"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-list-iterate\u2463"},{"id":"ref-for-list-iterate\u2464"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-list-iterate\u2465"},{"id":"ref-for-list-iterate\u2466"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-list-iterate\u2467"},{"id":"ref-for-list-iterate\u2468"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-list-iterate\u2460\u24ea"},{"id":"ref-for-list-iterate\u2460\u2460"}],"title":"7.2. Inject a key into a value"}],"url":"https://infra.spec.whatwg.org/#list-iterate"}, "17acf60b": {"dfnID":"17acf60b","dfnText":"ToLength","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-tolength"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-sec-tolength\u2460"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tolength"}, "18fe3a3b": {"dfnID":"18fe3a3b","dfnText":"DOMStringList","external":true,"refSections":[{"refs":[{"id":"ref-for-domstringlist"}],"title":"2. Constructs"},{"refs":[{"id":"ref-for-domstringlist\u2460"},{"id":"ref-for-domstringlist\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-domstringlist\u2462"},{"id":"ref-for-domstringlist\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-domstringlist\u2464"},{"id":"ref-for-domstringlist\u2465"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist"}, "24fec0b4": {"dfnID":"24fec0b4","dfnText":"DataError","external":true,"refSections":[{"refs":[{"id":"ref-for-dataerror"},{"id":"ref-for-dataerror\u2460"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-dataerror\u2461"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-dataerror\u2462"},{"id":"ref-for-dataerror\u2463"},{"id":"ref-for-dataerror\u2464"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-dataerror\u2465"},{"id":"ref-for-dataerror\u2466"},{"id":"ref-for-dataerror\u2467"},{"id":"ref-for-dataerror\u2468"},{"id":"ref-for-dataerror\u2460\u24ea"},{"id":"ref-for-dataerror\u2460\u2460"},{"id":"ref-for-dataerror\u2460\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-dataerror\u2460\u2462"},{"id":"ref-for-dataerror\u2460\u2463"},{"id":"ref-for-dataerror\u2460\u2464"},{"id":"ref-for-dataerror\u2460\u2465"},{"id":"ref-for-dataerror\u2460\u2466"},{"id":"ref-for-dataerror\u2460\u2467"},{"id":"ref-for-dataerror\u2460\u2468"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-dataerror\u2461\u24ea"},{"id":"ref-for-dataerror\u2461\u2460"},{"id":"ref-for-dataerror\u2461\u2461"},{"id":"ref-for-dataerror\u2461\u2462"},{"id":"ref-for-dataerror\u2461\u2463"},{"id":"ref-for-dataerror\u2461\u2464"},{"id":"ref-for-dataerror\u2461\u2465"},{"id":"ref-for-dataerror\u2461\u2466"},{"id":"ref-for-dataerror\u2461\u2467"},{"id":"ref-for-dataerror\u2461\u2468"},{"id":"ref-for-dataerror\u2462\u24ea"}],"title":"4.8. The IDBCursor interface"}],"url":"https://webidl.spec.whatwg.org/#dataerror"}, "26b82890": {"dfnID":"26b82890","dfnText":"event","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-event"}],"title":"2.7.1. Transaction lifecycle"}],"url":"https://dom.spec.whatwg.org/#concept-event"}, "2bc0cdf4": {"dfnID":"2bc0cdf4","dfnText":"EventTarget","external":true,"refSections":[{"refs":[{"id":"ref-for-eventtarget"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-eventtarget\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-eventtarget\u2461"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://dom.spec.whatwg.org/#eventtarget"}, "2e9f6464": {"dfnID":"2e9f6464","dfnText":"canceled flag","external":true,"refSections":[{"refs":[{"id":"ref-for-canceled-flag"},{"id":"ref-for-canceled-flag\u2460"}],"title":"5.10. Firing an error event"}],"url":"https://dom.spec.whatwg.org/#canceled-flag"}, "2f8afbfe": {"dfnID":"2f8afbfe","dfnText":"ArrayBuffer","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-ArrayBuffer"}],"title":"2.4. Keys"}],"url":"https://webidl.spec.whatwg.org/#idl-ArrayBuffer"}, "36333997": {"dfnID":"36333997","dfnText":"length","external":true,"refSections":[{"refs":[{"id":"ref-for-byte-sequence-length"}],"title":"7.3. Convert a key to a value"}],"url":"https://infra.spec.whatwg.org/#byte-sequence-length"}, "37afd48d": {"dfnID":"37afd48d","dfnText":"InvalidAccessError","external":true,"refSections":[{"refs":[{"id":"ref-for-invalidaccesserror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-invalidaccesserror\u2460"},{"id":"ref-for-invalidaccesserror\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-invalidaccesserror\u2462"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-invalidaccesserror\u2463"},{"id":"ref-for-invalidaccesserror\u2464"},{"id":"ref-for-invalidaccesserror\u2465"}],"title":"4.8. The IDBCursor interface"}],"url":"https://webidl.spec.whatwg.org/#invalidaccesserror"}, "3935e4b5": {"dfnID":"3935e4b5","dfnText":"size","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-size"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-dfn-size\u2460"}],"title":"7.1. Extract a key from a value"}],"url":"https://www.w3.org/TR/FileAPI/#dfn-size"}, "3b5f2424": {"dfnID":"3b5f2424","dfnText":"the given value","external":true,"refSections":[{"refs":[{"id":"ref-for-the-given-value"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-the-given-value\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"https://webidl.spec.whatwg.org/#the-given-value"}, "3b90bdcd": {"dfnID":"3b90bdcd","dfnText":"resolve","external":true,"refSections":[{"refs":[{"id":"ref-for-resolve"}],"title":"4.3. The IDBFactory interface"}],"url":"https://webidl.spec.whatwg.org/#resolve"}, "3de9e659": {"dfnID":"3de9e659","dfnText":"byte sequence","external":true,"refSections":[{"refs":[{"id":"ref-for-byte-sequence"}],"title":"2.4. Keys"}],"url":"https://infra.spec.whatwg.org/#byte-sequence"}, "4013a022": {"dfnID":"4013a022","dfnText":"this","external":true,"refSections":[{"refs":[{"id":"ref-for-this"},{"id":"ref-for-this\u2460"},{"id":"ref-for-this\u2461"},{"id":"ref-for-this\u2462"},{"id":"ref-for-this\u2463"},{"id":"ref-for-this\u2464"},{"id":"ref-for-this\u2465"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-this\u2466"},{"id":"ref-for-this\u2467"},{"id":"ref-for-this\u2468"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-this\u2460\u24ea"},{"id":"ref-for-this\u2460\u2460"},{"id":"ref-for-this\u2460\u2461"},{"id":"ref-for-this\u2460\u2462"},{"id":"ref-for-this\u2460\u2463"},{"id":"ref-for-this\u2460\u2464"},{"id":"ref-for-this\u2460\u2465"},{"id":"ref-for-this\u2460\u2466"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-this\u2460\u2467"},{"id":"ref-for-this\u2460\u2468"},{"id":"ref-for-this\u2461\u24ea"},{"id":"ref-for-this\u2461\u2460"},{"id":"ref-for-this\u2461\u2461"},{"id":"ref-for-this\u2461\u2462"},{"id":"ref-for-this\u2461\u2463"},{"id":"ref-for-this\u2461\u2464"},{"id":"ref-for-this\u2461\u2465"},{"id":"ref-for-this\u2461\u2466"},{"id":"ref-for-this\u2461\u2467"},{"id":"ref-for-this\u2461\u2468"},{"id":"ref-for-this\u2462\u24ea"},{"id":"ref-for-this\u2462\u2460"},{"id":"ref-for-this\u2462\u2461"},{"id":"ref-for-this\u2462\u2462"},{"id":"ref-for-this\u2462\u2463"},{"id":"ref-for-this\u2462\u2464"},{"id":"ref-for-this\u2462\u2465"},{"id":"ref-for-this\u2462\u2466"},{"id":"ref-for-this\u2462\u2467"},{"id":"ref-for-this\u2462\u2468"},{"id":"ref-for-this\u2463\u24ea"},{"id":"ref-for-this\u2463\u2460"},{"id":"ref-for-this\u2463\u2461"},{"id":"ref-for-this\u2463\u2462"},{"id":"ref-for-this\u2463\u2463"},{"id":"ref-for-this\u2463\u2464"},{"id":"ref-for-this\u2463\u2465"},{"id":"ref-for-this\u2463\u2466"},{"id":"ref-for-this\u2463\u2467"},{"id":"ref-for-this\u2463\u2468"},{"id":"ref-for-this\u2464\u24ea"},{"id":"ref-for-this\u2464\u2460"},{"id":"ref-for-this\u2464\u2461"},{"id":"ref-for-this\u2464\u2462"},{"id":"ref-for-this\u2464\u2463"},{"id":"ref-for-this\u2464\u2464"},{"id":"ref-for-this\u2464\u2465"},{"id":"ref-for-this\u2464\u2466"},{"id":"ref-for-this\u2464\u2467"},{"id":"ref-for-this\u2464\u2468"},{"id":"ref-for-this\u2465\u24ea"},{"id":"ref-for-this\u2465\u2460"},{"id":"ref-for-this\u2465\u2461"},{"id":"ref-for-this\u2465\u2462"},{"id":"ref-for-this\u2465\u2463"},{"id":"ref-for-this\u2465\u2464"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-this\u2465\u2465"},{"id":"ref-for-this\u2465\u2466"},{"id":"ref-for-this\u2465\u2467"},{"id":"ref-for-this\u2465\u2468"},{"id":"ref-for-this\u2466\u24ea"},{"id":"ref-for-this\u2466\u2460"},{"id":"ref-for-this\u2466\u2461"},{"id":"ref-for-this\u2466\u2462"},{"id":"ref-for-this\u2466\u2463"},{"id":"ref-for-this\u2466\u2464"},{"id":"ref-for-this\u2466\u2465"},{"id":"ref-for-this\u2466\u2466"},{"id":"ref-for-this\u2466\u2467"},{"id":"ref-for-this\u2466\u2468"},{"id":"ref-for-this\u2467\u24ea"},{"id":"ref-for-this\u2467\u2460"},{"id":"ref-for-this\u2467\u2461"},{"id":"ref-for-this\u2467\u2462"},{"id":"ref-for-this\u2467\u2463"},{"id":"ref-for-this\u2467\u2464"},{"id":"ref-for-this\u2467\u2465"},{"id":"ref-for-this\u2467\u2466"},{"id":"ref-for-this\u2467\u2467"},{"id":"ref-for-this\u2467\u2468"},{"id":"ref-for-this\u2468\u24ea"},{"id":"ref-for-this\u2468\u2460"},{"id":"ref-for-this\u2468\u2461"},{"id":"ref-for-this\u2468\u2462"},{"id":"ref-for-this\u2468\u2463"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-this\u2468\u2464"},{"id":"ref-for-this\u2468\u2465"},{"id":"ref-for-this\u2468\u2466"},{"id":"ref-for-this\u2468\u2467"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-this\u2468\u2468"},{"id":"ref-for-this\u2460\u24ea\u24ea"},{"id":"ref-for-this\u2460\u24ea\u2460"},{"id":"ref-for-this\u2460\u24ea\u2461"},{"id":"ref-for-this\u2460\u24ea\u2462"},{"id":"ref-for-this\u2460\u24ea\u2463"},{"id":"ref-for-this\u2460\u24ea\u2464"},{"id":"ref-for-this\u2460\u24ea\u2465"},{"id":"ref-for-this\u2460\u24ea\u2466"},{"id":"ref-for-this\u2460\u24ea\u2467"},{"id":"ref-for-this\u2460\u24ea\u2468"},{"id":"ref-for-this\u2460\u2460\u24ea"},{"id":"ref-for-this\u2460\u2460\u2460"},{"id":"ref-for-this\u2460\u2460\u2461"},{"id":"ref-for-this\u2460\u2460\u2462"},{"id":"ref-for-this\u2460\u2460\u2463"},{"id":"ref-for-this\u2460\u2460\u2464"},{"id":"ref-for-this\u2460\u2460\u2465"},{"id":"ref-for-this\u2460\u2460\u2466"},{"id":"ref-for-this\u2460\u2460\u2467"},{"id":"ref-for-this\u2460\u2460\u2468"},{"id":"ref-for-this\u2460\u2461\u24ea"},{"id":"ref-for-this\u2460\u2461\u2460"},{"id":"ref-for-this\u2460\u2461\u2461"},{"id":"ref-for-this\u2460\u2461\u2462"},{"id":"ref-for-this\u2460\u2461\u2463"},{"id":"ref-for-this\u2460\u2461\u2464"},{"id":"ref-for-this\u2460\u2461\u2465"},{"id":"ref-for-this\u2460\u2461\u2466"},{"id":"ref-for-this\u2460\u2461\u2467"},{"id":"ref-for-this\u2460\u2461\u2468"},{"id":"ref-for-this\u2460\u2462\u24ea"},{"id":"ref-for-this\u2460\u2462\u2460"},{"id":"ref-for-this\u2460\u2462\u2461"},{"id":"ref-for-this\u2460\u2462\u2462"},{"id":"ref-for-this\u2460\u2462\u2463"},{"id":"ref-for-this\u2460\u2462\u2464"},{"id":"ref-for-this\u2460\u2462\u2465"},{"id":"ref-for-this\u2460\u2462\u2466"},{"id":"ref-for-this\u2460\u2462\u2467"},{"id":"ref-for-this\u2460\u2462\u2468"},{"id":"ref-for-this\u2460\u2463\u24ea"},{"id":"ref-for-this\u2460\u2463\u2460"},{"id":"ref-for-this\u2460\u2463\u2461"},{"id":"ref-for-this\u2460\u2463\u2462"},{"id":"ref-for-this\u2460\u2463\u2463"},{"id":"ref-for-this\u2460\u2463\u2464"},{"id":"ref-for-this\u2460\u2463\u2465"},{"id":"ref-for-this\u2460\u2463\u2466"},{"id":"ref-for-this\u2460\u2463\u2467"},{"id":"ref-for-this\u2460\u2463\u2468"},{"id":"ref-for-this\u2460\u2464\u24ea"},{"id":"ref-for-this\u2460\u2464\u2460"},{"id":"ref-for-this\u2460\u2464\u2461"},{"id":"ref-for-this\u2460\u2464\u2462"},{"id":"ref-for-this\u2460\u2464\u2463"},{"id":"ref-for-this\u2460\u2464\u2464"},{"id":"ref-for-this\u2460\u2464\u2465"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-this\u2460\u2464\u2466"},{"id":"ref-for-this\u2460\u2464\u2467"},{"id":"ref-for-this\u2460\u2464\u2468"},{"id":"ref-for-this\u2460\u2465\u24ea"},{"id":"ref-for-this\u2460\u2465\u2460"},{"id":"ref-for-this\u2460\u2465\u2461"},{"id":"ref-for-this\u2460\u2465\u2462"},{"id":"ref-for-this\u2460\u2465\u2463"},{"id":"ref-for-this\u2460\u2465\u2464"},{"id":"ref-for-this\u2460\u2465\u2465"},{"id":"ref-for-this\u2460\u2465\u2466"},{"id":"ref-for-this\u2460\u2465\u2467"},{"id":"ref-for-this\u2460\u2465\u2468"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://webidl.spec.whatwg.org/#this"}, "4135591f": {"dfnID":"4135591f","dfnText":"code unit less than","external":true,"refSections":[{"refs":[{"id":"ref-for-code-unit-less-than"}],"title":"2. Constructs"},{"refs":[{"id":"ref-for-code-unit-less-than\u2460"},{"id":"ref-for-code-unit-less-than\u2461"}],"title":"2.4. Keys"}],"url":"https://infra.spec.whatwg.org/#code-unit-less-than"}, "44a7708c": {"dfnID":"44a7708c","dfnText":"EventInit","external":true,"refSections":[{"refs":[{"id":"ref-for-dictdef-eventinit"}],"title":"4.2. Event interfaces"}],"url":"https://dom.spec.whatwg.org/#dictdef-eventinit"}, "47574099": {"dfnID":"47574099","dfnText":"short","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-short"}],"title":"4.3. The IDBFactory interface"}],"url":"https://webidl.spec.whatwg.org/#idl-short"}, "48c6127a": {"dfnID":"48c6127a","dfnText":"ConstraintError","external":true,"refSections":[{"refs":[{"id":"ref-for-constrainterror"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-constrainterror\u2460"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-constrainterror\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-constrainterror\u2462"},{"id":"ref-for-constrainterror\u2463"},{"id":"ref-for-constrainterror\u2464"},{"id":"ref-for-constrainterror\u2465"},{"id":"ref-for-constrainterror\u2466"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-constrainterror\u2467"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-constrainterror\u2468"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-constrainterror\u2460\u24ea"},{"id":"ref-for-constrainterror\u2460\u2460"},{"id":"ref-for-constrainterror\u2460\u2461"},{"id":"ref-for-constrainterror\u2460\u2462"}],"title":"6.1. Object store storage operation"}],"url":"https://webidl.spec.whatwg.org/#constrainterror"}, "49d6d0a2": {"dfnID":"49d6d0a2","dfnText":"type","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-type"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-dfn-type\u2460"}],"title":"7.1. Extract a key from a value"}],"url":"https://www.w3.org/TR/FileAPI/#dfn-type"}, "4a854a91": {"dfnID":"4a854a91","dfnText":"ToString","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-tostring"}],"title":"7.1. Extract a key from a value"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring"}, "53275e46": {"dfnID":"53275e46","dfnText":"append (for list)","external":true,"refSections":[{"refs":[{"id":"ref-for-list-append"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-list-append\u2460"},{"id":"ref-for-list-append\u2461"}],"title":"7.4. Convert a value to a key"}],"url":"https://infra.spec.whatwg.org/#list-append"}, "5372cca8": {"dfnID":"5372cca8","dfnText":"boolean","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-boolean"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-idl-boolean\u2460"},{"id":"ref-for-idl-boolean\u2461"},{"id":"ref-for-idl-boolean\u2462"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idl-boolean\u2463"},{"id":"ref-for-idl-boolean\u2464"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"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"},{"id":"ref-for-idl-boolean\u2460\u2460"},{"id":"ref-for-idl-boolean\u2460\u2461"}],"title":"4.7. The IDBKeyRange interface"}],"url":"https://webidl.spec.whatwg.org/#idl-boolean"}, "5456c8a8": {"dfnID":"5456c8a8","dfnText":"?","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-algorithm-conventions"},{"id":"ref-for-sec-algorithm-conventions\u2460"}],"title":"5.11. Clone a value"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2461"}],"title":"6. Database operations"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2462"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2463"},{"id":"ref-for-sec-algorithm-conventions\u2464"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2465"},{"id":"ref-for-sec-algorithm-conventions\u2466"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2467"}],"title":"6.7. Cursor iteration operation"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2468"},{"id":"ref-for-sec-algorithm-conventions\u2460\u24ea"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2460"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2461"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2462"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2460\u2463"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2464"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2465"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2466"}],"title":"7.2. Inject a key into a value"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2460\u2467"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2468"},{"id":"ref-for-sec-algorithm-conventions\u2461\u24ea"},{"id":"ref-for-sec-algorithm-conventions\u2461\u2460"},{"id":"ref-for-sec-algorithm-conventions\u2461\u2461"},{"id":"ref-for-sec-algorithm-conventions\u2461\u2462"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.github.io/ecma262/#sec-algorithm-conventions"}, "56d576c8": {"dfnID":"56d576c8","dfnText":"ImageData","external":true,"refSections":[{"refs":[{"id":"ref-for-imagedata"}],"title":"2.3. Values"},{"refs":[{"id":"ref-for-imagedata\u2460"}],"title":"10. Accessibility considerations"}],"url":"https://html.spec.whatwg.org/multipage/canvas.html#imagedata"}, "5afbefcd": {"dfnID":"5afbefcd","dfnText":"item","external":true,"refSections":[{"refs":[{"id":"ref-for-list-item"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-list-item\u2460"},{"id":"ref-for-list-item\u2461"}],"title":"7.2. Inject a key into a value"},{"refs":[{"id":"ref-for-list-item\u2462"}],"title":"7.4. Convert a value to a key"}],"url":"https://infra.spec.whatwg.org/#list-item"}, "5e129c74": {"dfnID":"5e129c74","dfnText":"QuotaExceededError","external":true,"refSections":[{"refs":[{"id":"ref-for-quotaexceedederror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-quotaexceedederror\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-quotaexceedederror\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-quotaexceedederror\u2462"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-quotaexceedederror\u2463"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-quotaexceedederror\u2464"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-quotaexceedederror\u2465"}],"title":"5.4. Committing a transaction"}],"url":"https://webidl.spec.whatwg.org/#quotaexceedederror"}, "5ecc2082": {"dfnID":"5ecc2082","dfnText":"sort in ascending order","external":true,"refSections":[{"refs":[{"id":"ref-for-list-sort-in-ascending-order"}],"title":"2. Constructs"}],"url":"https://infra.spec.whatwg.org/#list-sort-in-ascending-order"}, "5f6d392d": {"dfnID":"5f6d392d","dfnText":"WindowOrWorkerGlobalScope","external":true,"refSections":[{"refs":[{"id":"ref-for-windoworworkerglobalscope"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-windoworworkerglobalscope\u2460"}],"title":"11. Revision history"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope"}, "5f90bbfb": {"dfnID":"5f90bbfb","dfnText":"undefined","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-undefined"},{"id":"ref-for-idl-undefined\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-idl-undefined\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idl-undefined\u2462"},{"id":"ref-for-idl-undefined\u2463"},{"id":"ref-for-idl-undefined\u2464"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-idl-undefined\u2465"},{"id":"ref-for-idl-undefined\u2466"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://webidl.spec.whatwg.org/#idl-undefined"}, "5f9c7266": {"dfnID":"5f9c7266","dfnText":"Number","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-number-objects"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-sec-number-objects\u2460"}],"title":"2.11. Key generators"}],"url":"https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number-objects"}, "5fd23811": {"dfnID":"5fd23811","dfnText":"fire an event","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-event-fire"},{"id":"ref-for-concept-event-fire\u2460"},{"id":"ref-for-concept-event-fire\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-concept-event-fire\u2462"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-concept-event-fire\u2463"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-concept-event-fire\u2464"},{"id":"ref-for-concept-event-fire\u2465"}],"title":"5.5. Aborting a transaction"}],"url":"https://dom.spec.whatwg.org/#concept-event-fire"}, "6148dd37": {"dfnID":"6148dd37","dfnText":"storage bucket","external":true,"refSections":[{"refs":[{"id":"ref-for-storage-bucket"}],"title":"2.7. Transactions"}],"url":"https://storage.spec.whatwg.org/#storage-bucket"}, "614f2b27": {"dfnID":"614f2b27","dfnText":"array exotic objects","external":true,"refSections":[{"refs":[{"id":"ref-for-array-exotic-object"},{"id":"ref-for-array-exotic-object\u2460"}],"title":"7.4. Convert a value to a key"},{"refs":[{"id":"ref-for-array-exotic-object\u2461"}],"title":"11. Revision history"}],"url":"https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#array-exotic-object"}, "62d5a433": {"dfnID":"62d5a433","dfnText":"sort(comparator)","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-array.prototype.sort"}],"title":"2. Constructs"}],"url":"https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.sort"}, "649608b9": {"dfnID":"649608b9","dfnText":"list","external":true,"refSections":[{"refs":[{"id":"ref-for-list"}],"title":"2. Constructs"},{"refs":[{"id":"ref-for-list\u2460"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-list\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-list\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-list\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-list\u2464"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-list\u2465"},{"id":"ref-for-list\u2466"},{"id":"ref-for-list\u2467"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-list\u2468"},{"id":"ref-for-list\u2460\u24ea"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-list\u2460\u2460"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-list\u2460\u2461"}],"title":"7.4. Convert a value to a key"}],"url":"https://infra.spec.whatwg.org/#list"}, "6a73c310": {"dfnID":"6a73c310","dfnText":"create","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-create-exception"},{"id":"ref-for-dfn-create-exception\u2460"},{"id":"ref-for-dfn-create-exception\u2461"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-dfn-create-exception\u2462"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-dfn-create-exception\u2463"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-dfn-create-exception\u2464"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-dfn-create-exception\u2465"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-dfn-create-exception\u2466"}],"title":"5.10. Firing an error event"},{"refs":[{"id":"ref-for-dfn-create-exception\u2467"},{"id":"ref-for-dfn-create-exception\u2468"}],"title":"6.2. Object store retrieval operations"}],"url":"https://webidl.spec.whatwg.org/#dfn-create-exception"}, "6c6b1005": {"dfnID":"6c6b1005","dfnText":"any","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-any"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-idl-any\u2460"},{"id":"ref-for-idl-any\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-idl-any\u2462"},{"id":"ref-for-idl-any\u2463"},{"id":"ref-for-idl-any\u2464"},{"id":"ref-for-idl-any\u2465"},{"id":"ref-for-idl-any\u2466"},{"id":"ref-for-idl-any\u2467"},{"id":"ref-for-idl-any\u2468"},{"id":"ref-for-idl-any\u2460\u24ea"},{"id":"ref-for-idl-any\u2460\u2460"},{"id":"ref-for-idl-any\u2460\u2461"},{"id":"ref-for-idl-any\u2460\u2462"},{"id":"ref-for-idl-any\u2460\u2463"},{"id":"ref-for-idl-any\u2460\u2464"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idl-any\u2460\u2465"},{"id":"ref-for-idl-any\u2460\u2466"},{"id":"ref-for-idl-any\u2460\u2467"},{"id":"ref-for-idl-any\u2460\u2468"},{"id":"ref-for-idl-any\u2461\u24ea"},{"id":"ref-for-idl-any\u2461\u2460"},{"id":"ref-for-idl-any\u2461\u2461"},{"id":"ref-for-idl-any\u2461\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idl-any\u2461\u2463"},{"id":"ref-for-idl-any\u2461\u2464"},{"id":"ref-for-idl-any\u2461\u2465"},{"id":"ref-for-idl-any\u2461\u2466"},{"id":"ref-for-idl-any\u2461\u2467"},{"id":"ref-for-idl-any\u2461\u2468"},{"id":"ref-for-idl-any\u2462\u24ea"},{"id":"ref-for-idl-any\u2462\u2460"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-idl-any\u2462\u2461"},{"id":"ref-for-idl-any\u2462\u2462"},{"id":"ref-for-idl-any\u2462\u2463"},{"id":"ref-for-idl-any\u2462\u2464"},{"id":"ref-for-idl-any\u2462\u2465"},{"id":"ref-for-idl-any\u2462\u2466"},{"id":"ref-for-idl-any\u2462\u2467"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-idl-any\u2462\u2468"},{"id":"ref-for-idl-any\u2463\u24ea"},{"id":"ref-for-idl-any\u2463\u2460"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-idl-any\u2463\u2461"},{"id":"ref-for-idl-any\u2463\u2462"}],"title":"6.3. Index retrieval operations"}],"url":"https://webidl.spec.whatwg.org/#idl-any"}, "6e4c081e": {"dfnID":"6e4c081e","dfnText":"byte less than","external":true,"refSections":[{"refs":[{"id":"ref-for-byte-less-than"},{"id":"ref-for-byte-less-than\u2460"}],"title":"2.4. Keys"}],"url":"https://infra.spec.whatwg.org/#byte-less-than"}, "7716447b": {"dfnID":"7716447b","dfnText":"RegExp","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-regexp-regular-expression-objects"},{"id":"ref-for-sec-regexp-regular-expression-objects\u2460"}],"title":"9.4. Persistence risks"}],"url":"https://tc39.es/ecma262/multipage/text-processing.html#sec-regexp-regular-expression-objects"}, "7787d359": {"dfnID":"7787d359","dfnText":"record","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-record"}],"title":"2.3. Values"}],"url":"https://webidl.spec.whatwg.org/#idl-record"}, "77b4c09a": {"dfnID":"77b4c09a","dfnText":"assert","external":true,"refSections":[{"refs":[{"id":"ref-for-assert"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-assert\u2460"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-assert\u2461"}],"title":"5.11. Clone a value"},{"refs":[{"id":"ref-for-assert\u2462"}],"title":"6.7. Cursor iteration operation"},{"refs":[{"id":"ref-for-assert\u2463"},{"id":"ref-for-assert\u2464"},{"id":"ref-for-assert\u2465"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-assert\u2466"},{"id":"ref-for-assert\u2467"},{"id":"ref-for-assert\u2468"},{"id":"ref-for-assert\u2460\u24ea"},{"id":"ref-for-assert\u2460\u2460"},{"id":"ref-for-assert\u2460\u2461"}],"title":"7.2. Inject a key into a value"},{"refs":[{"id":"ref-for-assert\u2460\u2462"},{"id":"ref-for-assert\u2460\u2463"},{"id":"ref-for-assert\u2460\u2464"},{"id":"ref-for-assert\u2460\u2465"}],"title":"7.3. Convert a key to a value"}],"url":"https://infra.spec.whatwg.org/#assert"}, "797018a7": {"dfnID":"797018a7","dfnText":"InvalidStateError","external":true,"refSections":[{"refs":[{"id":"ref-for-invalidstateerror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-invalidstateerror\u2460"},{"id":"ref-for-invalidstateerror\u2461"},{"id":"ref-for-invalidstateerror\u2462"},{"id":"ref-for-invalidstateerror\u2463"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-invalidstateerror\u2464"},{"id":"ref-for-invalidstateerror\u2465"},{"id":"ref-for-invalidstateerror\u2466"},{"id":"ref-for-invalidstateerror\u2467"},{"id":"ref-for-invalidstateerror\u2468"},{"id":"ref-for-invalidstateerror\u2460\u24ea"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-invalidstateerror\u2460\u2460"},{"id":"ref-for-invalidstateerror\u2460\u2461"},{"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"},{"id":"ref-for-invalidstateerror\u2460\u2468"},{"id":"ref-for-invalidstateerror\u2461\u24ea"},{"id":"ref-for-invalidstateerror\u2461\u2460"},{"id":"ref-for-invalidstateerror\u2461\u2461"},{"id":"ref-for-invalidstateerror\u2461\u2462"},{"id":"ref-for-invalidstateerror\u2461\u2463"},{"id":"ref-for-invalidstateerror\u2461\u2464"},{"id":"ref-for-invalidstateerror\u2461\u2465"},{"id":"ref-for-invalidstateerror\u2461\u2466"},{"id":"ref-for-invalidstateerror\u2461\u2467"},{"id":"ref-for-invalidstateerror\u2461\u2468"},{"id":"ref-for-invalidstateerror\u2462\u24ea"},{"id":"ref-for-invalidstateerror\u2462\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-invalidstateerror\u2462\u2461"},{"id":"ref-for-invalidstateerror\u2462\u2462"},{"id":"ref-for-invalidstateerror\u2462\u2463"},{"id":"ref-for-invalidstateerror\u2462\u2464"},{"id":"ref-for-invalidstateerror\u2462\u2465"},{"id":"ref-for-invalidstateerror\u2462\u2466"},{"id":"ref-for-invalidstateerror\u2462\u2467"},{"id":"ref-for-invalidstateerror\u2462\u2468"},{"id":"ref-for-invalidstateerror\u2463\u24ea"},{"id":"ref-for-invalidstateerror\u2463\u2460"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-invalidstateerror\u2463\u2461"},{"id":"ref-for-invalidstateerror\u2463\u2462"},{"id":"ref-for-invalidstateerror\u2463\u2463"},{"id":"ref-for-invalidstateerror\u2463\u2464"},{"id":"ref-for-invalidstateerror\u2463\u2465"},{"id":"ref-for-invalidstateerror\u2463\u2466"},{"id":"ref-for-invalidstateerror\u2463\u2467"},{"id":"ref-for-invalidstateerror\u2463\u2468"},{"id":"ref-for-invalidstateerror\u2464\u24ea"},{"id":"ref-for-invalidstateerror\u2464\u2460"},{"id":"ref-for-invalidstateerror\u2464\u2461"},{"id":"ref-for-invalidstateerror\u2464\u2462"},{"id":"ref-for-invalidstateerror\u2464\u2463"},{"id":"ref-for-invalidstateerror\u2464\u2464"},{"id":"ref-for-invalidstateerror\u2464\u2465"},{"id":"ref-for-invalidstateerror\u2464\u2466"},{"id":"ref-for-invalidstateerror\u2464\u2467"},{"id":"ref-for-invalidstateerror\u2464\u2468"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-invalidstateerror\u2465\u24ea"},{"id":"ref-for-invalidstateerror\u2465\u2460"},{"id":"ref-for-invalidstateerror\u2465\u2461"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://webidl.spec.whatwg.org/#invalidstateerror"}, "7a3dbdb1": {"dfnID":"7a3dbdb1","dfnText":"strictly split a string","external":true,"refSections":[{"refs":[{"id":"ref-for-strictly-split"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-strictly-split\u2460"},{"id":"ref-for-strictly-split\u2461"}],"title":"7.2. Inject a key into a value"}],"url":"https://infra.spec.whatwg.org/#strictly-split"}, "7e1d7596": {"dfnID":"7e1d7596","dfnText":"File","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-file"}],"title":"2.3. Values"},{"refs":[{"id":"ref-for-dfn-file\u2460"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-dfn-file\u2461"},{"id":"ref-for-dfn-file\u2462"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-dfn-file\u2463"}],"title":"10. Accessibility considerations"},{"refs":[{"id":"ref-for-dfn-file\u2464"}],"title":"11. Revision history"}],"url":"https://www.w3.org/TR/FileAPI/#dfn-file"}, "7f6a70d1": {"dfnID":"7f6a70d1","dfnText":"storage key","external":true,"refSections":[{"refs":[{"id":"ref-for-storage-key"},{"id":"ref-for-storage-key\u2460"}],"title":"2.1. Database"},{"refs":[{"id":"ref-for-storage-key\u2461"},{"id":"ref-for-storage-key\u2462"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-storage-key\u2463"}],"title":"2.8.2. Connection queues"},{"refs":[{"id":"ref-for-storage-key\u2464"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-storage-key\u2465"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-storage-key\u2466"}],"title":"9.3. Implementation risks"}],"url":"https://storage.spec.whatwg.org/#storage-key"}, "80726755": {"dfnID":"80726755","dfnText":"task queues","external":true,"refSections":[{"refs":[{"id":"ref-for-task-queue"},{"id":"ref-for-task-queue\u2460"}],"title":"2.8.2. Connection queues"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#task-queue"}, "81dd847b": {"dfnID":"81dd847b","dfnText":"UnknownError","external":true,"refSections":[{"refs":[{"id":"ref-for-unknownerror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-unknownerror\u2460"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-unknownerror\u2461"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-unknownerror\u2462"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-unknownerror\u2463"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-unknownerror\u2464"}],"title":"5.4. Committing a transaction"}],"url":"https://webidl.spec.whatwg.org/#unknownerror"}, "82ca3efc": {"dfnID":"82ca3efc","dfnText":"TypeError","external":true,"refSections":[{"refs":[{"id":"ref-for-exceptiondef-typeerror"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-exceptiondef-typeerror\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-exceptiondef-typeerror\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"https://webidl.spec.whatwg.org/#exceptiondef-typeerror"}, "85394472": {"dfnID":"85394472","dfnText":"Document","external":true,"refSections":[{"refs":[{"id":"ref-for-document"}],"title":"2.1.1. Database connection"}],"url":"https://dom.spec.whatwg.org/#document"}, "8855a9aa": {"dfnID":"8855a9aa","dfnText":"DOMString","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-DOMString"}],"title":"2. Constructs"},{"refs":[{"id":"ref-for-idl-DOMString\u2460"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-idl-DOMString\u2461"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-idl-DOMString\u2462"},{"id":"ref-for-idl-DOMString\u2463"},{"id":"ref-for-idl-DOMString\u2464"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-idl-DOMString\u2465"},{"id":"ref-for-idl-DOMString\u2466"},{"id":"ref-for-idl-DOMString\u2467"},{"id":"ref-for-idl-DOMString\u2468"},{"id":"ref-for-idl-DOMString\u2460\u24ea"},{"id":"ref-for-idl-DOMString\u2460\u2460"},{"id":"ref-for-idl-DOMString\u2460\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"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"},{"id":"ref-for-idl-DOMString\u2460\u2466"},{"id":"ref-for-idl-DOMString\u2460\u2467"},{"id":"ref-for-idl-DOMString\u2460\u2468"},{"id":"ref-for-idl-DOMString\u2461\u24ea"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idl-DOMString\u2461\u2460"},{"id":"ref-for-idl-DOMString\u2461\u2461"},{"id":"ref-for-idl-DOMString\u2461\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idl-DOMString\u2461\u2463"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://webidl.spec.whatwg.org/#idl-DOMString"}, "889e932f": {"dfnID":"889e932f","dfnText":"Exposed","external":true,"refSections":[{"refs":[{"id":"ref-for-Exposed"},{"id":"ref-for-Exposed\u2460"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-Exposed\u2461"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-Exposed\u2462"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-Exposed\u2463"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-Exposed\u2464"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-Exposed\u2465"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-Exposed\u2466"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-Exposed\u2467"},{"id":"ref-for-Exposed\u2468"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-Exposed\u2460\u24ea"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://webidl.spec.whatwg.org/#Exposed"}, "8abfc3b6": {"dfnID":"8abfc3b6","dfnText":"creating an event","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-event-create"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-concept-event-create\u2460"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-concept-event-create\u2461"}],"title":"5.10. Firing an error event"}],"url":"https://dom.spec.whatwg.org/#concept-event-create"}, "8c407366": {"dfnID":"8c407366","dfnText":"cancelable","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-event-cancelable"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-dom-event-cancelable\u2460"},{"id":"ref-for-dom-event-cancelable\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-dom-event-cancelable\u2462"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-dom-event-cancelable\u2463"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-dom-event-cancelable\u2464"}],"title":"5.10. Firing an error event"}],"url":"https://dom.spec.whatwg.org/#dom-event-cancelable"}, "8c491ba9": {"dfnID":"8c491ba9","dfnText":"array exotic object","external":true,"refSections":[{"refs":[{"id":"ref-for-array-exotic-object"},{"id":"ref-for-array-exotic-object\u2460"}],"title":"7.4. Convert a value to a key"},{"refs":[{"id":"ref-for-array-exotic-object\u2461"}],"title":"11. Revision history"}],"url":"https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#array-exotic-object"}, "8c8cc336": {"dfnID":"8c8cc336","dfnText":"Date","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-date-objects"}],"title":"2.3. Values"},{"refs":[{"id":"ref-for-sec-date-objects\u2460"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-sec-date-objects\u2461"},{"id":"ref-for-sec-date-objects\u2462"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-sec-date-objects\u2463"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-objects"}, "8f7667e0": {"dfnID":"8f7667e0","dfnText":"IdentifierName","external":true,"refSections":[{"refs":[{"id":"ref-for-prod-IdentifierName"}],"title":"2.5. Key path"}],"url":"https://tc39.github.io/ecma262/#prod-IdentifierName"}, "9032aa9e": {"dfnID":"9032aa9e","dfnText":"String","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-string-objects"}],"title":"2. Constructs"},{"refs":[{"id":"ref-for-sec-string-objects\u2460"}],"title":"2.3. Values"},{"refs":[{"id":"ref-for-sec-string-objects\u2461"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-sec-string-objects\u2462"}],"title":"2.5. Key path"}],"url":"https://tc39.es/ecma262/multipage/text-processing.html#sec-string-objects"}, "92d13070": {"dfnID":"92d13070","dfnText":"get a copy of the buffer source","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-get-buffer-source-copy"}],"title":"7.4. Convert a value to a key"}],"url":"https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy"}, "93d2e29e": {"dfnID":"93d2e29e","dfnText":"ReadOnlyError","external":true,"refSections":[{"refs":[{"id":"ref-for-readonlyerror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-readonlyerror\u2460"},{"id":"ref-for-readonlyerror\u2461"},{"id":"ref-for-readonlyerror\u2462"},{"id":"ref-for-readonlyerror\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-readonlyerror\u2464"},{"id":"ref-for-readonlyerror\u2465"},{"id":"ref-for-readonlyerror\u2466"}],"title":"4.8. The IDBCursor interface"}],"url":"https://webidl.spec.whatwg.org/#readonlyerror"}, "95d7775a": {"dfnID":"95d7775a","dfnText":"Uint8Array","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-Uint8Array"}],"title":"2.4. Keys"}],"url":"https://webidl.spec.whatwg.org/#idl-Uint8Array"}, "9784d14c": {"dfnID":"9784d14c","dfnText":"name","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-name"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-dfn-name\u2460"}],"title":"7.1. Extract a key from a value"}],"url":"https://www.w3.org/TR/FileAPI/#dfn-name"}, "9a517a7d": {"dfnID":"9a517a7d","dfnText":"queue a task","external":true,"refSections":[{"refs":[{"id":"ref-for-queue-a-task"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-queue-a-task\u2460"},{"id":"ref-for-queue-a-task\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-queue-a-task\u2462"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-queue-a-task\u2463"},{"id":"ref-for-queue-a-task\u2464"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-queue-a-task\u2465"},{"id":"ref-for-queue-a-task\u2466"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-queue-a-task\u2467"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-queue-a-task\u2468"},{"id":"ref-for-queue-a-task\u2460\u24ea"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-queue-a-task\u2460\u2460"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-queue-a-task\u2460\u2461"}],"title":"5.7. Upgrading a database"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task"}, "9c4c1e66": {"dfnID":"9c4c1e66","dfnText":"relevant settings object","external":true,"refSections":[{"refs":[{"id":"ref-for-relevant-settings-object"},{"id":"ref-for-relevant-settings-object\u2460"},{"id":"ref-for-relevant-settings-object\u2461"}],"title":"4.3. The IDBFactory interface"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#relevant-settings-object"}, "9cce47fd": {"dfnID":"9cce47fd","dfnText":"sequence","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-sequence"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-idl-sequence\u2460"},{"id":"ref-for-idl-sequence\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-idl-sequence\u2462"},{"id":"ref-for-idl-sequence\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idl-sequence\u2464"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idl-sequence\u2465"},{"id":"ref-for-idl-sequence\u2466"},{"id":"ref-for-idl-sequence\u2467"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-idl-sequence\u2468"},{"id":"ref-for-idl-sequence\u2460\u24ea"}],"title":"6.3. Index retrieval operations"}],"url":"https://webidl.spec.whatwg.org/#idl-sequence"}, "9d09d04c": {"dfnID":"9d09d04c","dfnText":"type","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-event-type"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-dom-event-type\u2460"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-dom-event-type\u2461"}],"title":"5.10. Firing an error event"}],"url":"https://dom.spec.whatwg.org/#dom-event-type"}, "9d386f55": {"dfnID":"9d386f55","dfnText":"event handler event type","external":true,"refSections":[{"refs":[{"id":"ref-for-event-handler-event-type"},{"id":"ref-for-event-handler-event-type\u2460"},{"id":"ref-for-event-handler-event-type\u2461"},{"id":"ref-for-event-handler-event-type\u2462"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-event-handler-event-type\u2463"},{"id":"ref-for-event-handler-event-type\u2464"},{"id":"ref-for-event-handler-event-type\u2465"},{"id":"ref-for-event-handler-event-type\u2466"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-event-handler-event-type\u2467"},{"id":"ref-for-event-handler-event-type\u2468"},{"id":"ref-for-event-handler-event-type\u2460\u24ea"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type"}, "9eda9b58": {"dfnID":"9eda9b58","dfnText":"NotFoundError","external":true,"refSections":[{"refs":[{"id":"ref-for-notfounderror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-notfounderror\u2460"},{"id":"ref-for-notfounderror\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-notfounderror\u2462"},{"id":"ref-for-notfounderror\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-notfounderror\u2464"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://webidl.spec.whatwg.org/#notfounderror"}, "a3b18719": {"dfnID":"a3b18719","dfnText":"append (for set)","external":true,"refSections":[{"refs":[{"id":"ref-for-set-append"}],"title":"7.4. Convert a value to a key"}],"url":"https://infra.spec.whatwg.org/#set-append"}, "a5c91173": {"dfnID":"a5c91173","dfnText":"SameObject","external":true,"refSections":[{"refs":[{"id":"ref-for-SameObject"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-SameObject\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-SameObject\u2461"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-SameObject\u2462"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-SameObject\u2463"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://webidl.spec.whatwg.org/#SameObject"}, "a5f015e3": {"dfnID":"a5f015e3","dfnText":"realm","external":true,"refSections":[{"refs":[{"id":"ref-for-realm"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-realm\u2460"}],"title":"4.8. The IDBCursor interface"}],"url":"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#realm"}, "a6e67972": {"dfnID":"a6e67972","dfnText":"Object","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-object-objects"}],"title":"2.3. Values"},{"refs":[{"id":"ref-for-sec-object-objects\u2460"},{"id":"ref-for-sec-object-objects\u2461"},{"id":"ref-for-sec-object-objects\u2462"},{"id":"ref-for-sec-object-objects\u2463"},{"id":"ref-for-sec-object-objects\u2464"}],"title":"7.2. Inject a key into a value"}],"url":"https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object-objects"}, "a72449dd": {"dfnID":"a72449dd","dfnText":"in parallel","external":true,"refSections":[{"refs":[{"id":"ref-for-in-parallel"},{"id":"ref-for-in-parallel\u2460"},{"id":"ref-for-in-parallel\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-in-parallel\u2462"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-in-parallel\u2463"}],"title":"5.6. Asynchronously executing a request"}],"url":"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel"}, "a7257e38": {"dfnID":"a7257e38","dfnText":"get the parent","external":true,"refSections":[{"refs":[{"id":"ref-for-get-the-parent"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-get-the-parent\u2460"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-get-the-parent\u2461"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-get-the-parent\u2462"}],"title":"2.8.1. Open requests"}],"url":"https://dom.spec.whatwg.org/#get-the-parent"}, "abf85593": {"dfnID":"abf85593","dfnText":"Get","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-get-o-p"},{"id":"ref-for-sec-get-o-p\u2460"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-sec-get-o-p\u2461"},{"id":"ref-for-sec-get-o-p\u2462"}],"title":"7.2. Inject a key into a value"},{"refs":[{"id":"ref-for-sec-get-o-p\u2463"},{"id":"ref-for-sec-get-o-p\u2464"},{"id":"ref-for-sec-get-o-p\u2465"},{"id":"ref-for-sec-get-o-p\u2466"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p"}, "abort-a-transaction": {"dfnID":"abort-a-transaction","dfnText":"abort a transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-abort-a-transaction"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-abort-a-transaction\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-abort-a-transaction\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-abort-a-transaction\u2462"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-abort-a-transaction\u2463"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-abort-a-transaction\u2464"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-abort-a-transaction\u2465"},{"id":"ref-for-abort-a-transaction\u2466"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-abort-a-transaction\u2467"},{"id":"ref-for-abort-a-transaction\u2468"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-abort-a-transaction\u2460\u24ea"}],"title":"5.8. Aborting an upgrade transaction"},{"refs":[{"id":"ref-for-abort-a-transaction\u2460\u2460"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-abort-a-transaction\u2460\u2461"},{"id":"ref-for-abort-a-transaction\u2460\u2462"}],"title":"5.10. Firing an error event"}],"url":"#abort-a-transaction"}, "abort-an-upgrade-transaction": {"dfnID":"abort-an-upgrade-transaction","dfnText":"abort an upgrade transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-abort-an-upgrade-transaction"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-abort-an-upgrade-transaction\u2460"}],"title":"5.5. Aborting a transaction"}],"url":"#abort-an-upgrade-transaction"}, "add-or-put": {"dfnID":"add-or-put","dfnText":"add or put","external":false,"refSections":[{"refs":[{"id":"ref-for-add-or-put"},{"id":"ref-for-add-or-put\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#add-or-put"}, "ae8def21": {"dfnID":"ae8def21","dfnText":"contain","external":true,"refSections":[{"refs":[{"id":"ref-for-list-contain"}],"title":"7.4. Convert a value to a key"}],"url":"https://infra.spec.whatwg.org/#list-contain"}, "array-key": {"dfnID":"array-key","dfnText":"array key","external":false,"refSections":[{"refs":[{"id":"ref-for-array-key"},{"id":"ref-for-array-key\u2460"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-array-key\u2461"},{"id":"ref-for-array-key\u2462"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-array-key\u2463"},{"id":"ref-for-array-key\u2464"},{"id":"ref-for-array-key\u2465"},{"id":"ref-for-array-key\u2466"},{"id":"ref-for-array-key\u2467"},{"id":"ref-for-array-key\u2468"},{"id":"ref-for-array-key\u2460\u24ea"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-array-key\u2460\u2460"},{"id":"ref-for-array-key\u2460\u2461"},{"id":"ref-for-array-key\u2460\u2462"}],"title":"7.4. Convert a value to a key"}],"url":"#array-key"}, "asynchronously-execute-a-request": {"dfnID":"asynchronously-execute-a-request","dfnText":"asynchronously execute a request","external":false,"refSections":[{"refs":[{"id":"ref-for-asynchronously-execute-a-request"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-asynchronously-execute-a-request\u2460"},{"id":"ref-for-asynchronously-execute-a-request\u2461"},{"id":"ref-for-asynchronously-execute-a-request\u2462"},{"id":"ref-for-asynchronously-execute-a-request\u2463"},{"id":"ref-for-asynchronously-execute-a-request\u2464"},{"id":"ref-for-asynchronously-execute-a-request\u2465"},{"id":"ref-for-asynchronously-execute-a-request\u2466"},{"id":"ref-for-asynchronously-execute-a-request\u2467"},{"id":"ref-for-asynchronously-execute-a-request\u2468"},{"id":"ref-for-asynchronously-execute-a-request\u2460\u24ea"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-asynchronously-execute-a-request\u2460\u2460"},{"id":"ref-for-asynchronously-execute-a-request\u2460\u2461"},{"id":"ref-for-asynchronously-execute-a-request\u2460\u2462"},{"id":"ref-for-asynchronously-execute-a-request\u2460\u2463"},{"id":"ref-for-asynchronously-execute-a-request\u2460\u2464"},{"id":"ref-for-asynchronously-execute-a-request\u2460\u2465"},{"id":"ref-for-asynchronously-execute-a-request\u2460\u2466"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-asynchronously-execute-a-request\u2460\u2467"},{"id":"ref-for-asynchronously-execute-a-request\u2460\u2468"},{"id":"ref-for-asynchronously-execute-a-request\u2461\u24ea"},{"id":"ref-for-asynchronously-execute-a-request\u2461\u2460"},{"id":"ref-for-asynchronously-execute-a-request\u2461\u2461"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-asynchronously-execute-a-request\u2461\u2462"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-asynchronously-execute-a-request\u2461\u2463"}],"title":"6. Database operations"}],"url":"#asynchronously-execute-a-request"}, "b05bf85d": {"dfnID":"b05bf85d","dfnText":"buffer source types","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-buffer-source-type"}],"title":"7.4. Convert a value to a key"}],"url":"https://webidl.spec.whatwg.org/#dfn-buffer-source-type"}, "b262501e": {"dfnID":"b262501e","dfnText":"reject","external":true,"refSections":[{"refs":[{"id":"ref-for-reject"}],"title":"4.3. The IDBFactory interface"}],"url":"https://webidl.spec.whatwg.org/#reject"}, "b4cfa5ce": {"dfnID":"b4cfa5ce","dfnText":"throw","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-throw"},{"id":"ref-for-dfn-throw\u2460"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-dfn-throw\u2461"},{"id":"ref-for-dfn-throw\u2462"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-dfn-throw\u2463"},{"id":"ref-for-dfn-throw\u2464"},{"id":"ref-for-dfn-throw\u2465"},{"id":"ref-for-dfn-throw\u2466"},{"id":"ref-for-dfn-throw\u2467"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-dfn-throw\u2468"},{"id":"ref-for-dfn-throw\u2460\u24ea"},{"id":"ref-for-dfn-throw\u2460\u2460"},{"id":"ref-for-dfn-throw\u2460\u2461"},{"id":"ref-for-dfn-throw\u2460\u2462"},{"id":"ref-for-dfn-throw\u2460\u2463"},{"id":"ref-for-dfn-throw\u2460\u2464"},{"id":"ref-for-dfn-throw\u2460\u2465"},{"id":"ref-for-dfn-throw\u2460\u2466"},{"id":"ref-for-dfn-throw\u2460\u2467"},{"id":"ref-for-dfn-throw\u2460\u2468"},{"id":"ref-for-dfn-throw\u2461\u24ea"},{"id":"ref-for-dfn-throw\u2461\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dfn-throw\u2461\u2461"},{"id":"ref-for-dfn-throw\u2461\u2462"},{"id":"ref-for-dfn-throw\u2461\u2463"},{"id":"ref-for-dfn-throw\u2461\u2464"},{"id":"ref-for-dfn-throw\u2461\u2465"},{"id":"ref-for-dfn-throw\u2461\u2466"},{"id":"ref-for-dfn-throw\u2461\u2467"},{"id":"ref-for-dfn-throw\u2461\u2468"},{"id":"ref-for-dfn-throw\u2462\u24ea"},{"id":"ref-for-dfn-throw\u2462\u2460"},{"id":"ref-for-dfn-throw\u2462\u2461"},{"id":"ref-for-dfn-throw\u2462\u2462"},{"id":"ref-for-dfn-throw\u2462\u2463"},{"id":"ref-for-dfn-throw\u2462\u2464"},{"id":"ref-for-dfn-throw\u2462\u2465"},{"id":"ref-for-dfn-throw\u2462\u2466"},{"id":"ref-for-dfn-throw\u2462\u2467"},{"id":"ref-for-dfn-throw\u2462\u2468"},{"id":"ref-for-dfn-throw\u2463\u24ea"},{"id":"ref-for-dfn-throw\u2463\u2460"},{"id":"ref-for-dfn-throw\u2463\u2461"},{"id":"ref-for-dfn-throw\u2463\u2462"},{"id":"ref-for-dfn-throw\u2463\u2463"},{"id":"ref-for-dfn-throw\u2463\u2464"},{"id":"ref-for-dfn-throw\u2463\u2465"},{"id":"ref-for-dfn-throw\u2463\u2466"},{"id":"ref-for-dfn-throw\u2463\u2467"},{"id":"ref-for-dfn-throw\u2463\u2468"},{"id":"ref-for-dfn-throw\u2464\u24ea"},{"id":"ref-for-dfn-throw\u2464\u2460"},{"id":"ref-for-dfn-throw\u2464\u2461"},{"id":"ref-for-dfn-throw\u2464\u2462"},{"id":"ref-for-dfn-throw\u2464\u2463"},{"id":"ref-for-dfn-throw\u2464\u2464"},{"id":"ref-for-dfn-throw\u2464\u2465"},{"id":"ref-for-dfn-throw\u2464\u2466"},{"id":"ref-for-dfn-throw\u2464\u2467"},{"id":"ref-for-dfn-throw\u2464\u2468"},{"id":"ref-for-dfn-throw\u2465\u24ea"},{"id":"ref-for-dfn-throw\u2465\u2460"},{"id":"ref-for-dfn-throw\u2465\u2461"},{"id":"ref-for-dfn-throw\u2465\u2462"},{"id":"ref-for-dfn-throw\u2465\u2463"},{"id":"ref-for-dfn-throw\u2465\u2464"},{"id":"ref-for-dfn-throw\u2465\u2465"},{"id":"ref-for-dfn-throw\u2465\u2466"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-dfn-throw\u2465\u2467"},{"id":"ref-for-dfn-throw\u2465\u2468"},{"id":"ref-for-dfn-throw\u2466\u24ea"},{"id":"ref-for-dfn-throw\u2466\u2460"},{"id":"ref-for-dfn-throw\u2466\u2461"},{"id":"ref-for-dfn-throw\u2466\u2462"},{"id":"ref-for-dfn-throw\u2466\u2463"},{"id":"ref-for-dfn-throw\u2466\u2464"},{"id":"ref-for-dfn-throw\u2466\u2465"},{"id":"ref-for-dfn-throw\u2466\u2466"},{"id":"ref-for-dfn-throw\u2466\u2467"},{"id":"ref-for-dfn-throw\u2466\u2468"},{"id":"ref-for-dfn-throw\u2467\u24ea"},{"id":"ref-for-dfn-throw\u2467\u2460"},{"id":"ref-for-dfn-throw\u2467\u2461"},{"id":"ref-for-dfn-throw\u2467\u2462"},{"id":"ref-for-dfn-throw\u2467\u2463"},{"id":"ref-for-dfn-throw\u2467\u2464"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-dfn-throw\u2467\u2465"},{"id":"ref-for-dfn-throw\u2467\u2466"},{"id":"ref-for-dfn-throw\u2467\u2467"},{"id":"ref-for-dfn-throw\u2467\u2468"},{"id":"ref-for-dfn-throw\u2468\u24ea"},{"id":"ref-for-dfn-throw\u2468\u2460"},{"id":"ref-for-dfn-throw\u2468\u2461"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-dfn-throw\u2468\u2462"},{"id":"ref-for-dfn-throw\u2468\u2463"},{"id":"ref-for-dfn-throw\u2468\u2464"},{"id":"ref-for-dfn-throw\u2468\u2465"},{"id":"ref-for-dfn-throw\u2468\u2466"},{"id":"ref-for-dfn-throw\u2468\u2467"},{"id":"ref-for-dfn-throw\u2468\u2468"},{"id":"ref-for-dfn-throw\u2460\u24ea\u24ea"},{"id":"ref-for-dfn-throw\u2460\u24ea\u2460"},{"id":"ref-for-dfn-throw\u2460\u24ea\u2461"},{"id":"ref-for-dfn-throw\u2460\u24ea\u2462"},{"id":"ref-for-dfn-throw\u2460\u24ea\u2463"},{"id":"ref-for-dfn-throw\u2460\u24ea\u2464"},{"id":"ref-for-dfn-throw\u2460\u24ea\u2465"},{"id":"ref-for-dfn-throw\u2460\u24ea\u2466"},{"id":"ref-for-dfn-throw\u2460\u24ea\u2467"},{"id":"ref-for-dfn-throw\u2460\u24ea\u2468"},{"id":"ref-for-dfn-throw\u2460\u2460\u24ea"},{"id":"ref-for-dfn-throw\u2460\u2460\u2460"},{"id":"ref-for-dfn-throw\u2460\u2460\u2461"},{"id":"ref-for-dfn-throw\u2460\u2460\u2462"},{"id":"ref-for-dfn-throw\u2460\u2460\u2463"},{"id":"ref-for-dfn-throw\u2460\u2460\u2464"},{"id":"ref-for-dfn-throw\u2460\u2460\u2465"},{"id":"ref-for-dfn-throw\u2460\u2460\u2466"},{"id":"ref-for-dfn-throw\u2460\u2460\u2467"},{"id":"ref-for-dfn-throw\u2460\u2460\u2468"},{"id":"ref-for-dfn-throw\u2460\u2461\u24ea"},{"id":"ref-for-dfn-throw\u2460\u2461\u2460"},{"id":"ref-for-dfn-throw\u2460\u2461\u2461"},{"id":"ref-for-dfn-throw\u2460\u2461\u2462"},{"id":"ref-for-dfn-throw\u2460\u2461\u2463"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-dfn-throw\u2460\u2461\u2464"},{"id":"ref-for-dfn-throw\u2460\u2461\u2465"},{"id":"ref-for-dfn-throw\u2460\u2461\u2466"},{"id":"ref-for-dfn-throw\u2460\u2461\u2467"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://webidl.spec.whatwg.org/#dfn-throw"}, "b5eaabb9": {"dfnID":"b5eaabb9","dfnText":"!","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-algorithm-conventions"},{"id":"ref-for-sec-algorithm-conventions\u2460"}],"title":"5.11. Clone a value"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2461"}],"title":"6. Database operations"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2462"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2463"},{"id":"ref-for-sec-algorithm-conventions\u2464"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2465"},{"id":"ref-for-sec-algorithm-conventions\u2466"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2467"}],"title":"6.7. Cursor iteration operation"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2468"},{"id":"ref-for-sec-algorithm-conventions\u2460\u24ea"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2460"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2461"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2462"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2460\u2463"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2464"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2465"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2466"}],"title":"7.2. Inject a key into a value"},{"refs":[{"id":"ref-for-sec-algorithm-conventions\u2460\u2467"},{"id":"ref-for-sec-algorithm-conventions\u2460\u2468"},{"id":"ref-for-sec-algorithm-conventions\u2461\u24ea"},{"id":"ref-for-sec-algorithm-conventions\u2461\u2460"},{"id":"ref-for-sec-algorithm-conventions\u2461\u2461"},{"id":"ref-for-sec-algorithm-conventions\u2461\u2462"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.github.io/ecma262/#sec-algorithm-conventions"}, "bdbd19d1": {"dfnID":"bdbd19d1","dfnText":"Promise","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-promise"}],"title":"4.3. The IDBFactory interface"}],"url":"https://webidl.spec.whatwg.org/#idl-promise"}, "be2d2b4c": {"dfnID":"be2d2b4c","dfnText":"SyntaxError","external":true,"refSections":[{"refs":[{"id":"ref-for-syntaxerror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-syntaxerror\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-syntaxerror\u2461"}],"title":"4.5. The IDBObjectStore interface"}],"url":"https://webidl.spec.whatwg.org/#syntaxerror"}, "c01cbda0": {"dfnID":"c01cbda0","dfnText":"EnforceRange","external":true,"refSections":[{"refs":[{"id":"ref-for-EnforceRange"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-EnforceRange\u2460"},{"id":"ref-for-EnforceRange\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-EnforceRange\u2462"},{"id":"ref-for-EnforceRange\u2463"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-EnforceRange\u2464"}],"title":"4.8. The IDBCursor interface"}],"url":"https://webidl.spec.whatwg.org/#EnforceRange"}, "c3e881ef": {"dfnID":"c3e881ef","dfnText":"SecurityError","external":true,"refSections":[{"refs":[{"id":"ref-for-securityerror"},{"id":"ref-for-securityerror\u2460"},{"id":"ref-for-securityerror\u2461"}],"title":"4.3. The IDBFactory interface"}],"url":"https://webidl.spec.whatwg.org/#securityerror"}, "c4df1374": {"dfnID":"c4df1374","dfnText":"Type","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-ecmascript-data-types-and-values"},{"id":"ref-for-sec-ecmascript-data-types-and-values\u2460"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-sec-ecmascript-data-types-and-values\u2461"},{"id":"ref-for-sec-ecmascript-data-types-and-values\u2462"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values"}, "c5019b63": {"dfnID":"c5019b63","dfnText":"lastModified","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-lastModified"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-dfn-lastModified\u2460"}],"title":"7.1. Extract a key from a value"}],"url":"https://www.w3.org/TR/FileAPI/#dfn-lastModified"}, "c6bfef29": {"dfnID":"c6bfef29","dfnText":"abrupt completion","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-completion-record-specification-type"},{"id":"ref-for-sec-completion-record-specification-type\u2460"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-sec-completion-record-specification-type\u2461"},{"id":"ref-for-sec-completion-record-specification-type\u2462"},{"id":"ref-for-sec-completion-record-specification-type\u2463"}],"title":"7.3. Convert a key to a value"},{"refs":[{"id":"ref-for-sec-completion-record-specification-type\u2464"},{"id":"ref-for-sec-completion-record-specification-type\u2465"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type"}, "c6d19e56": {"dfnID":"c6d19e56","dfnText":"event loop","external":true,"refSections":[{"refs":[{"id":"ref-for-event-loop"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-event-loop\u2460"},{"id":"ref-for-event-loop\u2461"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-event-loop\u2462"},{"id":"ref-for-event-loop\u2463"}],"title":"2.8.2. Connection queues"},{"refs":[{"id":"ref-for-event-loop\u2464"}],"title":"4.4. The IDBDatabase interface"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#event-loop"}, "c807e273": {"dfnID":"c807e273","dfnText":"NewObject","external":true,"refSections":[{"refs":[{"id":"ref-for-NewObject"},{"id":"ref-for-NewObject\u2460"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-NewObject\u2461"},{"id":"ref-for-NewObject\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-NewObject\u2463"},{"id":"ref-for-NewObject\u2464"},{"id":"ref-for-NewObject\u2465"},{"id":"ref-for-NewObject\u2466"},{"id":"ref-for-NewObject\u2467"},{"id":"ref-for-NewObject\u2468"},{"id":"ref-for-NewObject\u2460\u24ea"},{"id":"ref-for-NewObject\u2460\u2460"},{"id":"ref-for-NewObject\u2460\u2461"},{"id":"ref-for-NewObject\u2460\u2462"},{"id":"ref-for-NewObject\u2460\u2463"},{"id":"ref-for-NewObject\u2460\u2464"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-NewObject\u2460\u2465"},{"id":"ref-for-NewObject\u2460\u2466"},{"id":"ref-for-NewObject\u2460\u2467"},{"id":"ref-for-NewObject\u2460\u2468"},{"id":"ref-for-NewObject\u2461\u24ea"},{"id":"ref-for-NewObject\u2461\u2460"},{"id":"ref-for-NewObject\u2461\u2461"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-NewObject\u2461\u2462"},{"id":"ref-for-NewObject\u2461\u2463"},{"id":"ref-for-NewObject\u2461\u2464"},{"id":"ref-for-NewObject\u2461\u2465"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-NewObject\u2461\u2466"},{"id":"ref-for-NewObject\u2461\u2467"}],"title":"4.8. The IDBCursor interface"}],"url":"https://webidl.spec.whatwg.org/#NewObject"}, "c9858f6e": {"dfnID":"c9858f6e","dfnText":"obtain a storage key","external":true,"refSections":[{"refs":[{"id":"ref-for-obtain-a-storage-key"},{"id":"ref-for-obtain-a-storage-key\u2460"},{"id":"ref-for-obtain-a-storage-key\u2461"}],"title":"4.3. The IDBFactory interface"}],"url":"https://storage.spec.whatwg.org/#obtain-a-storage-key"}, "cc2ecc32": {"dfnID":"cc2ecc32","dfnText":"domain","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-document-domain"}],"title":"2.1.1. Database connection"}],"url":"https://html.spec.whatwg.org/multipage/browsers.html#dom-document-domain"}, "check-that-a-key-could-be-injected-into-a-value": {"dfnID":"check-that-a-key-could-be-injected-into-a-value","dfnText":"check that a key could be injected into a value","external":false,"refSections":[{"refs":[{"id":"ref-for-check-that-a-key-could-be-injected-into-a-value"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-check-that-a-key-could-be-injected-into-a-value\u2460"}],"title":"7.2. Inject a key into a value"}],"url":"#check-that-a-key-could-be-injected-into-a-value"}, "cleanup-indexed-database-transactions": {"dfnID":"cleanup-indexed-database-transactions","dfnText":"cleanup Indexed Database transactions","external":false,"refSections":[{"refs":[{"id":"ref-for-cleanup-indexed-database-transactions"}],"title":"11. Revision history"}],"url":"#cleanup-indexed-database-transactions"}, "clear-an-object-store": {"dfnID":"clear-an-object-store","dfnText":"clear an object store","external":false,"refSections":[{"refs":[{"id":"ref-for-clear-an-object-store"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#clear-an-object-store"}, "clone": {"dfnID":"clone","dfnText":"clone","external":false,"refSections":[{"refs":[{"id":"ref-for-clone"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-clone\u2460"}],"title":"4.8. The IDBCursor interface"}],"url":"#clone"}, "close-a-database-connection": {"dfnID":"close-a-database-connection","dfnText":"close a database connection","external":false,"refSections":[{"refs":[{"id":"ref-for-close-a-database-connection"},{"id":"ref-for-close-a-database-connection\u2460"},{"id":"ref-for-close-a-database-connection\u2461"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-close-a-database-connection\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-close-a-database-connection\u2463"}],"title":"5.1. Opening a database connection"}],"url":"#close-a-database-connection"}, "commit-a-transaction": {"dfnID":"commit-a-transaction","dfnText":"commit a transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-commit-a-transaction"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-commit-a-transaction\u2460"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-commit-a-transaction\u2461"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-commit-a-transaction\u2462"}],"title":"5.10. Firing an error event"}],"url":"#commit-a-transaction"}, "compare-two-keys": {"dfnID":"compare-two-keys","dfnText":"compare two keys","external":false,"refSections":[{"refs":[{"id":"ref-for-compare-two-keys"},{"id":"ref-for-compare-two-keys\u2460"},{"id":"ref-for-compare-two-keys\u2461"},{"id":"ref-for-compare-two-keys\u2462"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-compare-two-keys\u2463"}],"title":"4.3. The IDBFactory interface"}],"url":"#compare-two-keys"}, "connection": {"dfnID":"connection","dfnText":"connection","external":false,"refSections":[{"refs":[{"id":"ref-for-connection"},{"id":"ref-for-connection\u2460"}],"title":"1. Introduction"},{"refs":[{"id":"ref-for-connection\u2461"},{"id":"ref-for-connection\u2462"},{"id":"ref-for-connection\u2463"},{"id":"ref-for-connection\u2464"},{"id":"ref-for-connection\u2465"},{"id":"ref-for-connection\u2466"},{"id":"ref-for-connection\u2467"},{"id":"ref-for-connection\u2468"},{"id":"ref-for-connection\u2460\u24ea"},{"id":"ref-for-connection\u2460\u2460"},{"id":"ref-for-connection\u2460\u2461"},{"id":"ref-for-connection\u2460\u2462"},{"id":"ref-for-connection\u2460\u2463"},{"id":"ref-for-connection\u2460\u2464"},{"id":"ref-for-connection\u2460\u2465"},{"id":"ref-for-connection\u2460\u2466"},{"id":"ref-for-connection\u2460\u2467"},{"id":"ref-for-connection\u2460\u2468"},{"id":"ref-for-connection\u2461\u24ea"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-connection\u2461\u2460"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-connection\u2461\u2461"},{"id":"ref-for-connection\u2461\u2462"},{"id":"ref-for-connection\u2461\u2463"},{"id":"ref-for-connection\u2461\u2464"},{"id":"ref-for-connection\u2461\u2465"},{"id":"ref-for-connection\u2461\u2466"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-connection\u2461\u2467"}],"title":"2.8.1. Open requests"},{"refs":[{"id":"ref-for-connection\u2461\u2468"}],"title":"2.8.2. Connection queues"},{"refs":[{"id":"ref-for-connection\u2462\u24ea"},{"id":"ref-for-connection\u2462\u2460"},{"id":"ref-for-connection\u2462\u2461"},{"id":"ref-for-connection\u2462\u2462"},{"id":"ref-for-connection\u2462\u2463"},{"id":"ref-for-connection\u2462\u2464"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-connection\u2462\u2465"},{"id":"ref-for-connection\u2462\u2466"},{"id":"ref-for-connection\u2462\u2467"},{"id":"ref-for-connection\u2462\u2468"},{"id":"ref-for-connection\u2463\u24ea"},{"id":"ref-for-connection\u2463\u2460"},{"id":"ref-for-connection\u2463\u2461"},{"id":"ref-for-connection\u2463\u2462"},{"id":"ref-for-connection\u2463\u2463"},{"id":"ref-for-connection\u2463\u2464"},{"id":"ref-for-connection\u2463\u2465"},{"id":"ref-for-connection\u2463\u2466"},{"id":"ref-for-connection\u2463\u2467"},{"id":"ref-for-connection\u2463\u2468"},{"id":"ref-for-connection\u2464\u24ea"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-connection\u2464\u2460"},{"id":"ref-for-connection\u2464\u2461"},{"id":"ref-for-connection\u2464\u2462"},{"id":"ref-for-connection\u2464\u2463"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-connection\u2464\u2464"},{"id":"ref-for-connection\u2464\u2465"},{"id":"ref-for-connection\u2464\u2466"},{"id":"ref-for-connection\u2464\u2467"},{"id":"ref-for-connection\u2464\u2468"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-connection\u2465\u24ea"},{"id":"ref-for-connection\u2465\u2460"},{"id":"ref-for-connection\u2465\u2461"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-connection\u2465\u2462"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-connection\u2465\u2463"},{"id":"ref-for-connection\u2465\u2464"},{"id":"ref-for-connection\u2465\u2465"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-connection\u2465\u2466"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#connection"}, "connection-close-pending-flag": {"dfnID":"connection-close-pending-flag","dfnText":"close pending flag","external":false,"refSections":[{"refs":[{"id":"ref-for-connection-close-pending-flag"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-connection-close-pending-flag\u2460"},{"id":"ref-for-connection-close-pending-flag\u2461"},{"id":"ref-for-connection-close-pending-flag\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-connection-close-pending-flag\u2463"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-connection-close-pending-flag\u2464"},{"id":"ref-for-connection-close-pending-flag\u2465"},{"id":"ref-for-connection-close-pending-flag\u2466"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-connection-close-pending-flag\u2467"}],"title":"5.3. Deleting a database"}],"url":"#connection-close-pending-flag"}, "connection-closed": {"dfnID":"connection-closed","dfnText":"closed","external":false,"refSections":[{"refs":[{"id":"ref-for-connection-closed"}],"title":"2.8.2. Connection queues"},{"refs":[{"id":"ref-for-connection-closed\u2460"},{"id":"ref-for-connection-closed\u2461"},{"id":"ref-for-connection-closed\u2462"},{"id":"ref-for-connection-closed\u2463"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-connection-closed\u2464"},{"id":"ref-for-connection-closed\u2465"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-connection-closed\u2466"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-connection-closed\u2467"}],"title":"5.3. Deleting a database"}],"url":"#connection-closed"}, "connection-object-store-set": {"dfnID":"connection-object-store-set","dfnText":"object store set","external":false,"refSections":[{"refs":[{"id":"ref-for-connection-object-store-set"},{"id":"ref-for-connection-object-store-set\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-connection-object-store-set\u2461"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-connection-object-store-set\u2462"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#connection-object-store-set"}, "connection-queue": {"dfnID":"connection-queue","dfnText":"connection queue","external":false,"refSections":[{"refs":[{"id":"ref-for-connection-queue"},{"id":"ref-for-connection-queue\u2460"}],"title":"2.8.2. Connection queues"},{"refs":[{"id":"ref-for-connection-queue\u2461"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-connection-queue\u2462"}],"title":"5.3. Deleting a database"}],"url":"#connection-queue"}, "connection-version": {"dfnID":"connection-version","dfnText":"version","external":false,"refSections":[{"refs":[{"id":"ref-for-connection-version"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-connection-version\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-connection-version\u2461"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-connection-version\u2462"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#connection-version"}, "containing-only": {"dfnID":"containing-only","dfnText":"containing only","external":false,"refSections":[{"refs":[{"id":"ref-for-containing-only"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-containing-only\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#containing-only"}, "convert-a-key-to-a-value": {"dfnID":"convert-a-key-to-a-value","dfnText":"convert a key to a value","external":false,"refSections":[{"refs":[{"id":"ref-for-convert-a-key-to-a-value"},{"id":"ref-for-convert-a-key-to-a-value\u2460"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-convert-a-key-to-a-value\u2461"},{"id":"ref-for-convert-a-key-to-a-value\u2462"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-convert-a-key-to-a-value\u2463"},{"id":"ref-for-convert-a-key-to-a-value\u2464"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-convert-a-key-to-a-value\u2465"},{"id":"ref-for-convert-a-key-to-a-value\u2466"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-convert-a-key-to-a-value\u2467"}],"title":"7.2. Inject a key into a value"},{"refs":[{"id":"ref-for-convert-a-key-to-a-value\u2468"}],"title":"7.3. Convert a key to a value"}],"url":"#convert-a-key-to-a-value"}, "convert-a-value-to-a-key": {"dfnID":"convert-a-value-to-a-key","dfnText":"convert a value to a key","external":false,"refSections":[{"refs":[{"id":"ref-for-convert-a-value-to-a-key"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-convert-a-value-to-a-key\u2460"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-convert-a-value-to-a-key\u2461"},{"id":"ref-for-convert-a-value-to-a-key\u2462"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-convert-a-value-to-a-key\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-convert-a-value-to-a-key\u2464"},{"id":"ref-for-convert-a-value-to-a-key\u2465"},{"id":"ref-for-convert-a-value-to-a-key\u2466"},{"id":"ref-for-convert-a-value-to-a-key\u2467"},{"id":"ref-for-convert-a-value-to-a-key\u2468"},{"id":"ref-for-convert-a-value-to-a-key\u2460\u24ea"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-convert-a-value-to-a-key\u2460\u2460"},{"id":"ref-for-convert-a-value-to-a-key\u2460\u2461"},{"id":"ref-for-convert-a-value-to-a-key\u2460\u2462"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-convert-a-value-to-a-key\u2460\u2463"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-convert-a-value-to-a-key\u2460\u2464"},{"id":"ref-for-convert-a-value-to-a-key\u2460\u2465"},{"id":"ref-for-convert-a-value-to-a-key\u2460\u2466"},{"id":"ref-for-convert-a-value-to-a-key\u2460\u2467"}],"title":"7.4. Convert a value to a key"}],"url":"#convert-a-value-to-a-key"}, "convert-a-value-to-a-key-range": {"dfnID":"convert-a-value-to-a-key-range","dfnText":"convert a value to a key range","external":false,"refSections":[{"refs":[{"id":"ref-for-convert-a-value-to-a-key-range"},{"id":"ref-for-convert-a-value-to-a-key-range\u2460"},{"id":"ref-for-convert-a-value-to-a-key-range\u2461"},{"id":"ref-for-convert-a-value-to-a-key-range\u2462"},{"id":"ref-for-convert-a-value-to-a-key-range\u2463"},{"id":"ref-for-convert-a-value-to-a-key-range\u2464"},{"id":"ref-for-convert-a-value-to-a-key-range\u2465"},{"id":"ref-for-convert-a-value-to-a-key-range\u2466"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-convert-a-value-to-a-key-range\u2467"},{"id":"ref-for-convert-a-value-to-a-key-range\u2468"},{"id":"ref-for-convert-a-value-to-a-key-range\u2460\u24ea"},{"id":"ref-for-convert-a-value-to-a-key-range\u2460\u2460"},{"id":"ref-for-convert-a-value-to-a-key-range\u2460\u2461"},{"id":"ref-for-convert-a-value-to-a-key-range\u2460\u2462"},{"id":"ref-for-convert-a-value-to-a-key-range\u2460\u2463"}],"title":"4.6. The IDBIndex interface"}],"url":"#convert-a-value-to-a-key-range"}, "convert-a-value-to-a-multientry-key": {"dfnID":"convert-a-value-to-a-multientry-key","dfnText":"convert a value to a multiEntry key","external":false,"refSections":[{"refs":[{"id":"ref-for-convert-a-value-to-a-multientry-key"}],"title":"7.1. Extract a key from a value"}],"url":"#convert-a-value-to-a-multientry-key"}, "count-the-records-in-a-range": {"dfnID":"count-the-records-in-a-range","dfnText":"count the records in a range","external":false,"refSections":[{"refs":[{"id":"ref-for-count-the-records-in-a-range"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-count-the-records-in-a-range\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"#count-the-records-in-a-range"}, "create-a-sorted-name-list": {"dfnID":"create-a-sorted-name-list","dfnText":"create a sorted name list","external":false,"refSections":[{"refs":[{"id":"ref-for-create-a-sorted-name-list"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-create-a-sorted-name-list\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-create-a-sorted-name-list\u2461"}],"title":"4.9. The IDBTransaction interface"}],"url":"#create-a-sorted-name-list"}, "cursor": {"dfnID":"cursor","dfnText":"cursor","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-cursor\u2460"},{"id":"ref-for-cursor\u2461"},{"id":"ref-for-cursor\u2462"},{"id":"ref-for-cursor\u2463"},{"id":"ref-for-cursor\u2464"},{"id":"ref-for-cursor\u2465"},{"id":"ref-for-cursor\u2466"},{"id":"ref-for-cursor\u2467"},{"id":"ref-for-cursor\u2468"},{"id":"ref-for-cursor\u2460\u24ea"},{"id":"ref-for-cursor\u2460\u2460"},{"id":"ref-for-cursor\u2460\u2461"},{"id":"ref-for-cursor\u2460\u2462"},{"id":"ref-for-cursor\u2460\u2463"},{"id":"ref-for-cursor\u2460\u2464"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-cursor\u2460\u2465"},{"id":"ref-for-cursor\u2460\u2466"},{"id":"ref-for-cursor\u2460\u2467"},{"id":"ref-for-cursor\u2460\u2468"},{"id":"ref-for-cursor\u2461\u24ea"},{"id":"ref-for-cursor\u2461\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor\u2461\u2461"},{"id":"ref-for-cursor\u2461\u2462"},{"id":"ref-for-cursor\u2461\u2463"},{"id":"ref-for-cursor\u2461\u2464"},{"id":"ref-for-cursor\u2461\u2465"},{"id":"ref-for-cursor\u2461\u2466"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor\u2461\u2467"},{"id":"ref-for-cursor\u2461\u2468"},{"id":"ref-for-cursor\u2462\u24ea"},{"id":"ref-for-cursor\u2462\u2460"},{"id":"ref-for-cursor\u2462\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"#cursor"}, "cursor-direction": {"dfnID":"cursor-direction","dfnText":"direction","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-direction"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-cursor-direction\u2460"},{"id":"ref-for-cursor-direction\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-direction\u2462"},{"id":"ref-for-cursor-direction\u2463"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-direction\u2464"},{"id":"ref-for-cursor-direction\u2465"},{"id":"ref-for-cursor-direction\u2466"},{"id":"ref-for-cursor-direction\u2467"},{"id":"ref-for-cursor-direction\u2468"},{"id":"ref-for-cursor-direction\u2460\u24ea"},{"id":"ref-for-cursor-direction\u2460\u2460"},{"id":"ref-for-cursor-direction\u2460\u2461"},{"id":"ref-for-cursor-direction\u2460\u2462"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-cursor-direction\u2460\u2463"}],"title":"6.7. Cursor iteration operation"}],"url":"#cursor-direction"}, "cursor-effective-key": {"dfnID":"cursor-effective-key","dfnText":"effective key","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-effective-key"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-cursor-effective-key\u2460"},{"id":"ref-for-cursor-effective-key\u2461"},{"id":"ref-for-cursor-effective-key\u2462"},{"id":"ref-for-cursor-effective-key\u2463"},{"id":"ref-for-cursor-effective-key\u2464"},{"id":"ref-for-cursor-effective-key\u2465"}],"title":"4.8. The IDBCursor interface"}],"url":"#cursor-effective-key"}, "cursor-effective-object-store": {"dfnID":"cursor-effective-object-store","dfnText":"effective object store","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-effective-object-store"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-cursor-effective-object-store\u2460"},{"id":"ref-for-cursor-effective-object-store\u2461"},{"id":"ref-for-cursor-effective-object-store\u2462"},{"id":"ref-for-cursor-effective-object-store\u2463"},{"id":"ref-for-cursor-effective-object-store\u2464"},{"id":"ref-for-cursor-effective-object-store\u2465"},{"id":"ref-for-cursor-effective-object-store\u2466"},{"id":"ref-for-cursor-effective-object-store\u2467"},{"id":"ref-for-cursor-effective-object-store\u2468"},{"id":"ref-for-cursor-effective-object-store\u2460\u24ea"}],"title":"4.8. The IDBCursor interface"}],"url":"#cursor-effective-object-store"}, "cursor-got-value-flag": {"dfnID":"cursor-got-value-flag","dfnText":"got value flag","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-got-value-flag"},{"id":"ref-for-cursor-got-value-flag\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-got-value-flag\u2461"},{"id":"ref-for-cursor-got-value-flag\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-got-value-flag\u2463"},{"id":"ref-for-cursor-got-value-flag\u2464"},{"id":"ref-for-cursor-got-value-flag\u2465"},{"id":"ref-for-cursor-got-value-flag\u2466"},{"id":"ref-for-cursor-got-value-flag\u2467"},{"id":"ref-for-cursor-got-value-flag\u2468"},{"id":"ref-for-cursor-got-value-flag\u2460\u24ea"},{"id":"ref-for-cursor-got-value-flag\u2460\u2460"},{"id":"ref-for-cursor-got-value-flag\u2460\u2461"},{"id":"ref-for-cursor-got-value-flag\u2460\u2462"},{"id":"ref-for-cursor-got-value-flag\u2460\u2463"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-cursor-got-value-flag\u2460\u2464"}],"title":"6.7. Cursor iteration operation"}],"url":"#cursor-got-value-flag"}, "cursor-key": {"dfnID":"cursor-key","dfnText":"key","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-key"},{"id":"ref-for-cursor-key\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-key\u2461"},{"id":"ref-for-cursor-key\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-key\u2463"},{"id":"ref-for-cursor-key\u2464"},{"id":"ref-for-cursor-key\u2465"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-cursor-key\u2466"},{"id":"ref-for-cursor-key\u2467"}],"title":"6.7. Cursor iteration operation"}],"url":"#cursor-key"}, "cursor-key-only-flag": {"dfnID":"cursor-key-only-flag","dfnText":"key only flag","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-key-only-flag"},{"id":"ref-for-cursor-key-only-flag\u2460"},{"id":"ref-for-cursor-key-only-flag\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-key-only-flag\u2462"},{"id":"ref-for-cursor-key-only-flag\u2463"},{"id":"ref-for-cursor-key-only-flag\u2464"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-key-only-flag\u2465"},{"id":"ref-for-cursor-key-only-flag\u2466"},{"id":"ref-for-cursor-key-only-flag\u2467"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-cursor-key-only-flag\u2468"},{"id":"ref-for-cursor-key-only-flag\u2460\u24ea"}],"title":"6.7. Cursor iteration operation"}],"url":"#cursor-key-only-flag"}, "cursor-object-store-position": {"dfnID":"cursor-object-store-position","dfnText":"object store position","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-object-store-position"},{"id":"ref-for-cursor-object-store-position\u2460"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-cursor-object-store-position\u2461"},{"id":"ref-for-cursor-object-store-position\u2462"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-cursor-object-store-position\u2463"},{"id":"ref-for-cursor-object-store-position\u2464"},{"id":"ref-for-cursor-object-store-position\u2465"}],"title":"6.7. Cursor iteration operation"}],"url":"#cursor-object-store-position"}, "cursor-position": {"dfnID":"cursor-position","dfnText":"position","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-position"},{"id":"ref-for-cursor-position\u2460"},{"id":"ref-for-cursor-position\u2461"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-cursor-position\u2462"},{"id":"ref-for-cursor-position\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-position\u2464"},{"id":"ref-for-cursor-position\u2465"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-position\u2466"},{"id":"ref-for-cursor-position\u2467"},{"id":"ref-for-cursor-position\u2468"},{"id":"ref-for-cursor-position\u2460\u24ea"},{"id":"ref-for-cursor-position\u2460\u2460"},{"id":"ref-for-cursor-position\u2460\u2461"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-cursor-position\u2460\u2462"},{"id":"ref-for-cursor-position\u2460\u2463"}],"title":"6.7. Cursor iteration operation"}],"url":"#cursor-position"}, "cursor-range": {"dfnID":"cursor-range","dfnText":"range","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-range"},{"id":"ref-for-cursor-range\u2460"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-cursor-range\u2461"},{"id":"ref-for-cursor-range\u2462"},{"id":"ref-for-cursor-range\u2463"},{"id":"ref-for-cursor-range\u2464"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-range\u2465"},{"id":"ref-for-cursor-range\u2466"},{"id":"ref-for-cursor-range\u2467"},{"id":"ref-for-cursor-range\u2468"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-range\u2460\u24ea"}],"title":"6.7. Cursor iteration operation"}],"url":"#cursor-range"}, "cursor-request": {"dfnID":"cursor-request","dfnText":"request","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-request"},{"id":"ref-for-cursor-request\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-request\u2461"},{"id":"ref-for-cursor-request\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-request\u2463"},{"id":"ref-for-cursor-request\u2464"},{"id":"ref-for-cursor-request\u2465"},{"id":"ref-for-cursor-request\u2466"},{"id":"ref-for-cursor-request\u2467"}],"title":"4.8. The IDBCursor interface"}],"url":"#cursor-request"}, "cursor-source": {"dfnID":"cursor-source","dfnText":"source","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-source"},{"id":"ref-for-cursor-source\u2460"},{"id":"ref-for-cursor-source\u2461"},{"id":"ref-for-cursor-source\u2462"},{"id":"ref-for-cursor-source\u2463"},{"id":"ref-for-cursor-source\u2464"},{"id":"ref-for-cursor-source\u2465"},{"id":"ref-for-cursor-source\u2466"},{"id":"ref-for-cursor-source\u2467"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-cursor-source\u2468"},{"id":"ref-for-cursor-source\u2460\u24ea"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-source\u2460\u2460"},{"id":"ref-for-cursor-source\u2460\u2461"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-source\u2460\u2462"},{"id":"ref-for-cursor-source\u2460\u2463"},{"id":"ref-for-cursor-source\u2460\u2464"},{"id":"ref-for-cursor-source\u2460\u2465"},{"id":"ref-for-cursor-source\u2460\u2466"},{"id":"ref-for-cursor-source\u2460\u2467"},{"id":"ref-for-cursor-source\u2460\u2468"},{"id":"ref-for-cursor-source\u2461\u24ea"},{"id":"ref-for-cursor-source\u2461\u2460"},{"id":"ref-for-cursor-source\u2461\u2461"},{"id":"ref-for-cursor-source\u2461\u2462"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-cursor-source\u2461\u2463"}],"title":"6.7. Cursor iteration operation"}],"url":"#cursor-source"}, "cursor-transaction": {"dfnID":"cursor-transaction","dfnText":"transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-transaction"},{"id":"ref-for-cursor-transaction\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-transaction\u2461"},{"id":"ref-for-cursor-transaction\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-transaction\u2463"},{"id":"ref-for-cursor-transaction\u2464"},{"id":"ref-for-cursor-transaction\u2465"},{"id":"ref-for-cursor-transaction\u2466"},{"id":"ref-for-cursor-transaction\u2467"}],"title":"4.8. The IDBCursor interface"}],"url":"#cursor-transaction"}, "cursor-value": {"dfnID":"cursor-value","dfnText":"value","external":false,"refSections":[{"refs":[{"id":"ref-for-cursor-value"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-cursor-value\u2460"},{"id":"ref-for-cursor-value\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-cursor-value\u2462"},{"id":"ref-for-cursor-value\u2463"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-cursor-value\u2464"},{"id":"ref-for-cursor-value\u2465"},{"id":"ref-for-cursor-value\u2466"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-cursor-value\u2467"},{"id":"ref-for-cursor-value\u2468"}],"title":"6.7. Cursor iteration operation"}],"url":"#cursor-value"}, "d0b4a948": {"dfnID":"d0b4a948","dfnText":"a promise rejected with","external":true,"refSections":[{"refs":[{"id":"ref-for-a-promise-rejected-with"}],"title":"4.3. The IDBFactory interface"}],"url":"https://webidl.spec.whatwg.org/#a-promise-rejected-with"}, "d25dfb2c": {"dfnID":"d25dfb2c","dfnText":"AbortError","external":true,"refSections":[{"refs":[{"id":"ref-for-aborterror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-aborterror\u2460"},{"id":"ref-for-aborterror\u2461"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-aborterror\u2462"},{"id":"ref-for-aborterror\u2463"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-aborterror\u2464"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-aborterror\u2465"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-aborterror\u2466"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-aborterror\u2467"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-aborterror\u2468"},{"id":"ref-for-aborterror\u2460\u24ea"}],"title":"5.10. Firing an error event"}],"url":"https://webidl.spec.whatwg.org/#aborterror"}, "d2c61922": {"dfnID":"d2c61922","dfnText":"CreateDataProperty","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-createdataproperty"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-sec-createdataproperty\u2460"},{"id":"ref-for-sec-createdataproperty\u2461"}],"title":"7.2. Inject a key into a value"},{"refs":[{"id":"ref-for-sec-createdataproperty\u2462"}],"title":"7.3. Convert a key to a value"}],"url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty"}, "d54f5897": {"dfnID":"d54f5897","dfnText":"DataCloneError","external":true,"refSections":[{"refs":[{"id":"ref-for-datacloneerror"}],"title":"3. Exceptions"}],"url":"https://webidl.spec.whatwg.org/#datacloneerror"}, "d609dea6": {"dfnID":"d609dea6","dfnText":"ReturnIfAbrupt","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-returnifabrupt"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.github.io/ecma262/#sec-returnifabrupt"}, "d6b0abab": {"dfnID":"d6b0abab","dfnText":"TransactionInactiveError","external":true,"refSections":[{"refs":[{"id":"ref-for-transactioninactiveerror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-transactioninactiveerror\u2460"},{"id":"ref-for-transactioninactiveerror\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-transactioninactiveerror\u2462"},{"id":"ref-for-transactioninactiveerror\u2463"},{"id":"ref-for-transactioninactiveerror\u2464"},{"id":"ref-for-transactioninactiveerror\u2465"},{"id":"ref-for-transactioninactiveerror\u2466"},{"id":"ref-for-transactioninactiveerror\u2467"},{"id":"ref-for-transactioninactiveerror\u2468"},{"id":"ref-for-transactioninactiveerror\u2460\u24ea"},{"id":"ref-for-transactioninactiveerror\u2460\u2460"},{"id":"ref-for-transactioninactiveerror\u2460\u2461"},{"id":"ref-for-transactioninactiveerror\u2460\u2462"},{"id":"ref-for-transactioninactiveerror\u2460\u2463"},{"id":"ref-for-transactioninactiveerror\u2460\u2464"},{"id":"ref-for-transactioninactiveerror\u2460\u2465"},{"id":"ref-for-transactioninactiveerror\u2460\u2466"},{"id":"ref-for-transactioninactiveerror\u2460\u2467"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-transactioninactiveerror\u2460\u2468"},{"id":"ref-for-transactioninactiveerror\u2461\u24ea"},{"id":"ref-for-transactioninactiveerror\u2461\u2460"},{"id":"ref-for-transactioninactiveerror\u2461\u2461"},{"id":"ref-for-transactioninactiveerror\u2461\u2462"},{"id":"ref-for-transactioninactiveerror\u2461\u2463"},{"id":"ref-for-transactioninactiveerror\u2461\u2464"},{"id":"ref-for-transactioninactiveerror\u2461\u2465"},{"id":"ref-for-transactioninactiveerror\u2461\u2466"},{"id":"ref-for-transactioninactiveerror\u2461\u2467"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-transactioninactiveerror\u2461\u2468"},{"id":"ref-for-transactioninactiveerror\u2462\u24ea"},{"id":"ref-for-transactioninactiveerror\u2462\u2460"},{"id":"ref-for-transactioninactiveerror\u2462\u2461"},{"id":"ref-for-transactioninactiveerror\u2462\u2462"},{"id":"ref-for-transactioninactiveerror\u2462\u2463"},{"id":"ref-for-transactioninactiveerror\u2462\u2464"}],"title":"4.8. The IDBCursor interface"}],"url":"https://webidl.spec.whatwg.org/#transactioninactiveerror"}, "dacde8b5": {"dfnID":"dacde8b5","dfnText":"a new promise","external":true,"refSections":[{"refs":[{"id":"ref-for-a-new-promise"}],"title":"4.3. The IDBFactory interface"}],"url":"https://webidl.spec.whatwg.org/#a-new-promise"}, "database": {"dfnID":"database","dfnText":"database","external":false,"refSections":[{"refs":[{"id":"ref-for-database"},{"id":"ref-for-database\u2460"},{"id":"ref-for-database\u2461"},{"id":"ref-for-database\u2462"},{"id":"ref-for-database\u2463"},{"id":"ref-for-database\u2464"}],"title":"2.1. Database"},{"refs":[{"id":"ref-for-database\u2465"},{"id":"ref-for-database\u2466"},{"id":"ref-for-database\u2467"},{"id":"ref-for-database\u2468"},{"id":"ref-for-database\u2460\u24ea"},{"id":"ref-for-database\u2460\u2460"},{"id":"ref-for-database\u2460\u2461"},{"id":"ref-for-database\u2460\u2462"},{"id":"ref-for-database\u2460\u2463"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-database\u2460\u2464"},{"id":"ref-for-database\u2460\u2465"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-database\u2460\u2466"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-database\u2460\u2467"},{"id":"ref-for-database\u2460\u2468"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-database\u2461\u24ea"}],"title":"2.7.2. Transaction scheduling"},{"refs":[{"id":"ref-for-database\u2461\u2460"},{"id":"ref-for-database\u2461\u2461"},{"id":"ref-for-database\u2461\u2462"},{"id":"ref-for-database\u2461\u2463"},{"id":"ref-for-database\u2461\u2464"},{"id":"ref-for-database\u2461\u2465"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-database\u2461\u2466"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-database\u2461\u2467"}],"title":"2.8.1. Open requests"},{"refs":[{"id":"ref-for-database\u2461\u2468"},{"id":"ref-for-database\u2462\u24ea"},{"id":"ref-for-database\u2462\u2460"},{"id":"ref-for-database\u2462\u2461"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-database\u2462\u2462"},{"id":"ref-for-database\u2462\u2463"},{"id":"ref-for-database\u2462\u2464"},{"id":"ref-for-database\u2462\u2465"},{"id":"ref-for-database\u2462\u2466"},{"id":"ref-for-database\u2462\u2467"},{"id":"ref-for-database\u2462\u2468"},{"id":"ref-for-database\u2463\u24ea"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-database\u2463\u2460"},{"id":"ref-for-database\u2463\u2461"},{"id":"ref-for-database\u2463\u2462"},{"id":"ref-for-database\u2463\u2463"},{"id":"ref-for-database\u2463\u2464"},{"id":"ref-for-database\u2463\u2465"},{"id":"ref-for-database\u2463\u2466"},{"id":"ref-for-database\u2463\u2467"},{"id":"ref-for-database\u2463\u2468"},{"id":"ref-for-database\u2464\u24ea"},{"id":"ref-for-database\u2464\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-database\u2464\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-database\u2464\u2462"},{"id":"ref-for-database\u2464\u2463"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-database\u2464\u2464"},{"id":"ref-for-database\u2464\u2465"},{"id":"ref-for-database\u2464\u2466"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-database\u2464\u2467"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-database\u2464\u2468"},{"id":"ref-for-database\u2465\u24ea"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-database\u2465\u2460"},{"id":"ref-for-database\u2465\u2461"},{"id":"ref-for-database\u2465\u2462"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-database\u2465\u2463"},{"id":"ref-for-database\u2465\u2464"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-database\u2465\u2465"},{"id":"ref-for-database\u2465\u2466"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-database\u2465\u2467"},{"id":"ref-for-database\u2465\u2468"},{"id":"ref-for-database\u2466\u24ea"}],"title":"5.8. Aborting an upgrade transaction"},{"refs":[{"id":"ref-for-database\u2466\u2460"}],"title":"6. Database operations"}],"url":"#database"}, "database-access-task-source": {"dfnID":"database-access-task-source","dfnText":"database access task source","external":false,"refSections":[],"url":"#database-access-task-source"}, "database-name": {"dfnID":"database-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-database-name"}],"title":"2.8.2. Connection queues"},{"refs":[{"id":"ref-for-database-name\u2460"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-database-name\u2461"},{"id":"ref-for-database-name\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-database-name\u2463"},{"id":"ref-for-database-name\u2464"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-database-name\u2465"}],"title":"5.3. Deleting a database"}],"url":"#database-name"}, "database-upgrade-transaction": {"dfnID":"database-upgrade-transaction","dfnText":"upgrade transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-database-upgrade-transaction"},{"id":"ref-for-database-upgrade-transaction\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-database-upgrade-transaction\u2461"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-database-upgrade-transaction\u2462"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-database-upgrade-transaction\u2463"}],"title":"5.7. Upgrading a database"}],"url":"#database-upgrade-transaction"}, "database-version": {"dfnID":"database-version","dfnText":"version","external":false,"refSections":[{"refs":[{"id":"ref-for-database-version"}],"title":"2.1. Database"},{"refs":[{"id":"ref-for-database-version\u2460"},{"id":"ref-for-database-version\u2461"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-database-version\u2462"},{"id":"ref-for-database-version\u2463"},{"id":"ref-for-database-version\u2464"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-database-version\u2465"},{"id":"ref-for-database-version\u2466"},{"id":"ref-for-database-version\u2467"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-database-version\u2468"},{"id":"ref-for-database-version\u2460\u24ea"},{"id":"ref-for-database-version\u2460\u2460"},{"id":"ref-for-database-version\u2460\u2461"},{"id":"ref-for-database-version\u2460\u2462"},{"id":"ref-for-database-version\u2460\u2463"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-database-version\u2460\u2464"},{"id":"ref-for-database-version\u2460\u2465"},{"id":"ref-for-database-version\u2460\u2466"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-database-version\u2460\u2467"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-database-version\u2460\u2468"},{"id":"ref-for-database-version\u2461\u24ea"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-database-version\u2461\u2460"},{"id":"ref-for-database-version\u2461\u2461"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#database-version"}, "dca2de17": {"dfnID":"dca2de17","dfnText":"DOMException","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-DOMException"},{"id":"ref-for-idl-DOMException\u2460"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-idl-DOMException\u2461"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-idl-DOMException\u2462"},{"id":"ref-for-idl-DOMException\u2463"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-idl-DOMException\u2464"},{"id":"ref-for-idl-DOMException\u2465"},{"id":"ref-for-idl-DOMException\u2466"},{"id":"ref-for-idl-DOMException\u2467"},{"id":"ref-for-idl-DOMException\u2468"},{"id":"ref-for-idl-DOMException\u2460\u24ea"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2460"},{"id":"ref-for-idl-DOMException\u2460\u2461"},{"id":"ref-for-idl-DOMException\u2460\u2462"},{"id":"ref-for-idl-DOMException\u2460\u2463"},{"id":"ref-for-idl-DOMException\u2460\u2464"},{"id":"ref-for-idl-DOMException\u2460\u2465"},{"id":"ref-for-idl-DOMException\u2460\u2466"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2467"},{"id":"ref-for-idl-DOMException\u2460\u2468"},{"id":"ref-for-idl-DOMException\u2461\u24ea"},{"id":"ref-for-idl-DOMException\u2461\u2460"},{"id":"ref-for-idl-DOMException\u2461\u2461"},{"id":"ref-for-idl-DOMException\u2461\u2462"},{"id":"ref-for-idl-DOMException\u2461\u2463"},{"id":"ref-for-idl-DOMException\u2461\u2464"},{"id":"ref-for-idl-DOMException\u2461\u2465"},{"id":"ref-for-idl-DOMException\u2461\u2466"},{"id":"ref-for-idl-DOMException\u2461\u2467"},{"id":"ref-for-idl-DOMException\u2461\u2468"},{"id":"ref-for-idl-DOMException\u2462\u24ea"},{"id":"ref-for-idl-DOMException\u2462\u2460"},{"id":"ref-for-idl-DOMException\u2462\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-idl-DOMException\u2462\u2462"},{"id":"ref-for-idl-DOMException\u2462\u2463"},{"id":"ref-for-idl-DOMException\u2462\u2464"},{"id":"ref-for-idl-DOMException\u2462\u2465"},{"id":"ref-for-idl-DOMException\u2462\u2466"},{"id":"ref-for-idl-DOMException\u2462\u2467"},{"id":"ref-for-idl-DOMException\u2462\u2468"},{"id":"ref-for-idl-DOMException\u2463\u24ea"},{"id":"ref-for-idl-DOMException\u2463\u2460"},{"id":"ref-for-idl-DOMException\u2463\u2461"},{"id":"ref-for-idl-DOMException\u2463\u2462"},{"id":"ref-for-idl-DOMException\u2463\u2463"},{"id":"ref-for-idl-DOMException\u2463\u2464"},{"id":"ref-for-idl-DOMException\u2463\u2465"},{"id":"ref-for-idl-DOMException\u2463\u2466"},{"id":"ref-for-idl-DOMException\u2463\u2467"},{"id":"ref-for-idl-DOMException\u2463\u2468"},{"id":"ref-for-idl-DOMException\u2464\u24ea"},{"id":"ref-for-idl-DOMException\u2464\u2460"},{"id":"ref-for-idl-DOMException\u2464\u2461"},{"id":"ref-for-idl-DOMException\u2464\u2462"},{"id":"ref-for-idl-DOMException\u2464\u2463"},{"id":"ref-for-idl-DOMException\u2464\u2464"},{"id":"ref-for-idl-DOMException\u2464\u2465"},{"id":"ref-for-idl-DOMException\u2464\u2466"},{"id":"ref-for-idl-DOMException\u2464\u2467"},{"id":"ref-for-idl-DOMException\u2464\u2468"},{"id":"ref-for-idl-DOMException\u2465\u24ea"},{"id":"ref-for-idl-DOMException\u2465\u2460"},{"id":"ref-for-idl-DOMException\u2465\u2461"},{"id":"ref-for-idl-DOMException\u2465\u2462"},{"id":"ref-for-idl-DOMException\u2465\u2463"},{"id":"ref-for-idl-DOMException\u2465\u2464"},{"id":"ref-for-idl-DOMException\u2465\u2465"},{"id":"ref-for-idl-DOMException\u2465\u2466"},{"id":"ref-for-idl-DOMException\u2465\u2467"},{"id":"ref-for-idl-DOMException\u2465\u2468"},{"id":"ref-for-idl-DOMException\u2466\u24ea"},{"id":"ref-for-idl-DOMException\u2466\u2460"},{"id":"ref-for-idl-DOMException\u2466\u2461"},{"id":"ref-for-idl-DOMException\u2466\u2462"},{"id":"ref-for-idl-DOMException\u2466\u2463"},{"id":"ref-for-idl-DOMException\u2466\u2464"},{"id":"ref-for-idl-DOMException\u2466\u2465"},{"id":"ref-for-idl-DOMException\u2466\u2466"},{"id":"ref-for-idl-DOMException\u2466\u2467"},{"id":"ref-for-idl-DOMException\u2466\u2468"},{"id":"ref-for-idl-DOMException\u2467\u24ea"},{"id":"ref-for-idl-DOMException\u2467\u2460"},{"id":"ref-for-idl-DOMException\u2467\u2461"},{"id":"ref-for-idl-DOMException\u2467\u2462"},{"id":"ref-for-idl-DOMException\u2467\u2463"},{"id":"ref-for-idl-DOMException\u2467\u2464"},{"id":"ref-for-idl-DOMException\u2467\u2465"},{"id":"ref-for-idl-DOMException\u2467\u2466"},{"id":"ref-for-idl-DOMException\u2467\u2467"},{"id":"ref-for-idl-DOMException\u2467\u2468"},{"id":"ref-for-idl-DOMException\u2468\u24ea"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idl-DOMException\u2468\u2460"},{"id":"ref-for-idl-DOMException\u2468\u2461"},{"id":"ref-for-idl-DOMException\u2468\u2462"},{"id":"ref-for-idl-DOMException\u2468\u2463"},{"id":"ref-for-idl-DOMException\u2468\u2464"},{"id":"ref-for-idl-DOMException\u2468\u2465"},{"id":"ref-for-idl-DOMException\u2468\u2466"},{"id":"ref-for-idl-DOMException\u2468\u2467"},{"id":"ref-for-idl-DOMException\u2468\u2468"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u24ea"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u2460"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u2461"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u2462"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u2463"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u2464"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u2465"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u2466"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u2467"},{"id":"ref-for-idl-DOMException\u2460\u24ea\u2468"},{"id":"ref-for-idl-DOMException\u2460\u2460\u24ea"},{"id":"ref-for-idl-DOMException\u2460\u2460\u2460"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2460\u2461"},{"id":"ref-for-idl-DOMException\u2460\u2460\u2462"},{"id":"ref-for-idl-DOMException\u2460\u2460\u2463"},{"id":"ref-for-idl-DOMException\u2460\u2460\u2464"},{"id":"ref-for-idl-DOMException\u2460\u2460\u2465"},{"id":"ref-for-idl-DOMException\u2460\u2460\u2466"},{"id":"ref-for-idl-DOMException\u2460\u2460\u2467"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2460\u2468"},{"id":"ref-for-idl-DOMException\u2460\u2461\u24ea"},{"id":"ref-for-idl-DOMException\u2460\u2461\u2460"},{"id":"ref-for-idl-DOMException\u2460\u2461\u2461"},{"id":"ref-for-idl-DOMException\u2460\u2461\u2462"},{"id":"ref-for-idl-DOMException\u2460\u2461\u2463"},{"id":"ref-for-idl-DOMException\u2460\u2461\u2464"},{"id":"ref-for-idl-DOMException\u2460\u2461\u2465"},{"id":"ref-for-idl-DOMException\u2460\u2461\u2466"},{"id":"ref-for-idl-DOMException\u2460\u2461\u2467"},{"id":"ref-for-idl-DOMException\u2460\u2461\u2468"},{"id":"ref-for-idl-DOMException\u2460\u2462\u24ea"},{"id":"ref-for-idl-DOMException\u2460\u2462\u2460"},{"id":"ref-for-idl-DOMException\u2460\u2462\u2461"},{"id":"ref-for-idl-DOMException\u2460\u2462\u2462"},{"id":"ref-for-idl-DOMException\u2460\u2462\u2463"},{"id":"ref-for-idl-DOMException\u2460\u2462\u2464"},{"id":"ref-for-idl-DOMException\u2460\u2462\u2465"},{"id":"ref-for-idl-DOMException\u2460\u2462\u2466"},{"id":"ref-for-idl-DOMException\u2460\u2462\u2467"},{"id":"ref-for-idl-DOMException\u2460\u2462\u2468"},{"id":"ref-for-idl-DOMException\u2460\u2463\u24ea"},{"id":"ref-for-idl-DOMException\u2460\u2463\u2460"},{"id":"ref-for-idl-DOMException\u2460\u2463\u2461"},{"id":"ref-for-idl-DOMException\u2460\u2463\u2462"},{"id":"ref-for-idl-DOMException\u2460\u2463\u2463"},{"id":"ref-for-idl-DOMException\u2460\u2463\u2464"},{"id":"ref-for-idl-DOMException\u2460\u2463\u2465"},{"id":"ref-for-idl-DOMException\u2460\u2463\u2466"},{"id":"ref-for-idl-DOMException\u2460\u2463\u2467"},{"id":"ref-for-idl-DOMException\u2460\u2463\u2468"},{"id":"ref-for-idl-DOMException\u2460\u2464\u24ea"},{"id":"ref-for-idl-DOMException\u2460\u2464\u2460"},{"id":"ref-for-idl-DOMException\u2460\u2464\u2461"},{"id":"ref-for-idl-DOMException\u2460\u2464\u2462"},{"id":"ref-for-idl-DOMException\u2460\u2464\u2463"},{"id":"ref-for-idl-DOMException\u2460\u2464\u2464"},{"id":"ref-for-idl-DOMException\u2460\u2464\u2465"},{"id":"ref-for-idl-DOMException\u2460\u2464\u2466"},{"id":"ref-for-idl-DOMException\u2460\u2464\u2467"},{"id":"ref-for-idl-DOMException\u2460\u2464\u2468"},{"id":"ref-for-idl-DOMException\u2460\u2465\u24ea"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2465\u2460"},{"id":"ref-for-idl-DOMException\u2460\u2465\u2461"},{"id":"ref-for-idl-DOMException\u2460\u2465\u2462"},{"id":"ref-for-idl-DOMException\u2460\u2465\u2463"},{"id":"ref-for-idl-DOMException\u2460\u2465\u2464"},{"id":"ref-for-idl-DOMException\u2460\u2465\u2465"},{"id":"ref-for-idl-DOMException\u2460\u2465\u2466"},{"id":"ref-for-idl-DOMException\u2460\u2465\u2467"},{"id":"ref-for-idl-DOMException\u2460\u2465\u2468"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2466\u24ea"},{"id":"ref-for-idl-DOMException\u2460\u2466\u2460"},{"id":"ref-for-idl-DOMException\u2460\u2466\u2461"},{"id":"ref-for-idl-DOMException\u2460\u2466\u2462"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2466\u2463"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2466\u2464"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2466\u2465"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2466\u2466"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2466\u2467"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2466\u2468"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2467\u24ea"}],"title":"5.10. Firing an error event"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2467\u2460"},{"id":"ref-for-idl-DOMException\u2460\u2467\u2461"},{"id":"ref-for-idl-DOMException\u2460\u2467\u2462"},{"id":"ref-for-idl-DOMException\u2460\u2467\u2463"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2467\u2464"},{"id":"ref-for-idl-DOMException\u2460\u2467\u2465"},{"id":"ref-for-idl-DOMException\u2460\u2467\u2466"},{"id":"ref-for-idl-DOMException\u2460\u2467\u2467"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-idl-DOMException\u2460\u2467\u2468"}],"title":"11. Revision history"}],"url":"https://webidl.spec.whatwg.org/#idl-DOMException"}, "delete-a-database": {"dfnID":"delete-a-database","dfnText":"delete a database","external":false,"refSections":[{"refs":[{"id":"ref-for-delete-a-database"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-delete-a-database\u2460"}],"title":"5.2. Closing a database connection"}],"url":"#delete-a-database"}, "delete-records-from-an-object-store": {"dfnID":"delete-records-from-an-object-store","dfnText":"delete records from an object store","external":false,"refSections":[{"refs":[{"id":"ref-for-delete-records-from-an-object-store"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-delete-records-from-an-object-store\u2460"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-delete-records-from-an-object-store\u2461"}],"title":"6.1. Object store storage operation"}],"url":"#delete-records-from-an-object-store"}, "dictdef-idbdatabaseinfo": {"dfnID":"dictdef-idbdatabaseinfo","dfnText":"IDBDatabaseInfo","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-idbdatabaseinfo"},{"id":"ref-for-dictdef-idbdatabaseinfo\u2460"}],"title":"4.3. The IDBFactory interface"}],"url":"#dictdef-idbdatabaseinfo"}, "dictdef-idbindexparameters": {"dfnID":"dictdef-idbindexparameters","dfnText":"IDBIndexParameters","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-idbindexparameters"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dictdef-idbindexparameters"}, "dictdef-idbobjectstoreparameters": {"dfnID":"dictdef-idbobjectstoreparameters","dfnText":"IDBObjectStoreParameters","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-idbobjectstoreparameters"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dictdef-idbobjectstoreparameters"}, "dictdef-idbtransactionoptions": {"dfnID":"dictdef-idbtransactionoptions","dfnText":"IDBTransactionOptions","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-idbtransactionoptions"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dictdef-idbtransactionoptions"}, "dictdef-idbversionchangeeventinit": {"dfnID":"dictdef-idbversionchangeeventinit","dfnText":"IDBVersionChangeEventInit","external":false,"refSections":[{"refs":[{"id":"ref-for-dictdef-idbversionchangeeventinit"}],"title":"4.2. Event interfaces"}],"url":"#dictdef-idbversionchangeeventinit"}, "dom-idbcursor-advance": {"dfnID":"dom-idbcursor-advance","dfnText":"advance(count)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-advance"},{"id":"ref-for-dom-idbcursor-advance\u2460"},{"id":"ref-for-dom-idbcursor-advance\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursor-advance"}, "dom-idbcursor-advance-count-count": {"dfnID":"dom-idbcursor-advance-count-count","dfnText":"count","external":false,"refSections":[],"url":"#dom-idbcursor-advance-count-count"}, "dom-idbcursor-continue": {"dfnID":"dom-idbcursor-continue","dfnText":"continue(key)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-continue"},{"id":"ref-for-dom-idbcursor-continue\u2460"},{"id":"ref-for-dom-idbcursor-continue\u2461"},{"id":"ref-for-dom-idbcursor-continue\u2462"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursor-continue"}, "dom-idbcursor-continue-key-key": {"dfnID":"dom-idbcursor-continue-key-key","dfnText":"key","external":false,"refSections":[],"url":"#dom-idbcursor-continue-key-key"}, "dom-idbcursor-continueprimarykey": {"dfnID":"dom-idbcursor-continueprimarykey","dfnText":"continuePrimaryKey(key, primaryKey)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-continueprimarykey"},{"id":"ref-for-dom-idbcursor-continueprimarykey\u2460"},{"id":"ref-for-dom-idbcursor-continueprimarykey\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursor-continueprimarykey"}, "dom-idbcursor-continueprimarykey-key-primarykey-key": {"dfnID":"dom-idbcursor-continueprimarykey-key-primarykey-key","dfnText":"key","external":false,"refSections":[],"url":"#dom-idbcursor-continueprimarykey-key-primarykey-key"}, "dom-idbcursor-continueprimarykey-key-primarykey-primarykey": {"dfnID":"dom-idbcursor-continueprimarykey-key-primarykey-primarykey","dfnText":"primaryKey","external":false,"refSections":[],"url":"#dom-idbcursor-continueprimarykey-key-primarykey-primarykey"}, "dom-idbcursor-delete": {"dfnID":"dom-idbcursor-delete","dfnText":"delete()","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-delete"},{"id":"ref-for-dom-idbcursor-delete\u2460"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursor-delete"}, "dom-idbcursor-direction": {"dfnID":"dom-idbcursor-direction","dfnText":"direction","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-direction"},{"id":"ref-for-dom-idbcursor-direction\u2460"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursor-direction"}, "dom-idbcursor-key": {"dfnID":"dom-idbcursor-key","dfnText":"key","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-key"},{"id":"ref-for-dom-idbcursor-key\u2460"},{"id":"ref-for-dom-idbcursor-key\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursor-key"}, "dom-idbcursor-primarykey": {"dfnID":"dom-idbcursor-primarykey","dfnText":"primaryKey","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-primarykey"},{"id":"ref-for-dom-idbcursor-primarykey\u2460"},{"id":"ref-for-dom-idbcursor-primarykey\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursor-primarykey"}, "dom-idbcursor-request": {"dfnID":"dom-idbcursor-request","dfnText":"request","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-request"},{"id":"ref-for-dom-idbcursor-request\u2460"},{"id":"ref-for-dom-idbcursor-request\u2461"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-dom-idbcursor-request\u2462"}],"title":"11. Revision history"}],"url":"#dom-idbcursor-request"}, "dom-idbcursor-source": {"dfnID":"dom-idbcursor-source","dfnText":"source","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-source"},{"id":"ref-for-dom-idbcursor-source\u2460"},{"id":"ref-for-dom-idbcursor-source\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursor-source"}, "dom-idbcursor-update": {"dfnID":"dom-idbcursor-update","dfnText":"update(value)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursor-update"},{"id":"ref-for-dom-idbcursor-update\u2460"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursor-update"}, "dom-idbcursor-update-value-value": {"dfnID":"dom-idbcursor-update-value-value","dfnText":"value","external":false,"refSections":[],"url":"#dom-idbcursor-update-value-value"}, "dom-idbcursordirection-next": {"dfnID":"dom-idbcursordirection-next","dfnText":"\"next\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursordirection-next"},{"id":"ref-for-dom-idbcursordirection-next\u2460"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-dom-idbcursordirection-next\u2461"},{"id":"ref-for-dom-idbcursordirection-next\u2462"},{"id":"ref-for-dom-idbcursordirection-next\u2463"},{"id":"ref-for-dom-idbcursordirection-next\u2464"},{"id":"ref-for-dom-idbcursordirection-next\u2465"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-dom-idbcursordirection-next\u2466"},{"id":"ref-for-dom-idbcursordirection-next\u2467"}],"title":"6.7. Cursor iteration operation"}],"url":"#dom-idbcursordirection-next"}, "dom-idbcursordirection-nextunique": {"dfnID":"dom-idbcursordirection-nextunique","dfnText":"\"nextunique\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursordirection-nextunique"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-dom-idbcursordirection-nextunique\u2460"},{"id":"ref-for-dom-idbcursordirection-nextunique\u2461"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-dom-idbcursordirection-nextunique\u2462"},{"id":"ref-for-dom-idbcursordirection-nextunique\u2463"}],"title":"6.7. Cursor iteration operation"}],"url":"#dom-idbcursordirection-nextunique"}, "dom-idbcursordirection-prev": {"dfnID":"dom-idbcursordirection-prev","dfnText":"\"prev\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursordirection-prev"},{"id":"ref-for-dom-idbcursordirection-prev\u2460"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-dom-idbcursordirection-prev\u2461"},{"id":"ref-for-dom-idbcursordirection-prev\u2462"},{"id":"ref-for-dom-idbcursordirection-prev\u2463"},{"id":"ref-for-dom-idbcursordirection-prev\u2464"},{"id":"ref-for-dom-idbcursordirection-prev\u2465"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-dom-idbcursordirection-prev\u2466"},{"id":"ref-for-dom-idbcursordirection-prev\u2467"}],"title":"6.7. Cursor iteration operation"}],"url":"#dom-idbcursordirection-prev"}, "dom-idbcursordirection-prevunique": {"dfnID":"dom-idbcursordirection-prevunique","dfnText":"\"prevunique\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursordirection-prevunique"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-dom-idbcursordirection-prevunique\u2460"},{"id":"ref-for-dom-idbcursordirection-prevunique\u2461"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-dom-idbcursordirection-prevunique\u2462"},{"id":"ref-for-dom-idbcursordirection-prevunique\u2463"}],"title":"6.7. Cursor iteration operation"}],"url":"#dom-idbcursordirection-prevunique"}, "dom-idbcursorwithvalue-value": {"dfnID":"dom-idbcursorwithvalue-value","dfnText":"value","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbcursorwithvalue-value"},{"id":"ref-for-dom-idbcursorwithvalue-value\u2460"},{"id":"ref-for-dom-idbcursorwithvalue-value\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbcursorwithvalue-value"}, "dom-idbdatabase-close": {"dfnID":"dom-idbdatabase-close","dfnText":"close()","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-close"}],"title":"1. Introduction"},{"refs":[{"id":"ref-for-dom-idbdatabase-close\u2460"},{"id":"ref-for-dom-idbdatabase-close\u2461"},{"id":"ref-for-dom-idbdatabase-close\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbdatabase-close\u2463"}],"title":"5.2. Closing a database connection"}],"url":"#dom-idbdatabase-close"}, "dom-idbdatabase-createobjectstore": {"dfnID":"dom-idbdatabase-createobjectstore","dfnText":"createObjectStore(name, options)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-createobjectstore"},{"id":"ref-for-dom-idbdatabase-createobjectstore\u2460"},{"id":"ref-for-dom-idbdatabase-createobjectstore\u2461"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dom-idbdatabase-createobjectstore"}, "dom-idbdatabase-createobjectstore-name-options-name": {"dfnID":"dom-idbdatabase-createobjectstore-name-options-name","dfnText":"name","external":false,"refSections":[],"url":"#dom-idbdatabase-createobjectstore-name-options-name"}, "dom-idbdatabase-createobjectstore-name-options-options": {"dfnID":"dom-idbdatabase-createobjectstore-name-options-options","dfnText":"options","external":false,"refSections":[],"url":"#dom-idbdatabase-createobjectstore-name-options-options"}, "dom-idbdatabase-deleteobjectstore": {"dfnID":"dom-idbdatabase-deleteobjectstore","dfnText":"deleteObjectStore(name)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-deleteobjectstore"},{"id":"ref-for-dom-idbdatabase-deleteobjectstore\u2460"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dom-idbdatabase-deleteobjectstore"}, "dom-idbdatabase-deleteobjectstore-name-name": {"dfnID":"dom-idbdatabase-deleteobjectstore-name-name","dfnText":"name","external":false,"refSections":[],"url":"#dom-idbdatabase-deleteobjectstore-name-name"}, "dom-idbdatabase-name": {"dfnID":"dom-idbdatabase-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-name"},{"id":"ref-for-dom-idbdatabase-name\u2460"},{"id":"ref-for-dom-idbdatabase-name\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbdatabase-name\u2462"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#dom-idbdatabase-name"}, "dom-idbdatabase-objectstorenames": {"dfnID":"dom-idbdatabase-objectstorenames","dfnText":"objectStoreNames","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-objectstorenames"},{"id":"ref-for-dom-idbdatabase-objectstorenames\u2460"},{"id":"ref-for-dom-idbdatabase-objectstorenames\u2461"},{"id":"ref-for-dom-idbdatabase-objectstorenames\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbdatabase-objectstorenames\u2463"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#dom-idbdatabase-objectstorenames"}, "dom-idbdatabase-onabort": {"dfnID":"dom-idbdatabase-onabort","dfnText":"onabort","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-onabort"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dom-idbdatabase-onabort"}, "dom-idbdatabase-onclose": {"dfnID":"dom-idbdatabase-onclose","dfnText":"onclose","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-onclose"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dom-idbdatabase-onclose"}, "dom-idbdatabase-onerror": {"dfnID":"dom-idbdatabase-onerror","dfnText":"onerror","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-onerror"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dom-idbdatabase-onerror"}, "dom-idbdatabase-onversionchange": {"dfnID":"dom-idbdatabase-onversionchange","dfnText":"onversionchange","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-onversionchange"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dom-idbdatabase-onversionchange"}, "dom-idbdatabase-transaction": {"dfnID":"dom-idbdatabase-transaction","dfnText":"transaction(storeNames, mode, options)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-transaction"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-dom-idbdatabase-transaction\u2460"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-dom-idbdatabase-transaction\u2461"},{"id":"ref-for-dom-idbdatabase-transaction\u2462"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dom-idbdatabase-transaction"}, "dom-idbdatabase-transaction-storenames-mode-options-mode": {"dfnID":"dom-idbdatabase-transaction-storenames-mode-options-mode","dfnText":"mode","external":false,"refSections":[],"url":"#dom-idbdatabase-transaction-storenames-mode-options-mode"}, "dom-idbdatabase-transaction-storenames-mode-options-options": {"dfnID":"dom-idbdatabase-transaction-storenames-mode-options-options","dfnText":"options","external":false,"refSections":[],"url":"#dom-idbdatabase-transaction-storenames-mode-options-options"}, "dom-idbdatabase-transaction-storenames-mode-options-storenames": {"dfnID":"dom-idbdatabase-transaction-storenames-mode-options-storenames","dfnText":"storeNames","external":false,"refSections":[],"url":"#dom-idbdatabase-transaction-storenames-mode-options-storenames"}, "dom-idbdatabase-version": {"dfnID":"dom-idbdatabase-version","dfnText":"version","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabase-version"},{"id":"ref-for-dom-idbdatabase-version\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbdatabase-version\u2461"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#dom-idbdatabase-version"}, "dom-idbdatabaseinfo-name": {"dfnID":"dom-idbdatabaseinfo-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabaseinfo-name"}],"title":"4.3. The IDBFactory interface"}],"url":"#dom-idbdatabaseinfo-name"}, "dom-idbdatabaseinfo-version": {"dfnID":"dom-idbdatabaseinfo-version","dfnText":"version","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbdatabaseinfo-version"}],"title":"4.3. The IDBFactory interface"}],"url":"#dom-idbdatabaseinfo-version"}, "dom-idbfactory-cmp": {"dfnID":"dom-idbfactory-cmp","dfnText":"cmp(first, second)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbfactory-cmp"},{"id":"ref-for-dom-idbfactory-cmp\u2460"}],"title":"4.3. The IDBFactory interface"}],"url":"#dom-idbfactory-cmp"}, "dom-idbfactory-cmp-first-second-first": {"dfnID":"dom-idbfactory-cmp-first-second-first","dfnText":"first","external":false,"refSections":[],"url":"#dom-idbfactory-cmp-first-second-first"}, "dom-idbfactory-cmp-first-second-second": {"dfnID":"dom-idbfactory-cmp-first-second-second","dfnText":"second","external":false,"refSections":[],"url":"#dom-idbfactory-cmp-first-second-second"}, "dom-idbfactory-databases": {"dfnID":"dom-idbfactory-databases","dfnText":"databases()","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbfactory-databases"},{"id":"ref-for-dom-idbfactory-databases\u2460"},{"id":"ref-for-dom-idbfactory-databases\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-dom-idbfactory-databases\u2462"}],"title":"11. Revision history"}],"url":"#dom-idbfactory-databases"}, "dom-idbfactory-deletedatabase": {"dfnID":"dom-idbfactory-deletedatabase","dfnText":"deleteDatabase(name)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbfactory-deletedatabase"},{"id":"ref-for-dom-idbfactory-deletedatabase\u2460"}],"title":"4.3. The IDBFactory interface"}],"url":"#dom-idbfactory-deletedatabase"}, "dom-idbfactory-deletedatabase-name-name": {"dfnID":"dom-idbfactory-deletedatabase-name-name","dfnText":"name","external":false,"refSections":[],"url":"#dom-idbfactory-deletedatabase-name-name"}, "dom-idbfactory-open": {"dfnID":"dom-idbfactory-open","dfnText":"open(name, version)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbfactory-open"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-dom-idbfactory-open\u2460"},{"id":"ref-for-dom-idbfactory-open\u2461"},{"id":"ref-for-dom-idbfactory-open\u2462"}],"title":"4.3. The IDBFactory interface"}],"url":"#dom-idbfactory-open"}, "dom-idbfactory-open-name-version-name": {"dfnID":"dom-idbfactory-open-name-version-name","dfnText":"name","external":false,"refSections":[],"url":"#dom-idbfactory-open-name-version-name"}, "dom-idbfactory-open-name-version-version": {"dfnID":"dom-idbfactory-open-name-version-version","dfnText":"version","external":false,"refSections":[],"url":"#dom-idbfactory-open-name-version-version"}, "dom-idbindex-count": {"dfnID":"dom-idbindex-count","dfnText":"count(query)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-count"},{"id":"ref-for-dom-idbindex-count\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-count"}, "dom-idbindex-count-query-query": {"dfnID":"dom-idbindex-count-query-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbindex-count-query-query"}, "dom-idbindex-get": {"dfnID":"dom-idbindex-get","dfnText":"get(query)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-get"},{"id":"ref-for-dom-idbindex-get\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-get"}, "dom-idbindex-get-query-query": {"dfnID":"dom-idbindex-get-query-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbindex-get-query-query"}, "dom-idbindex-getall": {"dfnID":"dom-idbindex-getall","dfnText":"getAll(query, count)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-getall"},{"id":"ref-for-dom-idbindex-getall\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-getall"}, "dom-idbindex-getall-query-count-count": {"dfnID":"dom-idbindex-getall-query-count-count","dfnText":"count","external":false,"refSections":[],"url":"#dom-idbindex-getall-query-count-count"}, "dom-idbindex-getall-query-count-query": {"dfnID":"dom-idbindex-getall-query-count-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbindex-getall-query-count-query"}, "dom-idbindex-getallkeys": {"dfnID":"dom-idbindex-getallkeys","dfnText":"getAllKeys(query, count)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-getallkeys"},{"id":"ref-for-dom-idbindex-getallkeys\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-getallkeys"}, "dom-idbindex-getallkeys-query-count-count": {"dfnID":"dom-idbindex-getallkeys-query-count-count","dfnText":"count","external":false,"refSections":[],"url":"#dom-idbindex-getallkeys-query-count-count"}, "dom-idbindex-getallkeys-query-count-query": {"dfnID":"dom-idbindex-getallkeys-query-count-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbindex-getallkeys-query-count-query"}, "dom-idbindex-getkey": {"dfnID":"dom-idbindex-getkey","dfnText":"getKey(query)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-getkey"},{"id":"ref-for-dom-idbindex-getkey\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-getkey"}, "dom-idbindex-getkey-query-query": {"dfnID":"dom-idbindex-getkey-query-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbindex-getkey-query-query"}, "dom-idbindex-keypath": {"dfnID":"dom-idbindex-keypath","dfnText":"keyPath","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-keypath"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-keypath"}, "dom-idbindex-multientry": {"dfnID":"dom-idbindex-multientry","dfnText":"multiEntry","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-multientry"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-multientry"}, "dom-idbindex-name": {"dfnID":"dom-idbindex-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-name"},{"id":"ref-for-dom-idbindex-name\u2460"},{"id":"ref-for-dom-idbindex-name\u2461"},{"id":"ref-for-dom-idbindex-name\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-dom-idbindex-name\u2463"},{"id":"ref-for-dom-idbindex-name\u2464"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#dom-idbindex-name"}, "dom-idbindex-objectstore": {"dfnID":"dom-idbindex-objectstore","dfnText":"objectStore","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-objectstore"},{"id":"ref-for-dom-idbindex-objectstore\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-objectstore"}, "dom-idbindex-opencursor": {"dfnID":"dom-idbindex-opencursor","dfnText":"openCursor(query, direction)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-opencursor"},{"id":"ref-for-dom-idbindex-opencursor\u2460"},{"id":"ref-for-dom-idbindex-opencursor\u2461"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-opencursor"}, "dom-idbindex-opencursor-query-direction-direction": {"dfnID":"dom-idbindex-opencursor-query-direction-direction","dfnText":"direction","external":false,"refSections":[],"url":"#dom-idbindex-opencursor-query-direction-direction"}, "dom-idbindex-opencursor-query-direction-query": {"dfnID":"dom-idbindex-opencursor-query-direction-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbindex-opencursor-query-direction-query"}, "dom-idbindex-openkeycursor": {"dfnID":"dom-idbindex-openkeycursor","dfnText":"openKeyCursor(query, direction)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-openkeycursor"},{"id":"ref-for-dom-idbindex-openkeycursor\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-openkeycursor"}, "dom-idbindex-openkeycursor-query-direction-direction": {"dfnID":"dom-idbindex-openkeycursor-query-direction-direction","dfnText":"direction","external":false,"refSections":[],"url":"#dom-idbindex-openkeycursor-query-direction-direction"}, "dom-idbindex-openkeycursor-query-direction-query": {"dfnID":"dom-idbindex-openkeycursor-query-direction-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbindex-openkeycursor-query-direction-query"}, "dom-idbindex-unique": {"dfnID":"dom-idbindex-unique","dfnText":"unique","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindex-unique"}],"title":"4.6. The IDBIndex interface"}],"url":"#dom-idbindex-unique"}, "dom-idbindexparameters-multientry": {"dfnID":"dom-idbindexparameters-multientry","dfnText":"multiEntry","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindexparameters-multientry"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbindexparameters-multientry"}, "dom-idbindexparameters-unique": {"dfnID":"dom-idbindexparameters-unique","dfnText":"unique","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbindexparameters-unique"}],"title":"1. Introduction"},{"refs":[{"id":"ref-for-dom-idbindexparameters-unique\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbindexparameters-unique"}, "dom-idbkeyrange-bound": {"dfnID":"dom-idbkeyrange-bound","dfnText":"bound(lower, upper, lowerOpen, upperOpen)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbkeyrange-bound"},{"id":"ref-for-dom-idbkeyrange-bound\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#dom-idbkeyrange-bound"}, "dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-lower": {"dfnID":"dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-lower","dfnText":"lower","external":false,"refSections":[],"url":"#dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-lower"}, "dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-loweropen": {"dfnID":"dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-loweropen","dfnText":"lowerOpen","external":false,"refSections":[],"url":"#dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-loweropen"}, "dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upper": {"dfnID":"dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upper","dfnText":"upper","external":false,"refSections":[],"url":"#dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upper"}, "dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upperopen": {"dfnID":"dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upperopen","dfnText":"upperOpen","external":false,"refSections":[],"url":"#dom-idbkeyrange-bound-lower-upper-loweropen-upperopen-upperopen"}, "dom-idbkeyrange-includes": {"dfnID":"dom-idbkeyrange-includes","dfnText":"includes(key)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbkeyrange-includes"},{"id":"ref-for-dom-idbkeyrange-includes\u2460"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-dom-idbkeyrange-includes\u2461"}],"title":"11. Revision history"}],"url":"#dom-idbkeyrange-includes"}, "dom-idbkeyrange-includes-key-key": {"dfnID":"dom-idbkeyrange-includes-key-key","dfnText":"key","external":false,"refSections":[],"url":"#dom-idbkeyrange-includes-key-key"}, "dom-idbkeyrange-lower": {"dfnID":"dom-idbkeyrange-lower","dfnText":"lower","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbkeyrange-lower"},{"id":"ref-for-dom-idbkeyrange-lower\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#dom-idbkeyrange-lower"}, "dom-idbkeyrange-lowerbound": {"dfnID":"dom-idbkeyrange-lowerbound","dfnText":"lowerBound(lower, open)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbkeyrange-lowerbound"},{"id":"ref-for-dom-idbkeyrange-lowerbound\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#dom-idbkeyrange-lowerbound"}, "dom-idbkeyrange-lowerbound-lower-open-lower": {"dfnID":"dom-idbkeyrange-lowerbound-lower-open-lower","dfnText":"lower","external":false,"refSections":[],"url":"#dom-idbkeyrange-lowerbound-lower-open-lower"}, "dom-idbkeyrange-lowerbound-lower-open-open": {"dfnID":"dom-idbkeyrange-lowerbound-lower-open-open","dfnText":"open","external":false,"refSections":[],"url":"#dom-idbkeyrange-lowerbound-lower-open-open"}, "dom-idbkeyrange-loweropen": {"dfnID":"dom-idbkeyrange-loweropen","dfnText":"lowerOpen","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbkeyrange-loweropen"},{"id":"ref-for-dom-idbkeyrange-loweropen\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#dom-idbkeyrange-loweropen"}, "dom-idbkeyrange-only": {"dfnID":"dom-idbkeyrange-only","dfnText":"only(value)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbkeyrange-only"},{"id":"ref-for-dom-idbkeyrange-only\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#dom-idbkeyrange-only"}, "dom-idbkeyrange-only-value-value": {"dfnID":"dom-idbkeyrange-only-value-value","dfnText":"value","external":false,"refSections":[],"url":"#dom-idbkeyrange-only-value-value"}, "dom-idbkeyrange-upper": {"dfnID":"dom-idbkeyrange-upper","dfnText":"upper","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbkeyrange-upper"},{"id":"ref-for-dom-idbkeyrange-upper\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#dom-idbkeyrange-upper"}, "dom-idbkeyrange-upperbound": {"dfnID":"dom-idbkeyrange-upperbound","dfnText":"upperBound(upper, open)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbkeyrange-upperbound"},{"id":"ref-for-dom-idbkeyrange-upperbound\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#dom-idbkeyrange-upperbound"}, "dom-idbkeyrange-upperbound-upper-open-open": {"dfnID":"dom-idbkeyrange-upperbound-upper-open-open","dfnText":"open","external":false,"refSections":[],"url":"#dom-idbkeyrange-upperbound-upper-open-open"}, "dom-idbkeyrange-upperbound-upper-open-upper": {"dfnID":"dom-idbkeyrange-upperbound-upper-open-upper","dfnText":"upper","external":false,"refSections":[],"url":"#dom-idbkeyrange-upperbound-upper-open-upper"}, "dom-idbkeyrange-upperopen": {"dfnID":"dom-idbkeyrange-upperopen","dfnText":"upperOpen","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbkeyrange-upperopen"},{"id":"ref-for-dom-idbkeyrange-upperopen\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#dom-idbkeyrange-upperopen"}, "dom-idbobjectstore-add": {"dfnID":"dom-idbobjectstore-add","dfnText":"add(value, key)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-add"},{"id":"ref-for-dom-idbobjectstore-add\u2460"},{"id":"ref-for-dom-idbobjectstore-add\u2461"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-add"}, "dom-idbobjectstore-add-value-key-key": {"dfnID":"dom-idbobjectstore-add-value-key-key","dfnText":"key","external":false,"refSections":[],"url":"#dom-idbobjectstore-add-value-key-key"}, "dom-idbobjectstore-add-value-key-value": {"dfnID":"dom-idbobjectstore-add-value-key-value","dfnText":"value","external":false,"refSections":[],"url":"#dom-idbobjectstore-add-value-key-value"}, "dom-idbobjectstore-autoincrement": {"dfnID":"dom-idbobjectstore-autoincrement","dfnText":"autoIncrement","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-autoincrement"},{"id":"ref-for-dom-idbobjectstore-autoincrement\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-autoincrement"}, "dom-idbobjectstore-clear": {"dfnID":"dom-idbobjectstore-clear","dfnText":"clear()","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-clear"},{"id":"ref-for-dom-idbobjectstore-clear\u2460"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-dom-idbobjectstore-clear\u2461"},{"id":"ref-for-dom-idbobjectstore-clear\u2462"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-clear"}, "dom-idbobjectstore-count": {"dfnID":"dom-idbobjectstore-count","dfnText":"count(query)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-count"},{"id":"ref-for-dom-idbobjectstore-count\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-count"}, "dom-idbobjectstore-count-query-query": {"dfnID":"dom-idbobjectstore-count-query-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbobjectstore-count-query-query"}, "dom-idbobjectstore-createindex": {"dfnID":"dom-idbobjectstore-createindex","dfnText":"createIndex(name, keyPath, options)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-createindex"},{"id":"ref-for-dom-idbobjectstore-createindex\u2460"},{"id":"ref-for-dom-idbobjectstore-createindex\u2461"},{"id":"ref-for-dom-idbobjectstore-createindex\u2462"},{"id":"ref-for-dom-idbobjectstore-createindex\u2463"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-createindex"}, "dom-idbobjectstore-createindex-name-keypath-options-keypath": {"dfnID":"dom-idbobjectstore-createindex-name-keypath-options-keypath","dfnText":"keyPath","external":false,"refSections":[],"url":"#dom-idbobjectstore-createindex-name-keypath-options-keypath"}, "dom-idbobjectstore-createindex-name-keypath-options-name": {"dfnID":"dom-idbobjectstore-createindex-name-keypath-options-name","dfnText":"name","external":false,"refSections":[],"url":"#dom-idbobjectstore-createindex-name-keypath-options-name"}, "dom-idbobjectstore-createindex-name-keypath-options-options": {"dfnID":"dom-idbobjectstore-createindex-name-keypath-options-options","dfnText":"options","external":false,"refSections":[],"url":"#dom-idbobjectstore-createindex-name-keypath-options-options"}, "dom-idbobjectstore-delete": {"dfnID":"dom-idbobjectstore-delete","dfnText":"delete(query)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-delete"},{"id":"ref-for-dom-idbobjectstore-delete\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-delete"}, "dom-idbobjectstore-delete-query-query": {"dfnID":"dom-idbobjectstore-delete-query-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbobjectstore-delete-query-query"}, "dom-idbobjectstore-deleteindex": {"dfnID":"dom-idbobjectstore-deleteindex","dfnText":"deleteIndex(name)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-deleteindex"},{"id":"ref-for-dom-idbobjectstore-deleteindex\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-deleteindex"}, "dom-idbobjectstore-deleteindex-name-name": {"dfnID":"dom-idbobjectstore-deleteindex-name-name","dfnText":"name","external":false,"refSections":[],"url":"#dom-idbobjectstore-deleteindex-name-name"}, "dom-idbobjectstore-get": {"dfnID":"dom-idbobjectstore-get","dfnText":"get(query)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-get"},{"id":"ref-for-dom-idbobjectstore-get\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-get"}, "dom-idbobjectstore-get-query-query": {"dfnID":"dom-idbobjectstore-get-query-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbobjectstore-get-query-query"}, "dom-idbobjectstore-getall": {"dfnID":"dom-idbobjectstore-getall","dfnText":"getAll(query, count)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-getall"},{"id":"ref-for-dom-idbobjectstore-getall\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-getall"}, "dom-idbobjectstore-getall-query-count-count": {"dfnID":"dom-idbobjectstore-getall-query-count-count","dfnText":"count","external":false,"refSections":[],"url":"#dom-idbobjectstore-getall-query-count-count"}, "dom-idbobjectstore-getall-query-count-query": {"dfnID":"dom-idbobjectstore-getall-query-count-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbobjectstore-getall-query-count-query"}, "dom-idbobjectstore-getallkeys": {"dfnID":"dom-idbobjectstore-getallkeys","dfnText":"getAllKeys(query, count)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-getallkeys"},{"id":"ref-for-dom-idbobjectstore-getallkeys\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-getallkeys"}, "dom-idbobjectstore-getallkeys-query-count-count": {"dfnID":"dom-idbobjectstore-getallkeys-query-count-count","dfnText":"count","external":false,"refSections":[],"url":"#dom-idbobjectstore-getallkeys-query-count-count"}, "dom-idbobjectstore-getallkeys-query-count-query": {"dfnID":"dom-idbobjectstore-getallkeys-query-count-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbobjectstore-getallkeys-query-count-query"}, "dom-idbobjectstore-getkey": {"dfnID":"dom-idbobjectstore-getkey","dfnText":"getKey(query)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-getkey"},{"id":"ref-for-dom-idbobjectstore-getkey\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-getkey"}, "dom-idbobjectstore-getkey-query-query": {"dfnID":"dom-idbobjectstore-getkey-query-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbobjectstore-getkey-query-query"}, "dom-idbobjectstore-index": {"dfnID":"dom-idbobjectstore-index","dfnText":"index(name)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-index"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-dom-idbobjectstore-index\u2460"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#dom-idbobjectstore-index"}, "dom-idbobjectstore-index-name-name": {"dfnID":"dom-idbobjectstore-index-name-name","dfnText":"name","external":false,"refSections":[],"url":"#dom-idbobjectstore-index-name-name"}, "dom-idbobjectstore-indexnames": {"dfnID":"dom-idbobjectstore-indexnames","dfnText":"indexNames","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-indexnames"},{"id":"ref-for-dom-idbobjectstore-indexnames\u2460"},{"id":"ref-for-dom-idbobjectstore-indexnames\u2461"},{"id":"ref-for-dom-idbobjectstore-indexnames\u2462"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-dom-idbobjectstore-indexnames\u2463"},{"id":"ref-for-dom-idbobjectstore-indexnames\u2464"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#dom-idbobjectstore-indexnames"}, "dom-idbobjectstore-keypath": {"dfnID":"dom-idbobjectstore-keypath","dfnText":"keyPath","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-keypath"},{"id":"ref-for-dom-idbobjectstore-keypath\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-keypath"}, "dom-idbobjectstore-name": {"dfnID":"dom-idbobjectstore-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-name"},{"id":"ref-for-dom-idbobjectstore-name\u2460"},{"id":"ref-for-dom-idbobjectstore-name\u2461"},{"id":"ref-for-dom-idbobjectstore-name\u2462"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-dom-idbobjectstore-name\u2463"},{"id":"ref-for-dom-idbobjectstore-name\u2464"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#dom-idbobjectstore-name"}, "dom-idbobjectstore-opencursor": {"dfnID":"dom-idbobjectstore-opencursor","dfnText":"openCursor(query, direction)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-opencursor"},{"id":"ref-for-dom-idbobjectstore-opencursor\u2460"},{"id":"ref-for-dom-idbobjectstore-opencursor\u2461"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-opencursor"}, "dom-idbobjectstore-opencursor-query-direction-direction": {"dfnID":"dom-idbobjectstore-opencursor-query-direction-direction","dfnText":"direction","external":false,"refSections":[],"url":"#dom-idbobjectstore-opencursor-query-direction-direction"}, "dom-idbobjectstore-opencursor-query-direction-query": {"dfnID":"dom-idbobjectstore-opencursor-query-direction-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbobjectstore-opencursor-query-direction-query"}, "dom-idbobjectstore-openkeycursor": {"dfnID":"dom-idbobjectstore-openkeycursor","dfnText":"openKeyCursor(query, direction)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-openkeycursor"},{"id":"ref-for-dom-idbobjectstore-openkeycursor\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-openkeycursor"}, "dom-idbobjectstore-openkeycursor-query-direction-direction": {"dfnID":"dom-idbobjectstore-openkeycursor-query-direction-direction","dfnText":"direction","external":false,"refSections":[],"url":"#dom-idbobjectstore-openkeycursor-query-direction-direction"}, "dom-idbobjectstore-openkeycursor-query-direction-query": {"dfnID":"dom-idbobjectstore-openkeycursor-query-direction-query","dfnText":"query","external":false,"refSections":[],"url":"#dom-idbobjectstore-openkeycursor-query-direction-query"}, "dom-idbobjectstore-put": {"dfnID":"dom-idbobjectstore-put","dfnText":"put(value, key)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-put"},{"id":"ref-for-dom-idbobjectstore-put\u2460"},{"id":"ref-for-dom-idbobjectstore-put\u2461"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-put"}, "dom-idbobjectstore-put-value-key-key": {"dfnID":"dom-idbobjectstore-put-value-key-key","dfnText":"key","external":false,"refSections":[],"url":"#dom-idbobjectstore-put-value-key-key"}, "dom-idbobjectstore-put-value-key-value": {"dfnID":"dom-idbobjectstore-put-value-key-value","dfnText":"value","external":false,"refSections":[],"url":"#dom-idbobjectstore-put-value-key-value"}, "dom-idbobjectstore-transaction": {"dfnID":"dom-idbobjectstore-transaction","dfnText":"transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstore-transaction"},{"id":"ref-for-dom-idbobjectstore-transaction\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbobjectstore-transaction"}, "dom-idbobjectstoreparameters-autoincrement": {"dfnID":"dom-idbobjectstoreparameters-autoincrement","dfnText":"autoIncrement","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstoreparameters-autoincrement"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dom-idbobjectstoreparameters-autoincrement"}, "dom-idbobjectstoreparameters-keypath": {"dfnID":"dom-idbobjectstoreparameters-keypath","dfnText":"keyPath","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbobjectstoreparameters-keypath"}],"title":"4.4. The IDBDatabase interface"}],"url":"#dom-idbobjectstoreparameters-keypath"}, "dom-idbopendbrequest-onblocked": {"dfnID":"dom-idbopendbrequest-onblocked","dfnText":"onblocked","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbopendbrequest-onblocked"}],"title":"4.1. The IDBRequest interface"}],"url":"#dom-idbopendbrequest-onblocked"}, "dom-idbopendbrequest-onupgradeneeded": {"dfnID":"dom-idbopendbrequest-onupgradeneeded","dfnText":"onupgradeneeded","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbopendbrequest-onupgradeneeded"}],"title":"4.1. The IDBRequest interface"}],"url":"#dom-idbopendbrequest-onupgradeneeded"}, "dom-idbrequest-error": {"dfnID":"dom-idbrequest-error","dfnText":"error","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbrequest-error"},{"id":"ref-for-dom-idbrequest-error\u2460"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-dom-idbrequest-error\u2461"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#dom-idbrequest-error"}, "dom-idbrequest-onerror": {"dfnID":"dom-idbrequest-onerror","dfnText":"onerror","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbrequest-onerror"}],"title":"4.1. The IDBRequest interface"}],"url":"#dom-idbrequest-onerror"}, "dom-idbrequest-onsuccess": {"dfnID":"dom-idbrequest-onsuccess","dfnText":"onsuccess","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbrequest-onsuccess"}],"title":"4.1. The IDBRequest interface"}],"url":"#dom-idbrequest-onsuccess"}, "dom-idbrequest-readystate": {"dfnID":"dom-idbrequest-readystate","dfnText":"readyState","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbrequest-readystate"},{"id":"ref-for-dom-idbrequest-readystate\u2460"}],"title":"4.1. The IDBRequest interface"}],"url":"#dom-idbrequest-readystate"}, "dom-idbrequest-result": {"dfnID":"dom-idbrequest-result","dfnText":"result","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbrequest-result"},{"id":"ref-for-dom-idbrequest-result\u2460"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-dom-idbrequest-result\u2461"},{"id":"ref-for-dom-idbrequest-result\u2462"},{"id":"ref-for-dom-idbrequest-result\u2463"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-dom-idbrequest-result\u2464"},{"id":"ref-for-dom-idbrequest-result\u2465"},{"id":"ref-for-dom-idbrequest-result\u2466"},{"id":"ref-for-dom-idbrequest-result\u2467"},{"id":"ref-for-dom-idbrequest-result\u2468"},{"id":"ref-for-dom-idbrequest-result\u2460\u24ea"},{"id":"ref-for-dom-idbrequest-result\u2460\u2460"},{"id":"ref-for-dom-idbrequest-result\u2460\u2461"},{"id":"ref-for-dom-idbrequest-result\u2460\u2462"},{"id":"ref-for-dom-idbrequest-result\u2460\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-dom-idbrequest-result\u2460\u2464"},{"id":"ref-for-dom-idbrequest-result\u2460\u2465"},{"id":"ref-for-dom-idbrequest-result\u2460\u2466"},{"id":"ref-for-dom-idbrequest-result\u2460\u2467"},{"id":"ref-for-dom-idbrequest-result\u2460\u2468"},{"id":"ref-for-dom-idbrequest-result\u2461\u24ea"},{"id":"ref-for-dom-idbrequest-result\u2461\u2460"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-dom-idbrequest-result\u2461\u2461"},{"id":"ref-for-dom-idbrequest-result\u2461\u2462"},{"id":"ref-for-dom-idbrequest-result\u2461\u2463"}],"title":"4.8. The IDBCursor interface"}],"url":"#dom-idbrequest-result"}, "dom-idbrequest-source": {"dfnID":"dom-idbrequest-source","dfnText":"source","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbrequest-source"},{"id":"ref-for-dom-idbrequest-source\u2460"}],"title":"4.1. The IDBRequest interface"}],"url":"#dom-idbrequest-source"}, "dom-idbrequest-transaction": {"dfnID":"dom-idbrequest-transaction","dfnText":"transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbrequest-transaction"},{"id":"ref-for-dom-idbrequest-transaction\u2460"},{"id":"ref-for-dom-idbrequest-transaction\u2461"}],"title":"4.1. The IDBRequest interface"}],"url":"#dom-idbrequest-transaction"}, "dom-idbrequestreadystate-done": {"dfnID":"dom-idbrequestreadystate-done","dfnText":"\"done\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbrequestreadystate-done"},{"id":"ref-for-dom-idbrequestreadystate-done\u2460"}],"title":"4.1. The IDBRequest interface"}],"url":"#dom-idbrequestreadystate-done"}, "dom-idbrequestreadystate-pending": {"dfnID":"dom-idbrequestreadystate-pending","dfnText":"\"pending\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbrequestreadystate-pending"},{"id":"ref-for-dom-idbrequestreadystate-pending\u2460"}],"title":"4.1. The IDBRequest interface"}],"url":"#dom-idbrequestreadystate-pending"}, "dom-idbtransaction-abort": {"dfnID":"dom-idbtransaction-abort","dfnText":"abort()","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-abort"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-dom-idbtransaction-abort\u2460"},{"id":"ref-for-dom-idbtransaction-abort\u2461"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransaction-abort"}, "dom-idbtransaction-commit": {"dfnID":"dom-idbtransaction-commit","dfnText":"commit()","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-commit"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-dom-idbtransaction-commit\u2460"},{"id":"ref-for-dom-idbtransaction-commit\u2461"},{"id":"ref-for-dom-idbtransaction-commit\u2462"},{"id":"ref-for-dom-idbtransaction-commit\u2463"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-dom-idbtransaction-commit\u2464"}],"title":"11. Revision history"}],"url":"#dom-idbtransaction-commit"}, "dom-idbtransaction-db": {"dfnID":"dom-idbtransaction-db","dfnText":"db","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-db"},{"id":"ref-for-dom-idbtransaction-db\u2460"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransaction-db"}, "dom-idbtransaction-durability": {"dfnID":"dom-idbtransaction-durability","dfnText":"durability","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-durability"},{"id":"ref-for-dom-idbtransaction-durability\u2460"},{"id":"ref-for-dom-idbtransaction-durability\u2461"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-dom-idbtransaction-durability\u2462"}],"title":"11. Revision history"}],"url":"#dom-idbtransaction-durability"}, "dom-idbtransaction-error": {"dfnID":"dom-idbtransaction-error","dfnText":"error","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-error"},{"id":"ref-for-dom-idbtransaction-error\u2460"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-dom-idbtransaction-error\u2461"}],"title":"5.10. Firing an error event"}],"url":"#dom-idbtransaction-error"}, "dom-idbtransaction-mode": {"dfnID":"dom-idbtransaction-mode","dfnText":"mode","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-mode"},{"id":"ref-for-dom-idbtransaction-mode\u2460"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransaction-mode"}, "dom-idbtransaction-objectstore": {"dfnID":"dom-idbtransaction-objectstore","dfnText":"objectStore(name)","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-objectstore"},{"id":"ref-for-dom-idbtransaction-objectstore\u2460"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-dom-idbtransaction-objectstore\u2461"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#dom-idbtransaction-objectstore"}, "dom-idbtransaction-objectstore-name-name": {"dfnID":"dom-idbtransaction-objectstore-name-name","dfnText":"name","external":false,"refSections":[],"url":"#dom-idbtransaction-objectstore-name-name"}, "dom-idbtransaction-objectstorenames": {"dfnID":"dom-idbtransaction-objectstorenames","dfnText":"objectStoreNames","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-objectstorenames"},{"id":"ref-for-dom-idbtransaction-objectstorenames\u2460"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransaction-objectstorenames"}, "dom-idbtransaction-onabort": {"dfnID":"dom-idbtransaction-onabort","dfnText":"onabort","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-onabort"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransaction-onabort"}, "dom-idbtransaction-oncomplete": {"dfnID":"dom-idbtransaction-oncomplete","dfnText":"oncomplete","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-oncomplete"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransaction-oncomplete"}, "dom-idbtransaction-onerror": {"dfnID":"dom-idbtransaction-onerror","dfnText":"onerror","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransaction-onerror"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransaction-onerror"}, "dom-idbtransactiondurability-default": {"dfnID":"dom-idbtransactiondurability-default","dfnText":"\"default\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransactiondurability-default"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-dom-idbtransactiondurability-default\u2460"},{"id":"ref-for-dom-idbtransactiondurability-default\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbtransactiondurability-default\u2462"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransactiondurability-default"}, "dom-idbtransactiondurability-relaxed": {"dfnID":"dom-idbtransactiondurability-relaxed","dfnText":"\"relaxed\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransactiondurability-relaxed"},{"id":"ref-for-dom-idbtransactiondurability-relaxed\u2460"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-dom-idbtransactiondurability-relaxed\u2461"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbtransactiondurability-relaxed\u2462"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransactiondurability-relaxed"}, "dom-idbtransactiondurability-strict": {"dfnID":"dom-idbtransactiondurability-strict","dfnText":"\"strict\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransactiondurability-strict"},{"id":"ref-for-dom-idbtransactiondurability-strict\u2460"},{"id":"ref-for-dom-idbtransactiondurability-strict\u2461"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-dom-idbtransactiondurability-strict\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbtransactiondurability-strict\u2463"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransactiondurability-strict"}, "dom-idbtransactionmode-readonly": {"dfnID":"dom-idbtransactionmode-readonly","dfnText":"\"readonly\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransactionmode-readonly"},{"id":"ref-for-dom-idbtransactionmode-readonly\u2460"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-dom-idbtransactionmode-readonly\u2461"},{"id":"ref-for-dom-idbtransactionmode-readonly\u2462"},{"id":"ref-for-dom-idbtransactionmode-readonly\u2463"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbtransactionmode-readonly\u2464"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransactionmode-readonly"}, "dom-idbtransactionmode-readwrite": {"dfnID":"dom-idbtransactionmode-readwrite","dfnText":"\"readwrite\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransactionmode-readwrite"},{"id":"ref-for-dom-idbtransactionmode-readwrite\u2460"},{"id":"ref-for-dom-idbtransactionmode-readwrite\u2461"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-dom-idbtransactionmode-readwrite\u2462"},{"id":"ref-for-dom-idbtransactionmode-readwrite\u2463"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbtransactionmode-readwrite\u2464"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransactionmode-readwrite"}, "dom-idbtransactionmode-versionchange": {"dfnID":"dom-idbtransactionmode-versionchange","dfnText":"\"versionchange\"","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransactionmode-versionchange"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-dom-idbtransactionmode-versionchange\u2460"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-dom-idbtransactionmode-versionchange\u2461"}],"title":"4.9. The IDBTransaction interface"}],"url":"#dom-idbtransactionmode-versionchange"}, "dom-idbtransactionoptions-durability": {"dfnID":"dom-idbtransactionoptions-durability","dfnText":"durability","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbtransactionoptions-durability"},{"id":"ref-for-dom-idbtransactionoptions-durability\u2460"},{"id":"ref-for-dom-idbtransactionoptions-durability\u2461"},{"id":"ref-for-dom-idbtransactionoptions-durability\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-dom-idbtransactionoptions-durability\u2463"}],"title":"11. Revision history"}],"url":"#dom-idbtransactionoptions-durability"}, "dom-idbversionchangeevent-idbversionchangeevent": {"dfnID":"dom-idbversionchangeevent-idbversionchangeevent","dfnText":"constructor","external":false,"refSections":[],"url":"#dom-idbversionchangeevent-idbversionchangeevent"}, "dom-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-eventinitdict": {"dfnID":"dom-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-eventinitdict","dfnText":"eventInitDict","external":false,"refSections":[],"url":"#dom-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-eventinitdict"}, "dom-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-type": {"dfnID":"dom-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-type","dfnText":"type","external":false,"refSections":[],"url":"#dom-idbversionchangeevent-idbversionchangeevent-type-eventinitdict-type"}, "dom-idbversionchangeevent-newversion": {"dfnID":"dom-idbversionchangeevent-newversion","dfnText":"newVersion","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbversionchangeevent-newversion"},{"id":"ref-for-dom-idbversionchangeevent-newversion\u2460"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-dom-idbversionchangeevent-newversion\u2461"}],"title":"4.3. The IDBFactory interface"}],"url":"#dom-idbversionchangeevent-newversion"}, "dom-idbversionchangeevent-oldversion": {"dfnID":"dom-idbversionchangeevent-oldversion","dfnText":"oldVersion","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-idbversionchangeevent-oldversion"},{"id":"ref-for-dom-idbversionchangeevent-oldversion\u2460"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-dom-idbversionchangeevent-oldversion\u2461"}],"title":"4.3. The IDBFactory interface"}],"url":"#dom-idbversionchangeevent-oldversion"}, "dom-idbversionchangeeventinit-newversion": {"dfnID":"dom-idbversionchangeeventinit-newversion","dfnText":"newVersion","external":false,"refSections":[],"url":"#dom-idbversionchangeeventinit-newversion"}, "dom-idbversionchangeeventinit-oldversion": {"dfnID":"dom-idbversionchangeeventinit-oldversion","dfnText":"oldVersion","external":false,"refSections":[],"url":"#dom-idbversionchangeeventinit-oldversion"}, "dom-windoworworkerglobalscope-indexeddb": {"dfnID":"dom-windoworworkerglobalscope-indexeddb","dfnText":"indexedDB","external":false,"refSections":[{"refs":[{"id":"ref-for-dom-windoworworkerglobalscope-indexeddb"}],"title":"4.3. The IDBFactory interface"}],"url":"#dom-windoworworkerglobalscope-indexeddb"}, "e97a9688": {"dfnID":"e97a9688","dfnText":"unsigned long","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-unsigned-long"},{"id":"ref-for-idl-unsigned-long\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idl-unsigned-long\u2461"},{"id":"ref-for-idl-unsigned-long\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idl-unsigned-long\u2463"}],"title":"4.8. The IDBCursor interface"}],"url":"https://webidl.spec.whatwg.org/#idl-unsigned-long"}, "ea70ff86": {"dfnID":"ea70ff86","dfnText":"VersionError","external":true,"refSections":[{"refs":[{"id":"ref-for-versionerror"}],"title":"3. Exceptions"},{"refs":[{"id":"ref-for-versionerror\u2460"}],"title":"5.1. Opening a database connection"}],"url":"https://webidl.spec.whatwg.org/#versionerror"}, "enumdef-idbcursordirection": {"dfnID":"enumdef-idbcursordirection","dfnText":"IDBCursorDirection","external":false,"refSections":[{"refs":[{"id":"ref-for-enumdef-idbcursordirection"},{"id":"ref-for-enumdef-idbcursordirection\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-enumdef-idbcursordirection\u2461"},{"id":"ref-for-enumdef-idbcursordirection\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-enumdef-idbcursordirection\u2463"}],"title":"4.8. The IDBCursor interface"}],"url":"#enumdef-idbcursordirection"}, "enumdef-idbrequestreadystate": {"dfnID":"enumdef-idbrequestreadystate","dfnText":"IDBRequestReadyState","external":false,"refSections":[{"refs":[{"id":"ref-for-enumdef-idbrequestreadystate"}],"title":"4.1. The IDBRequest interface"}],"url":"#enumdef-idbrequestreadystate"}, "enumdef-idbtransactiondurability": {"dfnID":"enumdef-idbtransactiondurability","dfnText":"IDBTransactionDurability","external":false,"refSections":[{"refs":[{"id":"ref-for-enumdef-idbtransactiondurability"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-enumdef-idbtransactiondurability\u2460"}],"title":"4.9. The IDBTransaction interface"}],"url":"#enumdef-idbtransactiondurability"}, "enumdef-idbtransactionmode": {"dfnID":"enumdef-idbtransactionmode","dfnText":"IDBTransactionMode","external":false,"refSections":[{"refs":[{"id":"ref-for-enumdef-idbtransactionmode"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-enumdef-idbtransactionmode\u2460"}],"title":"4.9. The IDBTransaction interface"}],"url":"#enumdef-idbtransactionmode"}, "equal-to": {"dfnID":"equal-to","dfnText":"equal to","external":false,"refSections":[{"refs":[{"id":"ref-for-equal-to"},{"id":"ref-for-equal-to\u2460"},{"id":"ref-for-equal-to\u2461"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-equal-to\u2462"},{"id":"ref-for-equal-to\u2463"},{"id":"ref-for-equal-to\u2464"},{"id":"ref-for-equal-to\u2465"},{"id":"ref-for-equal-to\u2466"},{"id":"ref-for-equal-to\u2467"},{"id":"ref-for-equal-to\u2468"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-equal-to\u2460\u24ea"},{"id":"ref-for-equal-to\u2460\u2460"},{"id":"ref-for-equal-to\u2460\u2461"},{"id":"ref-for-equal-to\u2460\u2462"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-equal-to\u2460\u2463"},{"id":"ref-for-equal-to\u2460\u2464"},{"id":"ref-for-equal-to\u2460\u2465"},{"id":"ref-for-equal-to\u2460\u2466"},{"id":"ref-for-equal-to\u2460\u2467"},{"id":"ref-for-equal-to\u2460\u2468"},{"id":"ref-for-equal-to\u2461\u24ea"},{"id":"ref-for-equal-to\u2461\u2460"},{"id":"ref-for-equal-to\u2461\u2461"},{"id":"ref-for-equal-to\u2461\u2462"},{"id":"ref-for-equal-to\u2461\u2463"}],"title":"6.7. Cursor iteration operation"},{"refs":[{"id":"ref-for-equal-to\u2461\u2464"}],"title":"7.4. Convert a value to a key"}],"url":"#equal-to"}, "evaluate-a-key-path-on-a-value": {"dfnID":"evaluate-a-key-path-on-a-value","dfnText":"evaluate a key path on a value","external":false,"refSections":[{"refs":[{"id":"ref-for-evaluate-a-key-path-on-a-value"},{"id":"ref-for-evaluate-a-key-path-on-a-value\u2460"}],"title":"7.1. Extract a key from a value"}],"url":"#evaluate-a-key-path-on-a-value"}, "eventdef-idbdatabase-close": {"dfnID":"eventdef-idbdatabase-close","dfnText":"close","external":false,"refSections":[{"refs":[{"id":"ref-for-eventdef-idbdatabase-close"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-eventdef-idbdatabase-close\u2460"},{"id":"ref-for-eventdef-idbdatabase-close\u2461"}],"title":"5.2. Closing a database connection"}],"url":"#eventdef-idbdatabase-close"}, "eventdef-idbdatabase-versionchange": {"dfnID":"eventdef-idbdatabase-versionchange","dfnText":"versionchange","external":false,"refSections":[{"refs":[{"id":"ref-for-eventdef-idbdatabase-versionchange"},{"id":"ref-for-eventdef-idbdatabase-versionchange\u2460"},{"id":"ref-for-eventdef-idbdatabase-versionchange\u2461"}],"title":"1. Introduction"},{"refs":[{"id":"ref-for-eventdef-idbdatabase-versionchange\u2462"},{"id":"ref-for-eventdef-idbdatabase-versionchange\u2463"},{"id":"ref-for-eventdef-idbdatabase-versionchange\u2464"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-eventdef-idbdatabase-versionchange\u2465"},{"id":"ref-for-eventdef-idbdatabase-versionchange\u2466"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-eventdef-idbdatabase-versionchange\u2467"},{"id":"ref-for-eventdef-idbdatabase-versionchange\u2468"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-eventdef-idbdatabase-versionchange\u2460\u24ea"},{"id":"ref-for-eventdef-idbdatabase-versionchange\u2460\u2460"}],"title":"5.3. Deleting a database"}],"url":"#eventdef-idbdatabase-versionchange"}, "eventdef-idbopendbrequest-blocked": {"dfnID":"eventdef-idbopendbrequest-blocked","dfnText":"blocked","external":false,"refSections":[{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-blocked"},{"id":"ref-for-eventdef-idbopendbrequest-blocked\u2460"}],"title":"1. Introduction"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-blocked\u2461"},{"id":"ref-for-eventdef-idbopendbrequest-blocked\u2462"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-blocked\u2463"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-blocked\u2464"}],"title":"5.3. Deleting a database"}],"url":"#eventdef-idbopendbrequest-blocked"}, "eventdef-idbopendbrequest-upgradeneeded": {"dfnID":"eventdef-idbopendbrequest-upgradeneeded","dfnText":"upgradeneeded","external":false,"refSections":[{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded"},{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2460"}],"title":"1. Introduction"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2461"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2462"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2463"},{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2464"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2465"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2466"}],"title":"2.8.1. Open requests"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2467"},{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2468"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-eventdef-idbopendbrequest-upgradeneeded\u2460\u24ea"}],"title":"5.7. Upgrading a database"}],"url":"#eventdef-idbopendbrequest-upgradeneeded"}, "eventdef-idbrequest-error": {"dfnID":"eventdef-idbrequest-error","dfnText":"error","external":false,"refSections":[{"refs":[{"id":"ref-for-eventdef-idbrequest-error"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-eventdef-idbrequest-error\u2460"}],"title":"2.8.1. Open requests"},{"refs":[{"id":"ref-for-eventdef-idbrequest-error\u2461"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-eventdef-idbrequest-error\u2462"},{"id":"ref-for-eventdef-idbrequest-error\u2463"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-eventdef-idbrequest-error\u2464"},{"id":"ref-for-eventdef-idbrequest-error\u2465"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-eventdef-idbrequest-error\u2466"},{"id":"ref-for-eventdef-idbrequest-error\u2467"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-eventdef-idbrequest-error\u2468"},{"id":"ref-for-eventdef-idbrequest-error\u2460\u24ea"}],"title":"5.5. Aborting a transaction"}],"url":"#eventdef-idbrequest-error"}, "eventdef-idbrequest-success": {"dfnID":"eventdef-idbrequest-success","dfnText":"success","external":false,"refSections":[{"refs":[{"id":"ref-for-eventdef-idbrequest-success"}],"title":"1. Introduction"},{"refs":[{"id":"ref-for-eventdef-idbrequest-success\u2460"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-eventdef-idbrequest-success\u2461"}],"title":"2.8.1. Open requests"},{"refs":[{"id":"ref-for-eventdef-idbrequest-success\u2462"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-eventdef-idbrequest-success\u2463"},{"id":"ref-for-eventdef-idbrequest-success\u2464"},{"id":"ref-for-eventdef-idbrequest-success\u2465"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-eventdef-idbrequest-success\u2466"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-eventdef-idbrequest-success\u2467"},{"id":"ref-for-eventdef-idbrequest-success\u2468"},{"id":"ref-for-eventdef-idbrequest-success\u2460\u24ea"},{"id":"ref-for-eventdef-idbrequest-success\u2460\u2460"}],"title":"4.9. The IDBTransaction interface"}],"url":"#eventdef-idbrequest-success"}, "eventdef-idbtransaction-abort": {"dfnID":"eventdef-idbtransaction-abort","dfnText":"abort","external":false,"refSections":[{"refs":[{"id":"ref-for-eventdef-idbtransaction-abort"},{"id":"ref-for-eventdef-idbtransaction-abort\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-eventdef-idbtransaction-abort\u2461"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-eventdef-idbtransaction-abort\u2462"}],"title":"5.5. Aborting a transaction"}],"url":"#eventdef-idbtransaction-abort"}, "eventdef-idbtransaction-complete": {"dfnID":"eventdef-idbtransaction-complete","dfnText":"complete","external":false,"refSections":[{"refs":[{"id":"ref-for-eventdef-idbtransaction-complete"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-eventdef-idbtransaction-complete\u2460"},{"id":"ref-for-eventdef-idbtransaction-complete\u2461"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-eventdef-idbtransaction-complete\u2462"},{"id":"ref-for-eventdef-idbtransaction-complete\u2463"}],"title":"5.4. Committing a transaction"}],"url":"#eventdef-idbtransaction-complete"}, "extract-a-key-from-a-value-using-a-key-path": {"dfnID":"extract-a-key-from-a-value-using-a-key-path","dfnText":"extract a key from a value using a key path","external":false,"refSections":[{"refs":[{"id":"ref-for-extract-a-key-from-a-value-using-a-key-path"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-extract-a-key-from-a-value-using-a-key-path\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-extract-a-key-from-a-value-using-a-key-path\u2461"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-extract-a-key-from-a-value-using-a-key-path\u2462"}],"title":"6.1. Object store storage operation"}],"url":"#extract-a-key-from-a-value-using-a-key-path"}, "f0951476": {"dfnID":"f0951476","dfnText":"EventHandler","external":true,"refSections":[{"refs":[{"id":"ref-for-eventhandler"},{"id":"ref-for-eventhandler\u2460"},{"id":"ref-for-eventhandler\u2461"},{"id":"ref-for-eventhandler\u2462"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-eventhandler\u2463"},{"id":"ref-for-eventhandler\u2464"},{"id":"ref-for-eventhandler\u2465"},{"id":"ref-for-eventhandler\u2466"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-eventhandler\u2467"},{"id":"ref-for-eventhandler\u2468"},{"id":"ref-for-eventhandler\u2460\u24ea"}],"title":"4.9. The IDBTransaction interface"}],"url":"https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"}, "f14b47b8": {"dfnID":"f14b47b8","dfnText":"unsigned long long","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-unsigned-long-long"},{"id":"ref-for-idl-unsigned-long-long\u2460"},{"id":"ref-for-idl-unsigned-long-long\u2461"},{"id":"ref-for-idl-unsigned-long-long\u2462"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-idl-unsigned-long-long\u2463"},{"id":"ref-for-idl-unsigned-long-long\u2464"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-idl-unsigned-long-long\u2465"}],"title":"4.4. The IDBDatabase interface"}],"url":"https://webidl.spec.whatwg.org/#idl-unsigned-long-long"}, "f426b2a9": {"dfnID":"f426b2a9","dfnText":"Array","external":true,"refSections":[{"refs":[{"id":"ref-for-sec-array-objects"}],"title":"2. Constructs"},{"refs":[{"id":"ref-for-sec-array-objects\u2460"}],"title":"2.3. Values"},{"refs":[{"id":"ref-for-sec-array-objects\u2461"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-sec-array-objects\u2462"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-sec-array-objects\u2463"},{"id":"ref-for-sec-array-objects\u2464"},{"id":"ref-for-sec-array-objects\u2465"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-sec-array-objects\u2466"},{"id":"ref-for-sec-array-objects\u2467"},{"id":"ref-for-sec-array-objects\u2468"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-sec-array-objects\u2460\u24ea"},{"id":"ref-for-sec-array-objects\u2460\u2460"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-sec-array-objects\u2460\u2461"},{"id":"ref-for-sec-array-objects\u2460\u2462"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-sec-array-objects\u2460\u2463"},{"id":"ref-for-sec-array-objects\u2460\u2464"},{"id":"ref-for-sec-array-objects\u2460\u2465"},{"id":"ref-for-sec-array-objects\u2460\u2466"}],"title":"7.2. Inject a key into a value"},{"refs":[{"id":"ref-for-sec-array-objects\u2460\u2467"}],"title":"7.4. Convert a value to a key"}],"url":"https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects"}, "f4813f78": {"dfnID":"f4813f78","dfnText":"byte","external":true,"refSections":[{"refs":[{"id":"ref-for-idl-byte"}],"title":"2.4. Keys"}],"url":"https://webidl.spec.whatwg.org/#idl-byte"}, "f534ab0c": {"dfnID":"f534ab0c","dfnText":"StructuredSerializeForStorage","external":true,"refSections":[{"refs":[{"id":"ref-for-structuredserializeforstorage"}],"title":"2.3. Values"},{"refs":[{"id":"ref-for-structuredserializeforstorage\u2460"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-structuredserializeforstorage\u2461"}],"title":"5.11. Clone a value"},{"refs":[{"id":"ref-for-structuredserializeforstorage\u2462"}],"title":"6. Database operations"},{"refs":[{"id":"ref-for-structuredserializeforstorage\u2463"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-structuredserializeforstorage\u2464"}],"title":"9.4. Persistence risks"}],"url":"https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage"}, "f5354b9d": {"dfnID":"f5354b9d","dfnText":"byte","external":true,"refSections":[{"refs":[{"id":"ref-for-byte"}],"title":"2.4. Keys"}],"url":"https://infra.spec.whatwg.org/#byte"}, "fefe0433": {"dfnID":"fefe0433","dfnText":"preventDefault()","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-event-preventdefault"}],"title":"5.10. Firing an error event"}],"url":"https://dom.spec.whatwg.org/#dom-event-preventdefault"}, "fire-a-success-event": {"dfnID":"fire-a-success-event","dfnText":"fire a success event","external":false,"refSections":[{"refs":[{"id":"ref-for-fire-a-success-event"},{"id":"ref-for-fire-a-success-event\u2460"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-fire-a-success-event\u2461"}],"title":"5.6. Asynchronously executing a request"}],"url":"#fire-a-success-event"}, "fire-a-version-change-event": {"dfnID":"fire-a-version-change-event","dfnText":"fire a version change event","external":false,"refSections":[{"refs":[{"id":"ref-for-fire-a-version-change-event"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-fire-a-version-change-event\u2460"},{"id":"ref-for-fire-a-version-change-event\u2461"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-fire-a-version-change-event\u2462"},{"id":"ref-for-fire-a-version-change-event\u2463"}],"title":"5.3. Deleting a database"},{"refs":[{"id":"ref-for-fire-a-version-change-event\u2464"}],"title":"5.7. Upgrading a database"}],"url":"#fire-a-version-change-event"}, "fire-an-error-event": {"dfnID":"fire-an-error-event","dfnText":"fire an error event","external":false,"refSections":[{"refs":[{"id":"ref-for-fire-an-error-event"},{"id":"ref-for-fire-an-error-event\u2460"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-fire-an-error-event\u2461"}],"title":"5.6. Asynchronously executing a request"}],"url":"#fire-an-error-event"}, "generate-a-key": {"dfnID":"generate-a-key","dfnText":"generate a key","external":false,"refSections":[{"refs":[{"id":"ref-for-generate-a-key"}],"title":"6.1. Object store storage operation"}],"url":"#generate-a-key"}, "greater-than": {"dfnID":"greater-than","dfnText":"greater than","external":false,"refSections":[{"refs":[{"id":"ref-for-greater-than"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-greater-than\u2460"},{"id":"ref-for-greater-than\u2461"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-greater-than\u2462"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-greater-than\u2463"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-greater-than\u2464"},{"id":"ref-for-greater-than\u2465"},{"id":"ref-for-greater-than\u2466"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-greater-than\u2467"},{"id":"ref-for-greater-than\u2468"},{"id":"ref-for-greater-than\u2460\u24ea"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-greater-than\u2460\u2460"},{"id":"ref-for-greater-than\u2460\u2461"},{"id":"ref-for-greater-than\u2460\u2462"},{"id":"ref-for-greater-than\u2460\u2463"},{"id":"ref-for-greater-than\u2460\u2464"},{"id":"ref-for-greater-than\u2460\u2465"},{"id":"ref-for-greater-than\u2460\u2466"},{"id":"ref-for-greater-than\u2460\u2467"},{"id":"ref-for-greater-than\u2460\u2468"},{"id":"ref-for-greater-than\u2461\u24ea"}],"title":"6.7. Cursor iteration operation"}],"url":"#greater-than"}, "idbcursor": {"dfnID":"idbcursor","dfnText":"IDBCursor","external":false,"refSections":[{"refs":[{"id":"ref-for-idbcursor"},{"id":"ref-for-idbcursor\u2460"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-idbcursor\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idbcursor\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idbcursor\u2463"},{"id":"ref-for-idbcursor\u2464"},{"id":"ref-for-idbcursor\u2465"},{"id":"ref-for-idbcursor\u2466"}],"title":"4.8. The IDBCursor interface"}],"url":"#idbcursor"}, "idbcursorwithvalue": {"dfnID":"idbcursorwithvalue","dfnText":"IDBCursorWithValue","external":false,"refSections":[{"refs":[{"id":"ref-for-idbcursorwithvalue"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idbcursorwithvalue\u2460"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idbcursorwithvalue\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"#idbcursorwithvalue"}, "idbdatabase": {"dfnID":"idbdatabase","dfnText":"IDBDatabase","external":false,"refSections":[{"refs":[{"id":"ref-for-idbdatabase"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-idbdatabase\u2460"},{"id":"ref-for-idbdatabase\u2461"},{"id":"ref-for-idbdatabase\u2462"},{"id":"ref-for-idbdatabase\u2463"},{"id":"ref-for-idbdatabase\u2464"},{"id":"ref-for-idbdatabase\u2465"},{"id":"ref-for-idbdatabase\u2466"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-idbdatabase\u2467"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-idbdatabase\u2468"},{"id":"ref-for-idbdatabase\u2460\u24ea"},{"id":"ref-for-idbdatabase\u2460\u2460"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#idbdatabase"}, "idbfactory": {"dfnID":"idbfactory","dfnText":"IDBFactory","external":false,"refSections":[{"refs":[{"id":"ref-for-idbfactory"},{"id":"ref-for-idbfactory\u2460"},{"id":"ref-for-idbfactory\u2461"}],"title":"4.3. The IDBFactory interface"}],"url":"#idbfactory"}, "idbindex": {"dfnID":"idbindex","dfnText":"IDBIndex","external":false,"refSections":[{"refs":[{"id":"ref-for-idbindex"},{"id":"ref-for-idbindex\u2460"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-idbindex\u2461"},{"id":"ref-for-idbindex\u2462"},{"id":"ref-for-idbindex\u2463"},{"id":"ref-for-idbindex\u2464"},{"id":"ref-for-idbindex\u2465"},{"id":"ref-for-idbindex\u2466"},{"id":"ref-for-idbindex\u2467"},{"id":"ref-for-idbindex\u2468"},{"id":"ref-for-idbindex\u2460\u24ea"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idbindex\u2460\u2460"},{"id":"ref-for-idbindex\u2460\u2461"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idbindex\u2460\u2462"},{"id":"ref-for-idbindex\u2460\u2463"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-idbindex\u2460\u2464"},{"id":"ref-for-idbindex\u2460\u2465"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#idbindex"}, "idbkeyrange": {"dfnID":"idbkeyrange","dfnText":"IDBKeyRange","external":false,"refSections":[{"refs":[{"id":"ref-for-idbkeyrange"},{"id":"ref-for-idbkeyrange\u2460"},{"id":"ref-for-idbkeyrange\u2461"},{"id":"ref-for-idbkeyrange\u2462"},{"id":"ref-for-idbkeyrange\u2463"},{"id":"ref-for-idbkeyrange\u2464"},{"id":"ref-for-idbkeyrange\u2465"},{"id":"ref-for-idbkeyrange\u2466"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idbkeyrange\u2467"},{"id":"ref-for-idbkeyrange\u2468"},{"id":"ref-for-idbkeyrange\u2460\u24ea"},{"id":"ref-for-idbkeyrange\u2460\u2460"},{"id":"ref-for-idbkeyrange\u2460\u2461"},{"id":"ref-for-idbkeyrange\u2460\u2462"},{"id":"ref-for-idbkeyrange\u2460\u2463"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idbkeyrange\u2460\u2464"},{"id":"ref-for-idbkeyrange\u2460\u2465"},{"id":"ref-for-idbkeyrange\u2460\u2466"},{"id":"ref-for-idbkeyrange\u2460\u2467"},{"id":"ref-for-idbkeyrange\u2460\u2468"},{"id":"ref-for-idbkeyrange\u2461\u24ea"},{"id":"ref-for-idbkeyrange\u2461\u2460"},{"id":"ref-for-idbkeyrange\u2461\u2461"},{"id":"ref-for-idbkeyrange\u2461\u2462"},{"id":"ref-for-idbkeyrange\u2461\u2463"},{"id":"ref-for-idbkeyrange\u2461\u2464"},{"id":"ref-for-idbkeyrange\u2461\u2465"},{"id":"ref-for-idbkeyrange\u2461\u2466"},{"id":"ref-for-idbkeyrange\u2461\u2467"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#idbkeyrange"}, "idbobjectstore": {"dfnID":"idbobjectstore","dfnText":"IDBObjectStore","external":false,"refSections":[{"refs":[{"id":"ref-for-idbobjectstore"},{"id":"ref-for-idbobjectstore\u2460"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-idbobjectstore\u2461"},{"id":"ref-for-idbobjectstore\u2462"},{"id":"ref-for-idbobjectstore\u2463"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-idbobjectstore\u2464"},{"id":"ref-for-idbobjectstore\u2465"},{"id":"ref-for-idbobjectstore\u2466"},{"id":"ref-for-idbobjectstore\u2467"},{"id":"ref-for-idbobjectstore\u2468"},{"id":"ref-for-idbobjectstore\u2460\u24ea"},{"id":"ref-for-idbobjectstore\u2460\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idbobjectstore\u2460\u2461"},{"id":"ref-for-idbobjectstore\u2460\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idbobjectstore\u2460\u2463"},{"id":"ref-for-idbobjectstore\u2460\u2464"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-idbobjectstore\u2460\u2465"},{"id":"ref-for-idbobjectstore\u2460\u2466"},{"id":"ref-for-idbobjectstore\u2460\u2467"},{"id":"ref-for-idbobjectstore\u2460\u2468"},{"id":"ref-for-idbobjectstore\u2461\u24ea"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-idbobjectstore\u2461\u2460"},{"id":"ref-for-idbobjectstore\u2461\u2461"},{"id":"ref-for-idbobjectstore\u2461\u2462"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#idbobjectstore"}, "idbopendbrequest": {"dfnID":"idbopendbrequest","dfnText":"IDBOpenDBRequest","external":false,"refSections":[{"refs":[{"id":"ref-for-idbopendbrequest"},{"id":"ref-for-idbopendbrequest\u2460"},{"id":"ref-for-idbopendbrequest\u2461"},{"id":"ref-for-idbopendbrequest\u2462"}],"title":"4.3. The IDBFactory interface"}],"url":"#idbopendbrequest"}, "idbrequest": {"dfnID":"idbrequest","dfnText":"IDBRequest","external":false,"refSections":[{"refs":[{"id":"ref-for-idbrequest"},{"id":"ref-for-idbrequest\u2460"}],"title":"4. API"},{"refs":[{"id":"ref-for-idbrequest\u2461"},{"id":"ref-for-idbrequest\u2462"},{"id":"ref-for-idbrequest\u2463"},{"id":"ref-for-idbrequest\u2464"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-idbrequest\u2465"},{"id":"ref-for-idbrequest\u2466"},{"id":"ref-for-idbrequest\u2467"},{"id":"ref-for-idbrequest\u2468"},{"id":"ref-for-idbrequest\u2460\u24ea"},{"id":"ref-for-idbrequest\u2460\u2460"},{"id":"ref-for-idbrequest\u2460\u2461"},{"id":"ref-for-idbrequest\u2460\u2462"},{"id":"ref-for-idbrequest\u2460\u2463"},{"id":"ref-for-idbrequest\u2460\u2464"},{"id":"ref-for-idbrequest\u2460\u2465"},{"id":"ref-for-idbrequest\u2460\u2466"},{"id":"ref-for-idbrequest\u2460\u2467"},{"id":"ref-for-idbrequest\u2460\u2468"},{"id":"ref-for-idbrequest\u2461\u24ea"},{"id":"ref-for-idbrequest\u2461\u2460"},{"id":"ref-for-idbrequest\u2461\u2461"},{"id":"ref-for-idbrequest\u2461\u2462"},{"id":"ref-for-idbrequest\u2461\u2463"},{"id":"ref-for-idbrequest\u2461\u2464"},{"id":"ref-for-idbrequest\u2461\u2465"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idbrequest\u2461\u2466"},{"id":"ref-for-idbrequest\u2461\u2467"},{"id":"ref-for-idbrequest\u2461\u2468"},{"id":"ref-for-idbrequest\u2462\u24ea"},{"id":"ref-for-idbrequest\u2462\u2460"},{"id":"ref-for-idbrequest\u2462\u2461"},{"id":"ref-for-idbrequest\u2462\u2462"},{"id":"ref-for-idbrequest\u2462\u2463"},{"id":"ref-for-idbrequest\u2462\u2464"},{"id":"ref-for-idbrequest\u2462\u2465"},{"id":"ref-for-idbrequest\u2462\u2466"},{"id":"ref-for-idbrequest\u2462\u2467"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-idbrequest\u2462\u2468"},{"id":"ref-for-idbrequest\u2463\u24ea"},{"id":"ref-for-idbrequest\u2463\u2460"},{"id":"ref-for-idbrequest\u2463\u2461"},{"id":"ref-for-idbrequest\u2463\u2462"},{"id":"ref-for-idbrequest\u2463\u2463"}],"title":"4.8. The IDBCursor interface"}],"url":"#idbrequest"}, "idbtransaction": {"dfnID":"idbtransaction","dfnText":"IDBTransaction","external":false,"refSections":[{"refs":[{"id":"ref-for-idbtransaction"},{"id":"ref-for-idbtransaction\u2460"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-idbtransaction\u2461"},{"id":"ref-for-idbtransaction\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-idbtransaction\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-idbtransaction\u2464"},{"id":"ref-for-idbtransaction\u2465"},{"id":"ref-for-idbtransaction\u2466"},{"id":"ref-for-idbtransaction\u2467"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-idbtransaction\u2468"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#idbtransaction"}, "idbversionchangeevent": {"dfnID":"idbversionchangeevent","dfnText":"IDBVersionChangeEvent","external":false,"refSections":[{"refs":[{"id":"ref-for-idbversionchangeevent"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-idbversionchangeevent\u2460"}],"title":"4.3. The IDBFactory interface"}],"url":"#idbversionchangeevent"}, "identifier": {"dfnID":"identifier","dfnText":"identifier","external":false,"refSections":[{"refs":[{"id":"ref-for-identifier"}],"title":"2.5. Key path"}],"url":"#identifier"}, "in": {"dfnID":"in","dfnText":"in a key range","external":false,"refSections":[{"refs":[{"id":"ref-for-in"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-in\u2460"}],"title":"4.7. The IDBKeyRange interface"},{"refs":[{"id":"ref-for-in\u2461"},{"id":"ref-for-in\u2462"},{"id":"ref-for-in\u2463"},{"id":"ref-for-in\u2464"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-in\u2465"},{"id":"ref-for-in\u2466"},{"id":"ref-for-in\u2467"},{"id":"ref-for-in\u2468"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-in\u2460\u24ea"},{"id":"ref-for-in\u2460\u2460"}],"title":"6.4. Object store deletion operation"},{"refs":[{"id":"ref-for-in\u2460\u2461"}],"title":"6.5. Record counting operation"},{"refs":[{"id":"ref-for-in\u2460\u2462"},{"id":"ref-for-in\u2460\u2463"},{"id":"ref-for-in\u2460\u2464"},{"id":"ref-for-in\u2460\u2465"}],"title":"6.7. Cursor iteration operation"}],"url":"#in"}, "index-concept": {"dfnID":"index-concept","dfnText":"index","external":false,"refSections":[{"refs":[{"id":"ref-for-index-concept"}],"title":"2.2.1. Object store handle"},{"refs":[{"id":"ref-for-index-concept\u2460"},{"id":"ref-for-index-concept\u2461"},{"id":"ref-for-index-concept\u2462"},{"id":"ref-for-index-concept\u2463"},{"id":"ref-for-index-concept\u2464"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-index-concept\u2465"},{"id":"ref-for-index-concept\u2466"},{"id":"ref-for-index-concept\u2467"}],"title":"2.6.1. Index handle"},{"refs":[{"id":"ref-for-index-concept\u2468"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-index-concept\u2460\u24ea"},{"id":"ref-for-index-concept\u2460\u2460"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-index-concept\u2460\u2461"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-index-concept\u2460\u2462"},{"id":"ref-for-index-concept\u2460\u2463"},{"id":"ref-for-index-concept\u2460\u2464"},{"id":"ref-for-index-concept\u2460\u2465"},{"id":"ref-for-index-concept\u2460\u2466"},{"id":"ref-for-index-concept\u2460\u2467"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-index-concept\u2460\u2468"},{"id":"ref-for-index-concept\u2461\u24ea"},{"id":"ref-for-index-concept\u2461\u2460"},{"id":"ref-for-index-concept\u2461\u2461"},{"id":"ref-for-index-concept\u2461\u2462"},{"id":"ref-for-index-concept\u2461\u2463"},{"id":"ref-for-index-concept\u2461\u2464"},{"id":"ref-for-index-concept\u2461\u2465"},{"id":"ref-for-index-concept\u2461\u2466"},{"id":"ref-for-index-concept\u2461\u2467"},{"id":"ref-for-index-concept\u2461\u2468"},{"id":"ref-for-index-concept\u2462\u24ea"},{"id":"ref-for-index-concept\u2462\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-index-concept\u2462\u2461"},{"id":"ref-for-index-concept\u2462\u2462"},{"id":"ref-for-index-concept\u2462\u2463"},{"id":"ref-for-index-concept\u2462\u2464"},{"id":"ref-for-index-concept\u2462\u2465"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-index-concept\u2462\u2466"},{"id":"ref-for-index-concept\u2462\u2467"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-index-concept\u2462\u2468"},{"id":"ref-for-index-concept\u2463\u24ea"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-index-concept\u2463\u2460"},{"id":"ref-for-index-concept\u2463\u2461"},{"id":"ref-for-index-concept\u2463\u2462"},{"id":"ref-for-index-concept\u2463\u2463"}],"title":"5.8. Aborting an upgrade transaction"},{"refs":[{"id":"ref-for-index-concept\u2463\u2464"}],"title":"6. Database operations"},{"refs":[{"id":"ref-for-index-concept\u2463\u2465"}],"title":"6.6. Object store clear operation"},{"refs":[{"id":"ref-for-index-concept\u2463\u2466"},{"id":"ref-for-index-concept\u2463\u2467"},{"id":"ref-for-index-concept\u2463\u2468"},{"id":"ref-for-index-concept\u2464\u24ea"},{"id":"ref-for-index-concept\u2464\u2460"},{"id":"ref-for-index-concept\u2464\u2461"},{"id":"ref-for-index-concept\u2464\u2462"},{"id":"ref-for-index-concept\u2464\u2463"}],"title":"6.7. Cursor iteration operation"}],"url":"#index-concept"}, "index-handle": {"dfnID":"index-handle","dfnText":"index\nhandle","external":false,"refSections":[{"refs":[{"id":"ref-for-index-handle"},{"id":"ref-for-index-handle\u2460"},{"id":"ref-for-index-handle\u2461"},{"id":"ref-for-index-handle\u2462"},{"id":"ref-for-index-handle\u2463"}],"title":"2.6.1. Index handle"},{"refs":[{"id":"ref-for-index-handle\u2464"},{"id":"ref-for-index-handle\u2465"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-index-handle\u2466"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-index-handle\u2467"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-index-handle\u2468"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#index-handle"}, "index-handle-index": {"dfnID":"index-handle-index","dfnText":"index","external":false,"refSections":[{"refs":[{"id":"ref-for-index-handle-index"}],"title":"2.6.1. Index handle"},{"refs":[{"id":"ref-for-index-handle-index\u2460"},{"id":"ref-for-index-handle-index\u2461"},{"id":"ref-for-index-handle-index\u2462"},{"id":"ref-for-index-handle-index\u2463"},{"id":"ref-for-index-handle-index\u2464"},{"id":"ref-for-index-handle-index\u2465"},{"id":"ref-for-index-handle-index\u2466"},{"id":"ref-for-index-handle-index\u2467"},{"id":"ref-for-index-handle-index\u2468"},{"id":"ref-for-index-handle-index\u2460\u24ea"},{"id":"ref-for-index-handle-index\u2460\u2460"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-index-handle-index\u2460\u2461"},{"id":"ref-for-index-handle-index\u2460\u2462"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#index-handle-index"}, "index-handle-name": {"dfnID":"index-handle-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-index-handle-name"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-index-handle-name\u2460"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#index-handle-name"}, "index-handle-object-store-handle": {"dfnID":"index-handle-object-store-handle","dfnText":"object store handle","external":false,"refSections":[{"refs":[{"id":"ref-for-index-handle-object-store-handle"}],"title":"4.6. The IDBIndex interface"}],"url":"#index-handle-object-store-handle"}, "index-handle-transaction": {"dfnID":"index-handle-transaction","dfnText":"transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-index-handle-transaction"},{"id":"ref-for-index-handle-transaction\u2460"},{"id":"ref-for-index-handle-transaction\u2461"},{"id":"ref-for-index-handle-transaction\u2462"},{"id":"ref-for-index-handle-transaction\u2463"},{"id":"ref-for-index-handle-transaction\u2464"},{"id":"ref-for-index-handle-transaction\u2465"},{"id":"ref-for-index-handle-transaction\u2466"}],"title":"4.6. The IDBIndex interface"}],"url":"#index-handle-transaction"}, "index-key-path": {"dfnID":"index-key-path","dfnText":"key path","external":false,"refSections":[{"refs":[{"id":"ref-for-index-key-path"},{"id":"ref-for-index-key-path\u2460"},{"id":"ref-for-index-key-path\u2461"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-index-key-path\u2462"},{"id":"ref-for-index-key-path\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-index-key-path\u2464"}],"title":"6.1. Object store storage operation"}],"url":"#index-key-path"}, "index-keys": {"dfnID":"index-keys","dfnText":"keys","external":false,"refSections":[{"refs":[{"id":"ref-for-index-keys"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-index-keys\u2460"},{"id":"ref-for-index-keys\u2461"},{"id":"ref-for-index-keys\u2462"},{"id":"ref-for-index-keys\u2463"}],"title":"6.3. Index retrieval operations"}],"url":"#index-keys"}, "index-list-of-records": {"dfnID":"index-list-of-records","dfnText":"list of records","external":false,"refSections":[{"refs":[{"id":"ref-for-index-list-of-records"},{"id":"ref-for-index-list-of-records\u2460"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-index-list-of-records\u2461"},{"id":"ref-for-index-list-of-records\u2462"},{"id":"ref-for-index-list-of-records\u2463"},{"id":"ref-for-index-list-of-records\u2464"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-index-list-of-records\u2465"}],"title":"6.4. Object store deletion operation"}],"url":"#index-list-of-records"}, "index-multientry-flag": {"dfnID":"index-multientry-flag","dfnText":"multiEntry flag","external":false,"refSections":[{"refs":[{"id":"ref-for-index-multientry-flag"},{"id":"ref-for-index-multientry-flag\u2460"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-index-multientry-flag\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-index-multientry-flag\u2462"},{"id":"ref-for-index-multientry-flag\u2463"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-index-multientry-flag\u2464"},{"id":"ref-for-index-multientry-flag\u2465"},{"id":"ref-for-index-multientry-flag\u2466"},{"id":"ref-for-index-multientry-flag\u2467"},{"id":"ref-for-index-multientry-flag\u2468"}],"title":"6.1. Object store storage operation"}],"url":"#index-multientry-flag"}, "index-name": {"dfnID":"index-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-index-name"}],"title":"2.6.1. Index handle"},{"refs":[{"id":"ref-for-index-name\u2460"},{"id":"ref-for-index-name\u2461"},{"id":"ref-for-index-name\u2462"},{"id":"ref-for-index-name\u2463"},{"id":"ref-for-index-name\u2464"},{"id":"ref-for-index-name\u2465"},{"id":"ref-for-index-name\u2466"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-index-name\u2467"},{"id":"ref-for-index-name\u2468"},{"id":"ref-for-index-name\u2460\u24ea"},{"id":"ref-for-index-name\u2460\u2460"},{"id":"ref-for-index-name\u2460\u2461"},{"id":"ref-for-index-name\u2460\u2462"},{"id":"ref-for-index-name\u2460\u2463"},{"id":"ref-for-index-name\u2460\u2464"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-index-name\u2460\u2465"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#index-name"}, "index-records": {"dfnID":"index-records","dfnText":"records","external":false,"refSections":[{"refs":[{"id":"ref-for-index-records"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-index-records\u2460"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-index-records\u2461"},{"id":"ref-for-index-records\u2462"},{"id":"ref-for-index-records\u2463"}],"title":"6.3. Index retrieval operations"}],"url":"#index-records"}, "index-referenced": {"dfnID":"index-referenced","dfnText":"referenced","external":false,"refSections":[{"refs":[{"id":"ref-for-index-referenced"},{"id":"ref-for-index-referenced\u2460"},{"id":"ref-for-index-referenced\u2461"},{"id":"ref-for-index-referenced\u2462"},{"id":"ref-for-index-referenced\u2463"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-index-referenced\u2464"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-index-referenced\u2465"},{"id":"ref-for-index-referenced\u2466"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-index-referenced\u2467"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-index-referenced\u2468"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-index-referenced\u2460\u24ea"}],"title":"6.4. Object store deletion operation"},{"refs":[{"id":"ref-for-index-referenced\u2460\u2460"}],"title":"6.6. Object store clear operation"}],"url":"#index-referenced"}, "index-referenced-value": {"dfnID":"index-referenced-value","dfnText":"referenced value","external":false,"refSections":[{"refs":[{"id":"ref-for-index-referenced-value"},{"id":"ref-for-index-referenced-value\u2460"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-index-referenced-value\u2461"},{"id":"ref-for-index-referenced-value\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-index-referenced-value\u2463"},{"id":"ref-for-index-referenced-value\u2464"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-index-referenced-value\u2465"}],"title":"6.7. Cursor iteration operation"}],"url":"#index-referenced-value"}, "index-unique-flag": {"dfnID":"index-unique-flag","dfnText":"unique flag","external":false,"refSections":[{"refs":[{"id":"ref-for-index-unique-flag"},{"id":"ref-for-index-unique-flag\u2460"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-index-unique-flag\u2461"},{"id":"ref-for-index-unique-flag\u2462"},{"id":"ref-for-index-unique-flag\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-index-unique-flag\u2464"},{"id":"ref-for-index-unique-flag\u2465"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-index-unique-flag\u2466"},{"id":"ref-for-index-unique-flag\u2467"}],"title":"6.1. Object store storage operation"}],"url":"#index-unique-flag"}, "index-values": {"dfnID":"index-values","dfnText":"values","external":false,"refSections":[{"refs":[{"id":"ref-for-index-values"}],"title":"6.3. Index retrieval operations"}],"url":"#index-values"}, "inject-a-key-into-a-value-using-a-key-path": {"dfnID":"inject-a-key-into-a-value-using-a-key-path","dfnText":"inject a key into a value using a key path","external":false,"refSections":[{"refs":[{"id":"ref-for-inject-a-key-into-a-value-using-a-key-path"}],"title":"6.1. Object store storage operation"}],"url":"#inject-a-key-into-a-value-using-a-key-path"}, "iterate-a-cursor": {"dfnID":"iterate-a-cursor","dfnText":"iterate a cursor","external":false,"refSections":[{"refs":[{"id":"ref-for-iterate-a-cursor"},{"id":"ref-for-iterate-a-cursor\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-iterate-a-cursor\u2461"},{"id":"ref-for-iterate-a-cursor\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-iterate-a-cursor\u2463"},{"id":"ref-for-iterate-a-cursor\u2464"},{"id":"ref-for-iterate-a-cursor\u2465"}],"title":"4.8. The IDBCursor interface"}],"url":"#iterate-a-cursor"}, "key": {"dfnID":"key","dfnText":"key","external":false,"refSections":[{"refs":[{"id":"ref-for-key"},{"id":"ref-for-key\u2460"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-key\u2461"},{"id":"ref-for-key\u2462"},{"id":"ref-for-key\u2463"},{"id":"ref-for-key\u2464"},{"id":"ref-for-key\u2465"},{"id":"ref-for-key\u2466"},{"id":"ref-for-key\u2467"},{"id":"ref-for-key\u2468"},{"id":"ref-for-key\u2460\u24ea"},{"id":"ref-for-key\u2460\u2460"},{"id":"ref-for-key\u2460\u2461"},{"id":"ref-for-key\u2460\u2462"},{"id":"ref-for-key\u2460\u2463"},{"id":"ref-for-key\u2460\u2464"},{"id":"ref-for-key\u2460\u2465"},{"id":"ref-for-key\u2460\u2466"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-key\u2460\u2467"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-key\u2460\u2468"},{"id":"ref-for-key\u2461\u24ea"},{"id":"ref-for-key\u2461\u2460"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-key\u2461\u2461"},{"id":"ref-for-key\u2461\u2462"},{"id":"ref-for-key\u2461\u2463"},{"id":"ref-for-key\u2461\u2464"},{"id":"ref-for-key\u2461\u2465"},{"id":"ref-for-key\u2461\u2466"},{"id":"ref-for-key\u2461\u2467"},{"id":"ref-for-key\u2461\u2468"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-key\u2462\u24ea"},{"id":"ref-for-key\u2462\u2460"},{"id":"ref-for-key\u2462\u2461"},{"id":"ref-for-key\u2462\u2462"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-key\u2462\u2463"},{"id":"ref-for-key\u2462\u2464"},{"id":"ref-for-key\u2462\u2465"},{"id":"ref-for-key\u2462\u2466"},{"id":"ref-for-key\u2462\u2467"},{"id":"ref-for-key\u2462\u2468"},{"id":"ref-for-key\u2463\u24ea"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-key\u2463\u2460"},{"id":"ref-for-key\u2463\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-key\u2463\u2462"},{"id":"ref-for-key\u2463\u2463"},{"id":"ref-for-key\u2463\u2464"},{"id":"ref-for-key\u2463\u2465"},{"id":"ref-for-key\u2463\u2466"},{"id":"ref-for-key\u2463\u2467"},{"id":"ref-for-key\u2463\u2468"},{"id":"ref-for-key\u2464\u24ea"},{"id":"ref-for-key\u2464\u2460"},{"id":"ref-for-key\u2464\u2461"},{"id":"ref-for-key\u2464\u2462"},{"id":"ref-for-key\u2464\u2463"},{"id":"ref-for-key\u2464\u2464"},{"id":"ref-for-key\u2464\u2465"},{"id":"ref-for-key\u2464\u2466"},{"id":"ref-for-key\u2464\u2467"},{"id":"ref-for-key\u2464\u2468"},{"id":"ref-for-key\u2465\u24ea"},{"id":"ref-for-key\u2465\u2460"},{"id":"ref-for-key\u2465\u2461"},{"id":"ref-for-key\u2465\u2462"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-key\u2465\u2463"},{"id":"ref-for-key\u2465\u2464"},{"id":"ref-for-key\u2465\u2465"},{"id":"ref-for-key\u2465\u2466"},{"id":"ref-for-key\u2465\u2467"},{"id":"ref-for-key\u2465\u2468"},{"id":"ref-for-key\u2466\u24ea"},{"id":"ref-for-key\u2466\u2460"},{"id":"ref-for-key\u2466\u2461"},{"id":"ref-for-key\u2466\u2462"},{"id":"ref-for-key\u2466\u2463"},{"id":"ref-for-key\u2466\u2464"},{"id":"ref-for-key\u2466\u2465"},{"id":"ref-for-key\u2466\u2466"},{"id":"ref-for-key\u2466\u2467"},{"id":"ref-for-key\u2466\u2468"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-key\u2467\u24ea"},{"id":"ref-for-key\u2467\u2460"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-key\u2467\u2461"},{"id":"ref-for-key\u2467\u2462"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-key\u2467\u2463"},{"id":"ref-for-key\u2467\u2464"},{"id":"ref-for-key\u2467\u2465"},{"id":"ref-for-key\u2467\u2466"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-key\u2467\u2467"},{"id":"ref-for-key\u2467\u2468"},{"id":"ref-for-key\u2468\u24ea"},{"id":"ref-for-key\u2468\u2460"}],"title":"6.7. Cursor iteration operation"},{"refs":[{"id":"ref-for-key\u2468\u2461"}],"title":"7. ECMAScript binding"},{"refs":[{"id":"ref-for-key\u2468\u2462"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-key\u2468\u2463"},{"id":"ref-for-key\u2468\u2464"},{"id":"ref-for-key\u2468\u2465"},{"id":"ref-for-key\u2468\u2466"},{"id":"ref-for-key\u2468\u2467"},{"id":"ref-for-key\u2468\u2468"}],"title":"7.4. Convert a value to a key"}],"url":"#key"}, "key-generator": {"dfnID":"key-generator","dfnText":"key generator","external":false,"refSections":[{"refs":[{"id":"ref-for-key-generator"},{"id":"ref-for-key-generator\u2460"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-key-generator\u2461"},{"id":"ref-for-key-generator\u2462"},{"id":"ref-for-key-generator\u2463"},{"id":"ref-for-key-generator\u2464"},{"id":"ref-for-key-generator\u2465"},{"id":"ref-for-key-generator\u2466"},{"id":"ref-for-key-generator\u2467"},{"id":"ref-for-key-generator\u2468"},{"id":"ref-for-key-generator\u2460\u24ea"},{"id":"ref-for-key-generator\u2460\u2460"},{"id":"ref-for-key-generator\u2460\u2461"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-key-generator\u2460\u2462"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-key-generator\u2460\u2463"},{"id":"ref-for-key-generator\u2460\u2464"},{"id":"ref-for-key-generator\u2460\u2465"},{"id":"ref-for-key-generator\u2460\u2466"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-key-generator\u2460\u2467"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-key-generator\u2460\u2468"}],"title":"7.2. Inject a key into a value"}],"url":"#key-generator"}, "key-generator-current-number": {"dfnID":"key-generator-current-number","dfnText":"current number","external":false,"refSections":[{"refs":[{"id":"ref-for-key-generator-current-number"},{"id":"ref-for-key-generator-current-number\u2460"},{"id":"ref-for-key-generator-current-number\u2461"},{"id":"ref-for-key-generator-current-number\u2462"},{"id":"ref-for-key-generator-current-number\u2463"},{"id":"ref-for-key-generator-current-number\u2464"},{"id":"ref-for-key-generator-current-number\u2465"},{"id":"ref-for-key-generator-current-number\u2466"},{"id":"ref-for-key-generator-current-number\u2467"},{"id":"ref-for-key-generator-current-number\u2468"},{"id":"ref-for-key-generator-current-number\u2460\u24ea"},{"id":"ref-for-key-generator-current-number\u2460\u2460"},{"id":"ref-for-key-generator-current-number\u2460\u2461"},{"id":"ref-for-key-generator-current-number\u2460\u2462"},{"id":"ref-for-key-generator-current-number\u2460\u2463"},{"id":"ref-for-key-generator-current-number\u2460\u2464"},{"id":"ref-for-key-generator-current-number\u2460\u2465"},{"id":"ref-for-key-generator-current-number\u2460\u2466"}],"title":"2.11. Key generators"}],"url":"#key-generator-current-number"}, "key-path": {"dfnID":"key-path","dfnText":"key path","external":false,"refSections":[{"refs":[{"id":"ref-for-key-path"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-key-path\u2460"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-key-path\u2461"},{"id":"ref-for-key-path\u2462"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-key-path\u2463"}],"title":"7. ECMAScript binding"},{"refs":[{"id":"ref-for-key-path\u2464"}],"title":"7.1. Extract a key from a value"},{"refs":[{"id":"ref-for-key-path\u2465"}],"title":"7.2. Inject a key into a value"}],"url":"#key-path"}, "key-range": {"dfnID":"key-range","dfnText":"key range","external":false,"refSections":[{"refs":[{"id":"ref-for-key-range"},{"id":"ref-for-key-range\u2460"},{"id":"ref-for-key-range\u2461"},{"id":"ref-for-key-range\u2462"},{"id":"ref-for-key-range\u2463"},{"id":"ref-for-key-range\u2464"},{"id":"ref-for-key-range\u2465"},{"id":"ref-for-key-range\u2466"},{"id":"ref-for-key-range\u2467"},{"id":"ref-for-key-range\u2468"},{"id":"ref-for-key-range\u2460\u24ea"},{"id":"ref-for-key-range\u2460\u2460"},{"id":"ref-for-key-range\u2460\u2461"},{"id":"ref-for-key-range\u2460\u2462"},{"id":"ref-for-key-range\u2460\u2463"},{"id":"ref-for-key-range\u2460\u2464"},{"id":"ref-for-key-range\u2460\u2465"},{"id":"ref-for-key-range\u2460\u2466"},{"id":"ref-for-key-range\u2460\u2467"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-key-range\u2460\u2468"},{"id":"ref-for-key-range\u2461\u24ea"},{"id":"ref-for-key-range\u2461\u2460"},{"id":"ref-for-key-range\u2461\u2461"},{"id":"ref-for-key-range\u2461\u2462"},{"id":"ref-for-key-range\u2461\u2463"},{"id":"ref-for-key-range\u2461\u2464"},{"id":"ref-for-key-range\u2461\u2465"},{"id":"ref-for-key-range\u2461\u2466"},{"id":"ref-for-key-range\u2461\u2467"},{"id":"ref-for-key-range\u2461\u2468"},{"id":"ref-for-key-range\u2462\u24ea"},{"id":"ref-for-key-range\u2462\u2460"},{"id":"ref-for-key-range\u2462\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-key-range\u2462\u2462"},{"id":"ref-for-key-range\u2462\u2463"},{"id":"ref-for-key-range\u2462\u2464"},{"id":"ref-for-key-range\u2462\u2465"},{"id":"ref-for-key-range\u2462\u2466"},{"id":"ref-for-key-range\u2462\u2467"},{"id":"ref-for-key-range\u2462\u2468"},{"id":"ref-for-key-range\u2463\u24ea"},{"id":"ref-for-key-range\u2463\u2460"},{"id":"ref-for-key-range\u2463\u2461"},{"id":"ref-for-key-range\u2463\u2462"},{"id":"ref-for-key-range\u2463\u2463"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-key-range\u2463\u2464"},{"id":"ref-for-key-range\u2463\u2465"},{"id":"ref-for-key-range\u2463\u2466"},{"id":"ref-for-key-range\u2463\u2467"},{"id":"ref-for-key-range\u2463\u2468"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#key-range"}, "key-range-lower-bound": {"dfnID":"key-range-lower-bound","dfnText":"lower bound","external":false,"refSections":[{"refs":[{"id":"ref-for-key-range-lower-bound"},{"id":"ref-for-key-range-lower-bound\u2460"},{"id":"ref-for-key-range-lower-bound\u2461"},{"id":"ref-for-key-range-lower-bound\u2462"},{"id":"ref-for-key-range-lower-bound\u2463"},{"id":"ref-for-key-range-lower-bound\u2464"},{"id":"ref-for-key-range-lower-bound\u2465"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-key-range-lower-bound\u2466"},{"id":"ref-for-key-range-lower-bound\u2467"},{"id":"ref-for-key-range-lower-bound\u2468"},{"id":"ref-for-key-range-lower-bound\u2460\u24ea"},{"id":"ref-for-key-range-lower-bound\u2460\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#key-range-lower-bound"}, "key-range-lower-open-flag": {"dfnID":"key-range-lower-open-flag","dfnText":"lower open flag","external":false,"refSections":[{"refs":[{"id":"ref-for-key-range-lower-open-flag"},{"id":"ref-for-key-range-lower-open-flag\u2460"},{"id":"ref-for-key-range-lower-open-flag\u2461"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-key-range-lower-open-flag\u2462"},{"id":"ref-for-key-range-lower-open-flag\u2463"},{"id":"ref-for-key-range-lower-open-flag\u2464"},{"id":"ref-for-key-range-lower-open-flag\u2465"},{"id":"ref-for-key-range-lower-open-flag\u2466"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#key-range-lower-open-flag"}, "key-range-upper-bound": {"dfnID":"key-range-upper-bound","dfnText":"upper bound","external":false,"refSections":[{"refs":[{"id":"ref-for-key-range-upper-bound"},{"id":"ref-for-key-range-upper-bound\u2460"},{"id":"ref-for-key-range-upper-bound\u2461"},{"id":"ref-for-key-range-upper-bound\u2462"},{"id":"ref-for-key-range-upper-bound\u2463"},{"id":"ref-for-key-range-upper-bound\u2464"},{"id":"ref-for-key-range-upper-bound\u2465"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-key-range-upper-bound\u2466"},{"id":"ref-for-key-range-upper-bound\u2467"},{"id":"ref-for-key-range-upper-bound\u2468"},{"id":"ref-for-key-range-upper-bound\u2460\u24ea"},{"id":"ref-for-key-range-upper-bound\u2460\u2460"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#key-range-upper-bound"}, "key-range-upper-open-flag": {"dfnID":"key-range-upper-open-flag","dfnText":"upper open flag","external":false,"refSections":[{"refs":[{"id":"ref-for-key-range-upper-open-flag"},{"id":"ref-for-key-range-upper-open-flag\u2460"},{"id":"ref-for-key-range-upper-open-flag\u2461"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-key-range-upper-open-flag\u2462"},{"id":"ref-for-key-range-upper-open-flag\u2463"},{"id":"ref-for-key-range-upper-open-flag\u2464"},{"id":"ref-for-key-range-upper-open-flag\u2465"},{"id":"ref-for-key-range-upper-open-flag\u2466"}],"title":"4.7. The IDBKeyRange interface"}],"url":"#key-range-upper-open-flag"}, "key-type": {"dfnID":"key-type","dfnText":"type","external":false,"refSections":[{"refs":[{"id":"ref-for-key-type"},{"id":"ref-for-key-type\u2460"},{"id":"ref-for-key-type\u2461"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-key-type\u2462"},{"id":"ref-for-key-type\u2463"},{"id":"ref-for-key-type\u2464"},{"id":"ref-for-key-type\u2465"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-key-type\u2466"}],"title":"7.3. Convert a key to a value"},{"refs":[{"id":"ref-for-key-type\u2467"},{"id":"ref-for-key-type\u2468"},{"id":"ref-for-key-type\u2460\u24ea"},{"id":"ref-for-key-type\u2460\u2460"}],"title":"7.4. Convert a value to a key"}],"url":"#key-type"}, "key-value": {"dfnID":"key-value","dfnText":"value","external":false,"refSections":[{"refs":[{"id":"ref-for-key-value"},{"id":"ref-for-key-value\u2460"},{"id":"ref-for-key-value\u2461"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-key-value\u2462"},{"id":"ref-for-key-value\u2463"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-key-value\u2464"}],"title":"7.3. Convert a key to a value"},{"refs":[{"id":"ref-for-key-value\u2465"},{"id":"ref-for-key-value\u2466"},{"id":"ref-for-key-value\u2467"},{"id":"ref-for-key-value\u2468"},{"id":"ref-for-key-value\u2460\u24ea"},{"id":"ref-for-key-value\u2460\u2460"}],"title":"7.4. Convert a value to a key"}],"url":"#key-value"}, "less-than": {"dfnID":"less-than","dfnText":"less than","external":false,"refSections":[{"refs":[{"id":"ref-for-less-than"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-less-than\u2460"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-less-than\u2461"},{"id":"ref-for-less-than\u2462"},{"id":"ref-for-less-than\u2463"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-less-than\u2464"},{"id":"ref-for-less-than\u2465"},{"id":"ref-for-less-than\u2466"},{"id":"ref-for-less-than\u2467"},{"id":"ref-for-less-than\u2468"},{"id":"ref-for-less-than\u2460\u24ea"},{"id":"ref-for-less-than\u2460\u2460"},{"id":"ref-for-less-than\u2460\u2461"}],"title":"6.7. Cursor iteration operation"}],"url":"#less-than"}, "name": {"dfnID":"name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-name"},{"id":"ref-for-name\u2460"}],"title":"2. Constructs"},{"refs":[{"id":"ref-for-name\u2461"}],"title":"2.1. Database"},{"refs":[{"id":"ref-for-name\u2462"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-name\u2463"}],"title":"2.6. Index"}],"url":"#name"}, "object-store": {"dfnID":"object-store","dfnText":"object store","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store"}],"title":"2.1. Database"},{"refs":[{"id":"ref-for-object-store\u2460"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-object-store\u2461"},{"id":"ref-for-object-store\u2462"},{"id":"ref-for-object-store\u2463"},{"id":"ref-for-object-store\u2464"},{"id":"ref-for-object-store\u2465"},{"id":"ref-for-object-store\u2466"},{"id":"ref-for-object-store\u2467"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-object-store\u2468"},{"id":"ref-for-object-store\u2460\u24ea"},{"id":"ref-for-object-store\u2460\u2460"}],"title":"2.2.1. Object store handle"},{"refs":[{"id":"ref-for-object-store\u2460\u2461"},{"id":"ref-for-object-store\u2460\u2462"},{"id":"ref-for-object-store\u2460\u2463"},{"id":"ref-for-object-store\u2460\u2464"},{"id":"ref-for-object-store\u2460\u2465"},{"id":"ref-for-object-store\u2460\u2466"},{"id":"ref-for-object-store\u2460\u2467"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-object-store\u2460\u2468"},{"id":"ref-for-object-store\u2461\u24ea"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-object-store\u2461\u2460"},{"id":"ref-for-object-store\u2461\u2461"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-object-store\u2461\u2462"},{"id":"ref-for-object-store\u2461\u2463"},{"id":"ref-for-object-store\u2461\u2464"},{"id":"ref-for-object-store\u2461\u2465"},{"id":"ref-for-object-store\u2461\u2466"}],"title":"2.7.2. Transaction scheduling"},{"refs":[{"id":"ref-for-object-store\u2461\u2467"},{"id":"ref-for-object-store\u2461\u2468"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-object-store\u2462\u24ea"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-object-store\u2462\u2460"},{"id":"ref-for-object-store\u2462\u2461"},{"id":"ref-for-object-store\u2462\u2462"},{"id":"ref-for-object-store\u2462\u2463"},{"id":"ref-for-object-store\u2462\u2464"},{"id":"ref-for-object-store\u2462\u2465"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-object-store\u2462\u2466"},{"id":"ref-for-object-store\u2462\u2467"},{"id":"ref-for-object-store\u2462\u2468"},{"id":"ref-for-object-store\u2463\u24ea"},{"id":"ref-for-object-store\u2463\u2460"},{"id":"ref-for-object-store\u2463\u2461"},{"id":"ref-for-object-store\u2463\u2462"},{"id":"ref-for-object-store\u2463\u2463"},{"id":"ref-for-object-store\u2463\u2464"},{"id":"ref-for-object-store\u2463\u2465"},{"id":"ref-for-object-store\u2463\u2466"},{"id":"ref-for-object-store\u2463\u2467"},{"id":"ref-for-object-store\u2463\u2468"},{"id":"ref-for-object-store\u2464\u24ea"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-object-store\u2464\u2460"},{"id":"ref-for-object-store\u2464\u2461"},{"id":"ref-for-object-store\u2464\u2462"},{"id":"ref-for-object-store\u2464\u2463"},{"id":"ref-for-object-store\u2464\u2464"},{"id":"ref-for-object-store\u2464\u2465"},{"id":"ref-for-object-store\u2464\u2466"},{"id":"ref-for-object-store\u2464\u2467"},{"id":"ref-for-object-store\u2464\u2468"},{"id":"ref-for-object-store\u2465\u24ea"},{"id":"ref-for-object-store\u2465\u2460"},{"id":"ref-for-object-store\u2465\u2461"},{"id":"ref-for-object-store\u2465\u2462"},{"id":"ref-for-object-store\u2465\u2463"},{"id":"ref-for-object-store\u2465\u2464"},{"id":"ref-for-object-store\u2465\u2465"},{"id":"ref-for-object-store\u2465\u2466"},{"id":"ref-for-object-store\u2465\u2467"},{"id":"ref-for-object-store\u2465\u2468"},{"id":"ref-for-object-store\u2466\u24ea"},{"id":"ref-for-object-store\u2466\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-object-store\u2466\u2461"},{"id":"ref-for-object-store\u2466\u2462"},{"id":"ref-for-object-store\u2466\u2463"},{"id":"ref-for-object-store\u2466\u2464"},{"id":"ref-for-object-store\u2466\u2465"},{"id":"ref-for-object-store\u2466\u2466"},{"id":"ref-for-object-store\u2466\u2467"},{"id":"ref-for-object-store\u2466\u2468"},{"id":"ref-for-object-store\u2467\u24ea"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-object-store\u2467\u2460"},{"id":"ref-for-object-store\u2467\u2461"},{"id":"ref-for-object-store\u2467\u2462"},{"id":"ref-for-object-store\u2467\u2463"},{"id":"ref-for-object-store\u2467\u2464"},{"id":"ref-for-object-store\u2467\u2465"},{"id":"ref-for-object-store\u2467\u2466"},{"id":"ref-for-object-store\u2467\u2467"},{"id":"ref-for-object-store\u2467\u2468"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-object-store\u2468\u24ea"},{"id":"ref-for-object-store\u2468\u2460"},{"id":"ref-for-object-store\u2468\u2461"},{"id":"ref-for-object-store\u2468\u2462"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-object-store\u2468\u2463"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-object-store\u2468\u2464"},{"id":"ref-for-object-store\u2468\u2465"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-object-store\u2468\u2466"},{"id":"ref-for-object-store\u2468\u2467"},{"id":"ref-for-object-store\u2468\u2468"},{"id":"ref-for-object-store\u2460\u24ea\u24ea"}],"title":"5.8. Aborting an upgrade transaction"},{"refs":[{"id":"ref-for-object-store\u2460\u24ea\u2460"}],"title":"6. Database operations"},{"refs":[{"id":"ref-for-object-store\u2460\u24ea\u2461"},{"id":"ref-for-object-store\u2460\u24ea\u2462"},{"id":"ref-for-object-store\u2460\u24ea\u2463"}],"title":"6.7. Cursor iteration operation"},{"refs":[{"id":"ref-for-object-store\u2460\u24ea\u2464"}],"title":"7.2. Inject a key into a value"}],"url":"#object-store"}, "object-store-handle": {"dfnID":"object-store-handle","dfnText":"object store handle","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-handle"},{"id":"ref-for-object-store-handle\u2460"},{"id":"ref-for-object-store-handle\u2461"},{"id":"ref-for-object-store-handle\u2462"},{"id":"ref-for-object-store-handle\u2463"},{"id":"ref-for-object-store-handle\u2464"}],"title":"2.2.1. Object store handle"},{"refs":[{"id":"ref-for-object-store-handle\u2465"}],"title":"2.6.1. Index handle"},{"refs":[{"id":"ref-for-object-store-handle\u2466"},{"id":"ref-for-object-store-handle\u2467"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-object-store-handle\u2468"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-object-store-handle\u2460\u24ea"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-object-store-handle\u2460\u2460"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-object-store-handle\u2460\u2461"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#object-store-handle"}, "object-store-handle-index-set": {"dfnID":"object-store-handle-index-set","dfnText":"index set","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-handle-index-set"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-object-store-handle-index-set\u2460"},{"id":"ref-for-object-store-handle-index-set\u2461"},{"id":"ref-for-object-store-handle-index-set\u2462"},{"id":"ref-for-object-store-handle-index-set\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-object-store-handle-index-set\u2464"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#object-store-handle-index-set"}, "object-store-handle-name": {"dfnID":"object-store-handle-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-handle-name"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-object-store-handle-name\u2460"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#object-store-handle-name"}, "object-store-handle-object-store": {"dfnID":"object-store-handle-object-store","dfnText":"object store","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-handle-object-store"},{"id":"ref-for-object-store-handle-object-store\u2460"}],"title":"2.2.1. Object store handle"},{"refs":[{"id":"ref-for-object-store-handle-object-store\u2461"},{"id":"ref-for-object-store-handle-object-store\u2462"},{"id":"ref-for-object-store-handle-object-store\u2463"},{"id":"ref-for-object-store-handle-object-store\u2464"},{"id":"ref-for-object-store-handle-object-store\u2465"},{"id":"ref-for-object-store-handle-object-store\u2466"},{"id":"ref-for-object-store-handle-object-store\u2467"},{"id":"ref-for-object-store-handle-object-store\u2468"},{"id":"ref-for-object-store-handle-object-store\u2460\u24ea"},{"id":"ref-for-object-store-handle-object-store\u2460\u2460"},{"id":"ref-for-object-store-handle-object-store\u2460\u2461"},{"id":"ref-for-object-store-handle-object-store\u2460\u2462"},{"id":"ref-for-object-store-handle-object-store\u2460\u2463"},{"id":"ref-for-object-store-handle-object-store\u2460\u2464"},{"id":"ref-for-object-store-handle-object-store\u2460\u2465"},{"id":"ref-for-object-store-handle-object-store\u2460\u2466"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-object-store-handle-object-store\u2460\u2467"},{"id":"ref-for-object-store-handle-object-store\u2460\u2468"},{"id":"ref-for-object-store-handle-object-store\u2461\u24ea"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#object-store-handle-object-store"}, "object-store-handle-transaction": {"dfnID":"object-store-handle-transaction","dfnText":"transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-handle-transaction"}],"title":"2.6.1. Index handle"},{"refs":[{"id":"ref-for-object-store-handle-transaction\u2460"},{"id":"ref-for-object-store-handle-transaction\u2461"},{"id":"ref-for-object-store-handle-transaction\u2462"},{"id":"ref-for-object-store-handle-transaction\u2463"},{"id":"ref-for-object-store-handle-transaction\u2464"},{"id":"ref-for-object-store-handle-transaction\u2465"},{"id":"ref-for-object-store-handle-transaction\u2466"},{"id":"ref-for-object-store-handle-transaction\u2467"},{"id":"ref-for-object-store-handle-transaction\u2468"},{"id":"ref-for-object-store-handle-transaction\u2460\u24ea"},{"id":"ref-for-object-store-handle-transaction\u2460\u2460"},{"id":"ref-for-object-store-handle-transaction\u2460\u2461"},{"id":"ref-for-object-store-handle-transaction\u2460\u2462"},{"id":"ref-for-object-store-handle-transaction\u2460\u2463"},{"id":"ref-for-object-store-handle-transaction\u2460\u2464"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#object-store-handle-transaction"}, "object-store-in-line-keys": {"dfnID":"object-store-in-line-keys","dfnText":"in-line keys","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-in-line-keys"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-object-store-in-line-keys\u2460"},{"id":"ref-for-object-store-in-line-keys\u2461"},{"id":"ref-for-object-store-in-line-keys\u2462"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-object-store-in-line-keys\u2463"},{"id":"ref-for-object-store-in-line-keys\u2464"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-object-store-in-line-keys\u2465"}],"title":"6.1. Object store storage operation"}],"url":"#object-store-in-line-keys"}, "object-store-key-path": {"dfnID":"object-store-key-path","dfnText":"key path","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-key-path"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-object-store-key-path\u2460"},{"id":"ref-for-object-store-key-path\u2461"},{"id":"ref-for-object-store-key-path\u2462"},{"id":"ref-for-object-store-key-path\u2463"},{"id":"ref-for-object-store-key-path\u2464"},{"id":"ref-for-object-store-key-path\u2465"},{"id":"ref-for-object-store-key-path\u2466"},{"id":"ref-for-object-store-key-path\u2467"},{"id":"ref-for-object-store-key-path\u2468"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-object-store-key-path\u2460\u24ea"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-object-store-key-path\u2460\u2460"},{"id":"ref-for-object-store-key-path\u2460\u2461"},{"id":"ref-for-object-store-key-path\u2460\u2462"},{"id":"ref-for-object-store-key-path\u2460\u2463"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-object-store-key-path\u2460\u2464"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-object-store-key-path\u2460\u2465"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-object-store-key-path\u2460\u2466"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-object-store-key-path\u2460\u2467"}],"title":"7.2. Inject a key into a value"}],"url":"#object-store-key-path"}, "object-store-list-of-records": {"dfnID":"object-store-list-of-records","dfnText":"list of records","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-list-of-records"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-object-store-list-of-records\u2460"},{"id":"ref-for-object-store-list-of-records\u2461"},{"id":"ref-for-object-store-list-of-records\u2462"},{"id":"ref-for-object-store-list-of-records\u2463"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-object-store-list-of-records\u2464"}],"title":"6.4. Object store deletion operation"}],"url":"#object-store-list-of-records"}, "object-store-name": {"dfnID":"object-store-name","dfnText":"name","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-name"}],"title":"2.2.1. Object store handle"},{"refs":[{"id":"ref-for-object-store-name\u2460"},{"id":"ref-for-object-store-name\u2461"},{"id":"ref-for-object-store-name\u2462"},{"id":"ref-for-object-store-name\u2463"},{"id":"ref-for-object-store-name\u2464"},{"id":"ref-for-object-store-name\u2465"},{"id":"ref-for-object-store-name\u2466"},{"id":"ref-for-object-store-name\u2467"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-object-store-name\u2468"},{"id":"ref-for-object-store-name\u2460\u24ea"},{"id":"ref-for-object-store-name\u2460\u2460"},{"id":"ref-for-object-store-name\u2460\u2461"},{"id":"ref-for-object-store-name\u2460\u2462"},{"id":"ref-for-object-store-name\u2460\u2463"},{"id":"ref-for-object-store-name\u2460\u2464"},{"id":"ref-for-object-store-name\u2460\u2465"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-object-store-name\u2460\u2466"},{"id":"ref-for-object-store-name\u2460\u2467"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-object-store-name\u2460\u2468"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#object-store-name"}, "object-store-out-of-line-keys": {"dfnID":"object-store-out-of-line-keys","dfnText":"out-of-line keys","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-out-of-line-keys"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-object-store-out-of-line-keys\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#object-store-out-of-line-keys"}, "object-store-record": {"dfnID":"object-store-record","dfnText":"record","external":false,"refSections":[{"refs":[{"id":"ref-for-object-store-record"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-object-store-record\u2460"},{"id":"ref-for-object-store-record\u2461"}],"title":"2.4. Keys"},{"refs":[{"id":"ref-for-object-store-record\u2462"},{"id":"ref-for-object-store-record\u2463"},{"id":"ref-for-object-store-record\u2464"},{"id":"ref-for-object-store-record\u2465"},{"id":"ref-for-object-store-record\u2466"},{"id":"ref-for-object-store-record\u2467"},{"id":"ref-for-object-store-record\u2468"},{"id":"ref-for-object-store-record\u2460\u24ea"},{"id":"ref-for-object-store-record\u2460\u2460"},{"id":"ref-for-object-store-record\u2460\u2461"},{"id":"ref-for-object-store-record\u2460\u2462"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-object-store-record\u2460\u2463"},{"id":"ref-for-object-store-record\u2460\u2464"},{"id":"ref-for-object-store-record\u2460\u2465"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-object-store-record\u2460\u2466"},{"id":"ref-for-object-store-record\u2460\u2467"},{"id":"ref-for-object-store-record\u2460\u2468"},{"id":"ref-for-object-store-record\u2461\u24ea"},{"id":"ref-for-object-store-record\u2461\u2460"},{"id":"ref-for-object-store-record\u2461\u2461"},{"id":"ref-for-object-store-record\u2461\u2462"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-object-store-record\u2461\u2463"},{"id":"ref-for-object-store-record\u2461\u2464"},{"id":"ref-for-object-store-record\u2461\u2465"},{"id":"ref-for-object-store-record\u2461\u2466"},{"id":"ref-for-object-store-record\u2461\u2467"},{"id":"ref-for-object-store-record\u2461\u2468"},{"id":"ref-for-object-store-record\u2462\u24ea"},{"id":"ref-for-object-store-record\u2462\u2460"},{"id":"ref-for-object-store-record\u2462\u2461"},{"id":"ref-for-object-store-record\u2462\u2462"},{"id":"ref-for-object-store-record\u2462\u2463"},{"id":"ref-for-object-store-record\u2462\u2464"},{"id":"ref-for-object-store-record\u2462\u2465"},{"id":"ref-for-object-store-record\u2462\u2466"},{"id":"ref-for-object-store-record\u2462\u2467"},{"id":"ref-for-object-store-record\u2462\u2468"},{"id":"ref-for-object-store-record\u2463\u24ea"},{"id":"ref-for-object-store-record\u2463\u2460"},{"id":"ref-for-object-store-record\u2463\u2461"},{"id":"ref-for-object-store-record\u2463\u2462"},{"id":"ref-for-object-store-record\u2463\u2463"},{"id":"ref-for-object-store-record\u2463\u2464"},{"id":"ref-for-object-store-record\u2463\u2465"},{"id":"ref-for-object-store-record\u2463\u2466"},{"id":"ref-for-object-store-record\u2463\u2467"},{"id":"ref-for-object-store-record\u2463\u2468"},{"id":"ref-for-object-store-record\u2464\u24ea"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-object-store-record\u2464\u2460"},{"id":"ref-for-object-store-record\u2464\u2461"},{"id":"ref-for-object-store-record\u2464\u2462"},{"id":"ref-for-object-store-record\u2464\u2463"},{"id":"ref-for-object-store-record\u2464\u2464"},{"id":"ref-for-object-store-record\u2464\u2465"},{"id":"ref-for-object-store-record\u2464\u2466"},{"id":"ref-for-object-store-record\u2464\u2467"},{"id":"ref-for-object-store-record\u2464\u2468"},{"id":"ref-for-object-store-record\u2465\u24ea"},{"id":"ref-for-object-store-record\u2465\u2460"},{"id":"ref-for-object-store-record\u2465\u2461"},{"id":"ref-for-object-store-record\u2465\u2462"},{"id":"ref-for-object-store-record\u2465\u2463"},{"id":"ref-for-object-store-record\u2465\u2464"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-object-store-record\u2465\u2465"},{"id":"ref-for-object-store-record\u2465\u2466"},{"id":"ref-for-object-store-record\u2465\u2467"},{"id":"ref-for-object-store-record\u2465\u2468"},{"id":"ref-for-object-store-record\u2466\u24ea"},{"id":"ref-for-object-store-record\u2466\u2460"},{"id":"ref-for-object-store-record\u2466\u2461"},{"id":"ref-for-object-store-record\u2466\u2462"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-object-store-record\u2466\u2463"},{"id":"ref-for-object-store-record\u2466\u2464"},{"id":"ref-for-object-store-record\u2466\u2465"},{"id":"ref-for-object-store-record\u2466\u2466"},{"id":"ref-for-object-store-record\u2466\u2467"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-object-store-record\u2466\u2468"},{"id":"ref-for-object-store-record\u2467\u24ea"},{"id":"ref-for-object-store-record\u2467\u2460"},{"id":"ref-for-object-store-record\u2467\u2461"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-object-store-record\u2467\u2462"},{"id":"ref-for-object-store-record\u2467\u2463"},{"id":"ref-for-object-store-record\u2467\u2464"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-object-store-record\u2467\u2465"}],"title":"6.4. Object store deletion operation"},{"refs":[{"id":"ref-for-object-store-record\u2467\u2466"}],"title":"6.6. Object store clear operation"},{"refs":[{"id":"ref-for-object-store-record\u2467\u2467"},{"id":"ref-for-object-store-record\u2467\u2468"}],"title":"6.7. Cursor iteration operation"}],"url":"#object-store-record"}, "open-a-database-connection": {"dfnID":"open-a-database-connection","dfnText":"open a database connection","external":false,"refSections":[{"refs":[{"id":"ref-for-open-a-database-connection"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-open-a-database-connection\u2460"}],"title":"4.3. The IDBFactory interface"}],"url":"#open-a-database-connection"}, "possibly-update-the-key-generator": {"dfnID":"possibly-update-the-key-generator","dfnText":"possibly update the key generator","external":false,"refSections":[{"refs":[{"id":"ref-for-possibly-update-the-key-generator"}],"title":"6.1. Object store storage operation"}],"url":"#possibly-update-the-key-generator"}, "request": {"dfnID":"request","dfnText":"request","external":false,"refSections":[{"refs":[{"id":"ref-for-request"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-request\u2460"},{"id":"ref-for-request\u2461"},{"id":"ref-for-request\u2462"},{"id":"ref-for-request\u2463"},{"id":"ref-for-request\u2464"},{"id":"ref-for-request\u2465"},{"id":"ref-for-request\u2466"},{"id":"ref-for-request\u2467"},{"id":"ref-for-request\u2468"},{"id":"ref-for-request\u2460\u24ea"},{"id":"ref-for-request\u2460\u2460"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-request\u2460\u2461"}],"title":"2.7.2. Transaction scheduling"},{"refs":[{"id":"ref-for-request\u2460\u2462"},{"id":"ref-for-request\u2460\u2463"},{"id":"ref-for-request\u2460\u2464"},{"id":"ref-for-request\u2460\u2465"},{"id":"ref-for-request\u2460\u2466"},{"id":"ref-for-request\u2460\u2467"},{"id":"ref-for-request\u2460\u2468"},{"id":"ref-for-request\u2461\u24ea"},{"id":"ref-for-request\u2461\u2460"},{"id":"ref-for-request\u2461\u2461"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-request\u2461\u2462"}],"title":"2.8.1. Open requests"},{"refs":[{"id":"ref-for-request\u2461\u2463"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-request\u2461\u2464"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-request\u2461\u2465"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-request\u2461\u2466"},{"id":"ref-for-request\u2461\u2467"},{"id":"ref-for-request\u2461\u2468"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-request\u2462\u24ea"},{"id":"ref-for-request\u2462\u2460"},{"id":"ref-for-request\u2462\u2461"},{"id":"ref-for-request\u2462\u2462"},{"id":"ref-for-request\u2462\u2463"},{"id":"ref-for-request\u2462\u2464"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-request\u2462\u2465"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-request\u2462\u2466"},{"id":"ref-for-request\u2462\u2467"},{"id":"ref-for-request\u2462\u2468"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-request\u2463\u24ea"},{"id":"ref-for-request\u2463\u2460"}],"title":"5.10. Firing an error event"}],"url":"#request"}, "request-done-flag": {"dfnID":"request-done-flag","dfnText":"done flag","external":false,"refSections":[{"refs":[{"id":"ref-for-request-done-flag"},{"id":"ref-for-request-done-flag\u2460"},{"id":"ref-for-request-done-flag\u2461"},{"id":"ref-for-request-done-flag\u2462"},{"id":"ref-for-request-done-flag\u2463"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-request-done-flag\u2464"},{"id":"ref-for-request-done-flag\u2465"},{"id":"ref-for-request-done-flag\u2466"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-request-done-flag\u2467"},{"id":"ref-for-request-done-flag\u2468"},{"id":"ref-for-request-done-flag\u2460\u24ea"},{"id":"ref-for-request-done-flag\u2460\u2460"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-request-done-flag\u2460\u2461"},{"id":"ref-for-request-done-flag\u2460\u2462"},{"id":"ref-for-request-done-flag\u2460\u2463"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-request-done-flag\u2460\u2464"},{"id":"ref-for-request-done-flag\u2460\u2465"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-request-done-flag\u2460\u2466"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-request-done-flag\u2460\u2467"}],"title":"5.7. Upgrading a database"}],"url":"#request-done-flag"}, "request-error": {"dfnID":"request-error","dfnText":"error","external":false,"refSections":[{"refs":[{"id":"ref-for-request-error"},{"id":"ref-for-request-error\u2460"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-request-error\u2461"},{"id":"ref-for-request-error\u2462"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-request-error\u2463"},{"id":"ref-for-request-error\u2464"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-request-error\u2465"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-request-error\u2466"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-request-error\u2467"},{"id":"ref-for-request-error\u2468"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-request-error\u2460\u24ea"},{"id":"ref-for-request-error\u2460\u2460"}],"title":"5.10. Firing an error event"}],"url":"#request-error"}, "request-open-request": {"dfnID":"request-open-request","dfnText":"open request","external":false,"refSections":[{"refs":[{"id":"ref-for-request-open-request"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-request-open-request\u2460"},{"id":"ref-for-request-open-request\u2461"},{"id":"ref-for-request-open-request\u2462"},{"id":"ref-for-request-open-request\u2463"}],"title":"2.8.1. Open requests"},{"refs":[{"id":"ref-for-request-open-request\u2464"},{"id":"ref-for-request-open-request\u2465"},{"id":"ref-for-request-open-request\u2466"}],"title":"2.8.2. Connection queues"},{"refs":[{"id":"ref-for-request-open-request\u2467"},{"id":"ref-for-request-open-request\u2468"},{"id":"ref-for-request-open-request\u2460\u24ea"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-request-open-request\u2460\u2460"},{"id":"ref-for-request-open-request\u2460\u2461"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-request-open-request\u2460\u2462"}],"title":"5.5. Aborting a transaction"}],"url":"#request-open-request"}, "request-placed": {"dfnID":"request-placed","dfnText":"placed","external":false,"refSections":[{"refs":[{"id":"ref-for-request-placed"}],"title":"2.7.1. Transaction lifecycle"}],"url":"#request-placed"}, "request-processed": {"dfnID":"request-processed","dfnText":"processed","external":false,"refSections":[{"refs":[{"id":"ref-for-request-processed"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-request-processed\u2460"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-request-processed\u2461"}],"title":"5.6. Asynchronously executing a request"}],"url":"#request-processed"}, "request-processed-flag": {"dfnID":"request-processed-flag","dfnText":"processed flag","external":false,"refSections":[{"refs":[{"id":"ref-for-request-processed-flag"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-request-processed-flag\u2460"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-request-processed-flag\u2461"},{"id":"ref-for-request-processed-flag\u2462"},{"id":"ref-for-request-processed-flag\u2463"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-request-processed-flag\u2464"},{"id":"ref-for-request-processed-flag\u2465"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-request-processed-flag\u2466"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-request-processed-flag\u2467"}],"title":"5.7. Upgrading a database"}],"url":"#request-processed-flag"}, "request-result": {"dfnID":"request-result","dfnText":"result","external":false,"refSections":[{"refs":[{"id":"ref-for-request-result"},{"id":"ref-for-request-result\u2460"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-request-result\u2461"},{"id":"ref-for-request-result\u2462"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-request-result\u2463"},{"id":"ref-for-request-result\u2464"},{"id":"ref-for-request-result\u2465"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-request-result\u2466"},{"id":"ref-for-request-result\u2467"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-request-result\u2468"},{"id":"ref-for-request-result\u2460\u24ea"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-request-result\u2460\u2460"}],"title":"5.7. Upgrading a database"}],"url":"#request-result"}, "request-source": {"dfnID":"request-source","dfnText":"source","external":false,"refSections":[{"refs":[{"id":"ref-for-request-source"}],"title":"2.8.1. Open requests"},{"refs":[{"id":"ref-for-request-source\u2460"},{"id":"ref-for-request-source\u2461"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-request-source\u2462"}],"title":"5.6. Asynchronously executing a request"}],"url":"#request-source"}, "request-transaction": {"dfnID":"request-transaction","dfnText":"transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-request-transaction"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-request-transaction\u2460"}],"title":"2.8.1. Open requests"},{"refs":[{"id":"ref-for-request-transaction\u2461"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-request-transaction\u2462"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-request-transaction\u2463"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-request-transaction\u2464"}],"title":"5.7. Upgrading a database"}],"url":"#request-transaction"}, "retrieve-a-key-from-an-object-store": {"dfnID":"retrieve-a-key-from-an-object-store","dfnText":"retrieve a key from an object store","external":false,"refSections":[{"refs":[{"id":"ref-for-retrieve-a-key-from-an-object-store"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#retrieve-a-key-from-an-object-store"}, "retrieve-a-referenced-value-from-an-index": {"dfnID":"retrieve-a-referenced-value-from-an-index","dfnText":"retrieve a referenced value from an index","external":false,"refSections":[{"refs":[{"id":"ref-for-retrieve-a-referenced-value-from-an-index"}],"title":"4.6. The IDBIndex interface"}],"url":"#retrieve-a-referenced-value-from-an-index"}, "retrieve-a-value-from-an-index": {"dfnID":"retrieve-a-value-from-an-index","dfnText":"retrieve a value from an index","external":false,"refSections":[{"refs":[{"id":"ref-for-retrieve-a-value-from-an-index"}],"title":"4.6. The IDBIndex interface"}],"url":"#retrieve-a-value-from-an-index"}, "retrieve-a-value-from-an-object-store": {"dfnID":"retrieve-a-value-from-an-object-store","dfnText":"retrieve a value from an object store","external":false,"refSections":[{"refs":[{"id":"ref-for-retrieve-a-value-from-an-object-store"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#retrieve-a-value-from-an-object-store"}, "retrieve-multiple-keys-from-an-object-store": {"dfnID":"retrieve-multiple-keys-from-an-object-store","dfnText":"retrieve multiple keys from an object store","external":false,"refSections":[{"refs":[{"id":"ref-for-retrieve-multiple-keys-from-an-object-store"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#retrieve-multiple-keys-from-an-object-store"}, "retrieve-multiple-referenced-values-from-an-index": {"dfnID":"retrieve-multiple-referenced-values-from-an-index","dfnText":"retrieve multiple referenced values from an\nindex","external":false,"refSections":[{"refs":[{"id":"ref-for-retrieve-multiple-referenced-values-from-an-index"}],"title":"4.6. The IDBIndex interface"}],"url":"#retrieve-multiple-referenced-values-from-an-index"}, "retrieve-multiple-values-from-an-index": {"dfnID":"retrieve-multiple-values-from-an-index","dfnText":"retrieve multiple values from an index","external":false,"refSections":[{"refs":[{"id":"ref-for-retrieve-multiple-values-from-an-index"}],"title":"4.6. The IDBIndex interface"}],"url":"#retrieve-multiple-values-from-an-index"}, "retrieve-multiple-values-from-an-object-store": {"dfnID":"retrieve-multiple-values-from-an-object-store","dfnText":"retrieve multiple values from an object\nstore","external":false,"refSections":[{"refs":[{"id":"ref-for-retrieve-multiple-values-from-an-object-store"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#retrieve-multiple-values-from-an-object-store"}, "store-a-record-into-an-object-store": {"dfnID":"store-a-record-into-an-object-store","dfnText":"store a record into an object store","external":false,"refSections":[{"refs":[{"id":"ref-for-store-a-record-into-an-object-store"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-store-a-record-into-an-object-store\u2460"},{"id":"ref-for-store-a-record-into-an-object-store\u2461"}],"title":"4.8. The IDBCursor interface"}],"url":"#store-a-record-into-an-object-store"}, "subkeys": {"dfnID":"subkeys","dfnText":"subkeys","external":false,"refSections":[{"refs":[{"id":"ref-for-subkeys"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-subkeys\u2460"},{"id":"ref-for-subkeys\u2461"},{"id":"ref-for-subkeys\u2462"},{"id":"ref-for-subkeys\u2463"}],"title":"6.1. Object store storage operation"},{"refs":[{"id":"ref-for-subkeys\u2464"}],"title":"7.4. Convert a value to a key"}],"url":"#subkeys"}, "transaction-abort": {"dfnID":"transaction-abort","dfnText":"aborted","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-abort"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-abort\u2460"},{"id":"ref-for-transaction-abort\u2461"},{"id":"ref-for-transaction-abort\u2462"},{"id":"ref-for-transaction-abort\u2463"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-abort\u2464"},{"id":"ref-for-transaction-abort\u2465"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-transaction-abort\u2466"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-abort\u2467"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-transaction-abort\u2468"}],"title":"5.7. Upgrading a database"}],"url":"#transaction-abort"}, "transaction-active": {"dfnID":"transaction-active","dfnText":"active","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-active"},{"id":"ref-for-transaction-active\u2460"},{"id":"ref-for-transaction-active\u2461"},{"id":"ref-for-transaction-active\u2462"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-active\u2463"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-transaction-active\u2464"},{"id":"ref-for-transaction-active\u2465"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-transaction-active\u2466"},{"id":"ref-for-transaction-active\u2467"},{"id":"ref-for-transaction-active\u2468"},{"id":"ref-for-transaction-active\u2460\u24ea"},{"id":"ref-for-transaction-active\u2460\u2460"},{"id":"ref-for-transaction-active\u2460\u2461"},{"id":"ref-for-transaction-active\u2460\u2462"},{"id":"ref-for-transaction-active\u2460\u2463"},{"id":"ref-for-transaction-active\u2460\u2464"},{"id":"ref-for-transaction-active\u2460\u2465"},{"id":"ref-for-transaction-active\u2460\u2466"},{"id":"ref-for-transaction-active\u2460\u2467"},{"id":"ref-for-transaction-active\u2460\u2468"},{"id":"ref-for-transaction-active\u2461\u24ea"},{"id":"ref-for-transaction-active\u2461\u2460"},{"id":"ref-for-transaction-active\u2461\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-transaction-active\u2461\u2462"},{"id":"ref-for-transaction-active\u2461\u2463"},{"id":"ref-for-transaction-active\u2461\u2464"},{"id":"ref-for-transaction-active\u2461\u2465"},{"id":"ref-for-transaction-active\u2461\u2466"},{"id":"ref-for-transaction-active\u2461\u2467"},{"id":"ref-for-transaction-active\u2461\u2468"},{"id":"ref-for-transaction-active\u2462\u24ea"},{"id":"ref-for-transaction-active\u2462\u2460"},{"id":"ref-for-transaction-active\u2462\u2461"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-transaction-active\u2462\u2462"},{"id":"ref-for-transaction-active\u2462\u2463"},{"id":"ref-for-transaction-active\u2462\u2464"},{"id":"ref-for-transaction-active\u2462\u2465"},{"id":"ref-for-transaction-active\u2462\u2466"},{"id":"ref-for-transaction-active\u2462\u2467"},{"id":"ref-for-transaction-active\u2462\u2468"},{"id":"ref-for-transaction-active\u2463\u24ea"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-transaction-active\u2463\u2460"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-active\u2463\u2461"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-transaction-active\u2463\u2462"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-transaction-active\u2463\u2463"},{"id":"ref-for-transaction-active\u2463\u2464"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-transaction-active\u2463\u2465"},{"id":"ref-for-transaction-active\u2463\u2466"}],"title":"5.10. Firing an error event"},{"refs":[{"id":"ref-for-transaction-active\u2463\u2467"},{"id":"ref-for-transaction-active\u2463\u2468"}],"title":"5.11. Clone a value"}],"url":"#transaction-active"}, "transaction-cleanup-event-loop": {"dfnID":"transaction-cleanup-event-loop","dfnText":"cleanup event loop","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-cleanup-event-loop"},{"id":"ref-for-transaction-cleanup-event-loop\u2460"},{"id":"ref-for-transaction-cleanup-event-loop\u2461"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-cleanup-event-loop\u2462"}],"title":"4.4. The IDBDatabase interface"}],"url":"#transaction-cleanup-event-loop"}, "transaction-commit": {"dfnID":"transaction-commit","dfnText":"commit","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-commit"},{"id":"ref-for-transaction-commit\u2460"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-commit\u2461"},{"id":"ref-for-transaction-commit\u2462"},{"id":"ref-for-transaction-commit\u2463"},{"id":"ref-for-transaction-commit\u2464"},{"id":"ref-for-transaction-commit\u2465"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-commit\u2466"}],"title":"4.9. The IDBTransaction interface"}],"url":"#transaction-commit"}, "transaction-committing": {"dfnID":"transaction-committing","dfnText":"committing","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-committing"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-committing\u2460"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-committing\u2461"},{"id":"ref-for-transaction-committing\u2462"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-transaction-committing\u2463"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-transaction-committing\u2464"}],"title":"5.6. Asynchronously executing a request"}],"url":"#transaction-committing"}, "transaction-concept": {"dfnID":"transaction-concept","dfnText":"transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-concept"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-transaction-concept\u2460"},{"id":"ref-for-transaction-concept\u2461"},{"id":"ref-for-transaction-concept\u2462"}],"title":"2.2.1. Object store handle"},{"refs":[{"id":"ref-for-transaction-concept\u2463"},{"id":"ref-for-transaction-concept\u2464"},{"id":"ref-for-transaction-concept\u2465"}],"title":"2.6.1. Index handle"},{"refs":[{"id":"ref-for-transaction-concept\u2466"},{"id":"ref-for-transaction-concept\u2467"},{"id":"ref-for-transaction-concept\u2468"},{"id":"ref-for-transaction-concept\u2460\u24ea"},{"id":"ref-for-transaction-concept\u2460\u2460"},{"id":"ref-for-transaction-concept\u2460\u2461"},{"id":"ref-for-transaction-concept\u2460\u2462"},{"id":"ref-for-transaction-concept\u2460\u2463"},{"id":"ref-for-transaction-concept\u2460\u2464"},{"id":"ref-for-transaction-concept\u2460\u2465"},{"id":"ref-for-transaction-concept\u2460\u2466"},{"id":"ref-for-transaction-concept\u2460\u2467"},{"id":"ref-for-transaction-concept\u2460\u2468"},{"id":"ref-for-transaction-concept\u2461\u24ea"},{"id":"ref-for-transaction-concept\u2461\u2460"},{"id":"ref-for-transaction-concept\u2461\u2461"},{"id":"ref-for-transaction-concept\u2461\u2462"},{"id":"ref-for-transaction-concept\u2461\u2463"},{"id":"ref-for-transaction-concept\u2461\u2464"},{"id":"ref-for-transaction-concept\u2461\u2465"},{"id":"ref-for-transaction-concept\u2461\u2466"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-concept\u2461\u2467"},{"id":"ref-for-transaction-concept\u2461\u2468"},{"id":"ref-for-transaction-concept\u2462\u24ea"},{"id":"ref-for-transaction-concept\u2462\u2460"},{"id":"ref-for-transaction-concept\u2462\u2461"},{"id":"ref-for-transaction-concept\u2462\u2462"},{"id":"ref-for-transaction-concept\u2462\u2463"},{"id":"ref-for-transaction-concept\u2462\u2464"},{"id":"ref-for-transaction-concept\u2462\u2465"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-concept\u2462\u2466"},{"id":"ref-for-transaction-concept\u2462\u2467"}],"title":"2.7.2. Transaction scheduling"},{"refs":[{"id":"ref-for-transaction-concept\u2462\u2468"},{"id":"ref-for-transaction-concept\u2463\u24ea"},{"id":"ref-for-transaction-concept\u2463\u2460"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-transaction-concept\u2463\u2461"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-transaction-concept\u2463\u2462"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-transaction-concept\u2463\u2463"},{"id":"ref-for-transaction-concept\u2463\u2464"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-transaction-concept\u2463\u2465"},{"id":"ref-for-transaction-concept\u2463\u2466"},{"id":"ref-for-transaction-concept\u2463\u2467"},{"id":"ref-for-transaction-concept\u2463\u2468"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-transaction-concept\u2464\u24ea"},{"id":"ref-for-transaction-concept\u2464\u2460"},{"id":"ref-for-transaction-concept\u2464\u2461"},{"id":"ref-for-transaction-concept\u2464\u2462"},{"id":"ref-for-transaction-concept\u2464\u2463"},{"id":"ref-for-transaction-concept\u2464\u2464"},{"id":"ref-for-transaction-concept\u2464\u2465"},{"id":"ref-for-transaction-concept\u2464\u2466"},{"id":"ref-for-transaction-concept\u2464\u2467"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-transaction-concept\u2464\u2468"},{"id":"ref-for-transaction-concept\u2465\u24ea"},{"id":"ref-for-transaction-concept\u2465\u2460"},{"id":"ref-for-transaction-concept\u2465\u2461"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-transaction-concept\u2465\u2462"},{"id":"ref-for-transaction-concept\u2465\u2463"},{"id":"ref-for-transaction-concept\u2465\u2464"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-transaction-concept\u2465\u2465"},{"id":"ref-for-transaction-concept\u2465\u2466"},{"id":"ref-for-transaction-concept\u2465\u2467"},{"id":"ref-for-transaction-concept\u2465\u2468"},{"id":"ref-for-transaction-concept\u2466\u24ea"},{"id":"ref-for-transaction-concept\u2466\u2460"},{"id":"ref-for-transaction-concept\u2466\u2461"},{"id":"ref-for-transaction-concept\u2466\u2462"},{"id":"ref-for-transaction-concept\u2466\u2463"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-concept\u2466\u2464"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-transaction-concept\u2466\u2465"},{"id":"ref-for-transaction-concept\u2466\u2466"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-transaction-concept\u2466\u2467"},{"id":"ref-for-transaction-concept\u2466\u2468"},{"id":"ref-for-transaction-concept\u2467\u24ea"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-transaction-concept\u2467\u2460"},{"id":"ref-for-transaction-concept\u2467\u2461"}],"title":"5.8. Aborting an upgrade transaction"},{"refs":[{"id":"ref-for-transaction-concept\u2467\u2462"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-transaction-concept\u2467\u2463"}],"title":"5.10. Firing an error event"},{"refs":[{"id":"ref-for-transaction-concept\u2467\u2464"}],"title":"5.11. Clone a value"}],"url":"#transaction-concept"}, "transaction-connection": {"dfnID":"transaction-connection","dfnText":"connection","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-connection"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-connection\u2460"},{"id":"ref-for-transaction-connection\u2461"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-connection\u2462"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-transaction-connection\u2463"}],"title":"5.5. Aborting a transaction"}],"url":"#transaction-connection"}, "transaction-created": {"dfnID":"transaction-created","dfnText":"created","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-created"},{"id":"ref-for-transaction-created\u2460"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-created\u2461"},{"id":"ref-for-transaction-created\u2462"},{"id":"ref-for-transaction-created\u2463"},{"id":"ref-for-transaction-created\u2464"}],"title":"2.7.2. Transaction scheduling"},{"refs":[{"id":"ref-for-transaction-created\u2465"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-transaction-created\u2466"},{"id":"ref-for-transaction-created\u2467"},{"id":"ref-for-transaction-created\u2468"},{"id":"ref-for-transaction-created\u2460\u24ea"}],"title":"5.2. Closing a database connection"}],"url":"#transaction-created"}, "transaction-durability-hint": {"dfnID":"transaction-durability-hint","dfnText":"durability hint","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-durability-hint"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-durability-hint\u2460"},{"id":"ref-for-transaction-durability-hint\u2461"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-durability-hint\u2462"}],"title":"5.4. Committing a transaction"}],"url":"#transaction-durability-hint"}, "transaction-error": {"dfnID":"transaction-error","dfnText":"error","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-error"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-error\u2460"}],"title":"5.5. Aborting a transaction"}],"url":"#transaction-error"}, "transaction-finished": {"dfnID":"transaction-finished","dfnText":"finished","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-finished"},{"id":"ref-for-transaction-finished\u2460"},{"id":"ref-for-transaction-finished\u2461"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-finished\u2462"},{"id":"ref-for-transaction-finished\u2463"},{"id":"ref-for-transaction-finished\u2464"},{"id":"ref-for-transaction-finished\u2465"}],"title":"2.7.2. Transaction scheduling"},{"refs":[{"id":"ref-for-transaction-finished\u2466"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-transaction-finished\u2467"},{"id":"ref-for-transaction-finished\u2468"},{"id":"ref-for-transaction-finished\u2460\u24ea"},{"id":"ref-for-transaction-finished\u2460\u2460"},{"id":"ref-for-transaction-finished\u2460\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-transaction-finished\u2460\u2462"},{"id":"ref-for-transaction-finished\u2460\u2463"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-transaction-finished\u2460\u2464"},{"id":"ref-for-transaction-finished\u2460\u2465"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-finished\u2460\u2466"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-transaction-finished\u2460\u2467"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-transaction-finished\u2460\u2468"}],"title":"5.7. Upgrading a database"}],"url":"#transaction-finished"}, "transaction-inactive": {"dfnID":"transaction-inactive","dfnText":"inactive","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-inactive"},{"id":"ref-for-transaction-inactive\u2460"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-inactive\u2461"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-inactive\u2462"},{"id":"ref-for-transaction-inactive\u2463"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-transaction-inactive\u2464"},{"id":"ref-for-transaction-inactive\u2465"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-transaction-inactive\u2466"},{"id":"ref-for-transaction-inactive\u2467"}],"title":"5.10. Firing an error event"},{"refs":[{"id":"ref-for-transaction-inactive\u2468"},{"id":"ref-for-transaction-inactive\u2460\u24ea"}],"title":"5.11. Clone a value"}],"url":"#transaction-inactive"}, "transaction-lifetime": {"dfnID":"transaction-lifetime","dfnText":"lifetime","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-lifetime"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-transaction-lifetime\u2460"}],"title":"5.7. Upgrading a database"}],"url":"#transaction-lifetime"}, "transaction-live": {"dfnID":"transaction-live","dfnText":"live","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-live"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-transaction-live\u2460"},{"id":"ref-for-transaction-live\u2461"}],"title":"2.2.1. Object store handle"},{"refs":[{"id":"ref-for-transaction-live\u2462"}],"title":"2.6.1. Index handle"},{"refs":[{"id":"ref-for-transaction-live\u2463"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-live\u2464"}],"title":"2.7.2. Transaction scheduling"},{"refs":[{"id":"ref-for-transaction-live\u2465"},{"id":"ref-for-transaction-live\u2466"},{"id":"ref-for-transaction-live\u2467"},{"id":"ref-for-transaction-live\u2468"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-transaction-live\u2460\u24ea"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-transaction-live\u2460\u2460"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-transaction-live\u2460\u2461"}],"title":"11. Revision history"}],"url":"#transaction-live"}, "transaction-mode": {"dfnID":"transaction-mode","dfnText":"mode","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-mode"},{"id":"ref-for-transaction-mode\u2460"},{"id":"ref-for-transaction-mode\u2461"},{"id":"ref-for-transaction-mode\u2462"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-mode\u2463"},{"id":"ref-for-transaction-mode\u2464"},{"id":"ref-for-transaction-mode\u2465"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-mode\u2466"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-transaction-mode\u2467"},{"id":"ref-for-transaction-mode\u2468"}],"title":"4.9. The IDBTransaction interface"}],"url":"#transaction-mode"}, "transaction-overlap": {"dfnID":"transaction-overlap","dfnText":"overlapping scope","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-overlap"},{"id":"ref-for-transaction-overlap\u2460"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-overlap\u2461"},{"id":"ref-for-transaction-overlap\u2462"},{"id":"ref-for-transaction-overlap\u2463"},{"id":"ref-for-transaction-overlap\u2464"},{"id":"ref-for-transaction-overlap\u2465"},{"id":"ref-for-transaction-overlap\u2466"},{"id":"ref-for-transaction-overlap\u2467"}],"title":"2.7.2. Transaction scheduling"}],"url":"#transaction-overlap"}, "transaction-read-only-transaction": {"dfnID":"transaction-read-only-transaction","dfnText":"read-only transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-read-only-transaction"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-read-only-transaction\u2460"},{"id":"ref-for-transaction-read-only-transaction\u2461"},{"id":"ref-for-transaction-read-only-transaction\u2462"}],"title":"2.7.2. Transaction scheduling"},{"refs":[{"id":"ref-for-transaction-read-only-transaction\u2463"},{"id":"ref-for-transaction-read-only-transaction\u2464"},{"id":"ref-for-transaction-read-only-transaction\u2465"},{"id":"ref-for-transaction-read-only-transaction\u2466"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-transaction-read-only-transaction\u2467"},{"id":"ref-for-transaction-read-only-transaction\u2468"},{"id":"ref-for-transaction-read-only-transaction\u2460\u24ea"}],"title":"4.8. The IDBCursor interface"}],"url":"#transaction-read-only-transaction"}, "transaction-read-write-transaction": {"dfnID":"transaction-read-write-transaction","dfnText":"read/write transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-read-write-transaction"},{"id":"ref-for-transaction-read-write-transaction\u2460"},{"id":"ref-for-transaction-read-write-transaction\u2461"},{"id":"ref-for-transaction-read-write-transaction\u2462"},{"id":"ref-for-transaction-read-write-transaction\u2463"},{"id":"ref-for-transaction-read-write-transaction\u2464"},{"id":"ref-for-transaction-read-write-transaction\u2465"},{"id":"ref-for-transaction-read-write-transaction\u2466"},{"id":"ref-for-transaction-read-write-transaction\u2467"},{"id":"ref-for-transaction-read-write-transaction\u2468"}],"title":"2.7.2. Transaction scheduling"}],"url":"#transaction-read-write-transaction"}, "transaction-request-list": {"dfnID":"transaction-request-list","dfnText":"request list","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-request-list"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-transaction-request-list\u2460"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-transaction-request-list\u2461"},{"id":"ref-for-transaction-request-list\u2462"},{"id":"ref-for-transaction-request-list\u2463"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-transaction-request-list\u2464"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-transaction-request-list\u2465"}],"title":"5.10. Firing an error event"}],"url":"#transaction-request-list"}, "transaction-scope": {"dfnID":"transaction-scope","dfnText":"scope","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-scope"},{"id":"ref-for-transaction-scope\u2460"},{"id":"ref-for-transaction-scope\u2461"},{"id":"ref-for-transaction-scope\u2462"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-scope\u2463"},{"id":"ref-for-transaction-scope\u2464"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-scope\u2465"},{"id":"ref-for-transaction-scope\u2466"}],"title":"2.7.2. Transaction scheduling"},{"refs":[{"id":"ref-for-transaction-scope\u2467"}],"title":"2.11. Key generators"},{"refs":[{"id":"ref-for-transaction-scope\u2468"},{"id":"ref-for-transaction-scope\u2460\u24ea"},{"id":"ref-for-transaction-scope\u2460\u2460"},{"id":"ref-for-transaction-scope\u2460\u2461"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-scope\u2460\u2462"}],"title":"5.7. Upgrading a database"}],"url":"#transaction-scope"}, "transaction-start": {"dfnID":"transaction-start","dfnText":"start","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-start"},{"id":"ref-for-transaction-start\u2460"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-transaction-start\u2461"},{"id":"ref-for-transaction-start\u2462"},{"id":"ref-for-transaction-start\u2463"},{"id":"ref-for-transaction-start\u2464"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-start\u2465"},{"id":"ref-for-transaction-start\u2466"},{"id":"ref-for-transaction-start\u2467"},{"id":"ref-for-transaction-start\u2468"},{"id":"ref-for-transaction-start\u2460\u24ea"},{"id":"ref-for-transaction-start\u2460\u2460"}],"title":"2.7.2. Transaction scheduling"}],"url":"#transaction-start"}, "transaction-state": {"dfnID":"transaction-state","dfnText":"state","external":false,"refSections":[{"refs":[{"id":"ref-for-transaction-state"},{"id":"ref-for-transaction-state\u2460"},{"id":"ref-for-transaction-state\u2461"},{"id":"ref-for-transaction-state\u2462"},{"id":"ref-for-transaction-state\u2463"},{"id":"ref-for-transaction-state\u2464"},{"id":"ref-for-transaction-state\u2465"}],"title":"2.7.1. Transaction lifecycle"},{"refs":[{"id":"ref-for-transaction-state\u2466"},{"id":"ref-for-transaction-state\u2467"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-transaction-state\u2468"},{"id":"ref-for-transaction-state\u2460\u24ea"},{"id":"ref-for-transaction-state\u2460\u2460"},{"id":"ref-for-transaction-state\u2460\u2461"},{"id":"ref-for-transaction-state\u2460\u2462"},{"id":"ref-for-transaction-state\u2460\u2463"},{"id":"ref-for-transaction-state\u2460\u2464"},{"id":"ref-for-transaction-state\u2460\u2465"},{"id":"ref-for-transaction-state\u2460\u2466"},{"id":"ref-for-transaction-state\u2460\u2467"},{"id":"ref-for-transaction-state\u2460\u2468"},{"id":"ref-for-transaction-state\u2461\u24ea"},{"id":"ref-for-transaction-state\u2461\u2460"},{"id":"ref-for-transaction-state\u2461\u2461"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-transaction-state\u2461\u2462"},{"id":"ref-for-transaction-state\u2461\u2463"},{"id":"ref-for-transaction-state\u2461\u2464"},{"id":"ref-for-transaction-state\u2461\u2465"},{"id":"ref-for-transaction-state\u2461\u2466"},{"id":"ref-for-transaction-state\u2461\u2467"},{"id":"ref-for-transaction-state\u2461\u2468"},{"id":"ref-for-transaction-state\u2462\u24ea"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-transaction-state\u2462\u2460"},{"id":"ref-for-transaction-state\u2462\u2461"},{"id":"ref-for-transaction-state\u2462\u2462"},{"id":"ref-for-transaction-state\u2462\u2463"},{"id":"ref-for-transaction-state\u2462\u2464"}],"title":"4.8. The IDBCursor interface"},{"refs":[{"id":"ref-for-transaction-state\u2462\u2465"},{"id":"ref-for-transaction-state\u2462\u2466"},{"id":"ref-for-transaction-state\u2462\u2467"},{"id":"ref-for-transaction-state\u2462\u2468"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-transaction-state\u2463\u24ea"},{"id":"ref-for-transaction-state\u2463\u2460"},{"id":"ref-for-transaction-state\u2463\u2461"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-transaction-state\u2463\u2462"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-transaction-state\u2463\u2463"},{"id":"ref-for-transaction-state\u2463\u2464"}],"title":"5.6. Asynchronously executing a request"},{"refs":[{"id":"ref-for-transaction-state\u2463\u2465"},{"id":"ref-for-transaction-state\u2463\u2466"},{"id":"ref-for-transaction-state\u2463\u2467"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-transaction-state\u2463\u2468"},{"id":"ref-for-transaction-state\u2464\u24ea"},{"id":"ref-for-transaction-state\u2464\u2460"},{"id":"ref-for-transaction-state\u2464\u2461"}],"title":"5.9. Firing a success event"},{"refs":[{"id":"ref-for-transaction-state\u2464\u2462"},{"id":"ref-for-transaction-state\u2464\u2463"},{"id":"ref-for-transaction-state\u2464\u2464"},{"id":"ref-for-transaction-state\u2464\u2465"}],"title":"5.10. Firing an error event"},{"refs":[{"id":"ref-for-transaction-state\u2464\u2466"},{"id":"ref-for-transaction-state\u2464\u2467"},{"id":"ref-for-transaction-state\u2464\u2468"}],"title":"5.11. Clone a value"}],"url":"#transaction-state"}, "unbounded-key-range": {"dfnID":"unbounded-key-range","dfnText":"unbounded key range","external":false,"refSections":[{"refs":[{"id":"ref-for-unbounded-key-range"},{"id":"ref-for-unbounded-key-range\u2460"}],"title":"2.9. Key range"},{"refs":[{"id":"ref-for-unbounded-key-range\u2461"},{"id":"ref-for-unbounded-key-range\u2462"},{"id":"ref-for-unbounded-key-range\u2463"},{"id":"ref-for-unbounded-key-range\u2464"},{"id":"ref-for-unbounded-key-range\u2465"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-unbounded-key-range\u2466"},{"id":"ref-for-unbounded-key-range\u2467"},{"id":"ref-for-unbounded-key-range\u2468"},{"id":"ref-for-unbounded-key-range\u2460\u24ea"},{"id":"ref-for-unbounded-key-range\u2460\u2460"}],"title":"4.6. The IDBIndex interface"}],"url":"#unbounded-key-range"}, "upgrade-a-database": {"dfnID":"upgrade-a-database","dfnText":"upgrade a database","external":false,"refSections":[{"refs":[{"id":"ref-for-upgrade-a-database"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-upgrade-a-database\u2460"}],"title":"4.2. Event interfaces"},{"refs":[{"id":"ref-for-upgrade-a-database\u2461"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-upgrade-a-database\u2462"}],"title":"5.2. Closing a database connection"},{"refs":[{"id":"ref-for-upgrade-a-database\u2463"}],"title":"11. Revision history"}],"url":"#upgrade-a-database"}, "upgrade-transaction": {"dfnID":"upgrade-transaction","dfnText":"upgrade transaction","external":false,"refSections":[{"refs":[{"id":"ref-for-upgrade-transaction"},{"id":"ref-for-upgrade-transaction\u2460"}],"title":"2.1. Database"},{"refs":[{"id":"ref-for-upgrade-transaction\u2461"}],"title":"2.1.1. Database connection"},{"refs":[{"id":"ref-for-upgrade-transaction\u2462"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-upgrade-transaction\u2463"},{"id":"ref-for-upgrade-transaction\u2464"}],"title":"2.2.1. Object store handle"},{"refs":[{"id":"ref-for-upgrade-transaction\u2465"}],"title":"2.6.1. Index handle"},{"refs":[{"id":"ref-for-upgrade-transaction\u2466"}],"title":"2.7. Transactions"},{"refs":[{"id":"ref-for-upgrade-transaction\u2467"},{"id":"ref-for-upgrade-transaction\u2468"},{"id":"ref-for-upgrade-transaction\u2460\u24ea"},{"id":"ref-for-upgrade-transaction\u2460\u2460"},{"id":"ref-for-upgrade-transaction\u2460\u2461"},{"id":"ref-for-upgrade-transaction\u2460\u2462"},{"id":"ref-for-upgrade-transaction\u2460\u2463"},{"id":"ref-for-upgrade-transaction\u2460\u2464"}],"title":"2.7.3. Upgrade transactions"},{"refs":[{"id":"ref-for-upgrade-transaction\u2460\u2465"}],"title":"2.8. Requests"},{"refs":[{"id":"ref-for-upgrade-transaction\u2460\u2466"}],"title":"4.1. The IDBRequest interface"},{"refs":[{"id":"ref-for-upgrade-transaction\u2460\u2467"}],"title":"4.3. The IDBFactory interface"},{"refs":[{"id":"ref-for-upgrade-transaction\u2460\u2468"},{"id":"ref-for-upgrade-transaction\u2461\u24ea"},{"id":"ref-for-upgrade-transaction\u2461\u2460"},{"id":"ref-for-upgrade-transaction\u2461\u2461"},{"id":"ref-for-upgrade-transaction\u2461\u2462"},{"id":"ref-for-upgrade-transaction\u2461\u2463"},{"id":"ref-for-upgrade-transaction\u2461\u2464"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-upgrade-transaction\u2461\u2465"},{"id":"ref-for-upgrade-transaction\u2461\u2466"},{"id":"ref-for-upgrade-transaction\u2461\u2467"},{"id":"ref-for-upgrade-transaction\u2461\u2468"},{"id":"ref-for-upgrade-transaction\u2462\u24ea"},{"id":"ref-for-upgrade-transaction\u2462\u2460"},{"id":"ref-for-upgrade-transaction\u2462\u2461"},{"id":"ref-for-upgrade-transaction\u2462\u2462"},{"id":"ref-for-upgrade-transaction\u2462\u2463"},{"id":"ref-for-upgrade-transaction\u2462\u2464"},{"id":"ref-for-upgrade-transaction\u2462\u2465"},{"id":"ref-for-upgrade-transaction\u2462\u2466"},{"id":"ref-for-upgrade-transaction\u2462\u2467"},{"id":"ref-for-upgrade-transaction\u2462\u2468"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-upgrade-transaction\u2463\u24ea"},{"id":"ref-for-upgrade-transaction\u2463\u2460"},{"id":"ref-for-upgrade-transaction\u2463\u2461"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-upgrade-transaction\u2463\u2462"},{"id":"ref-for-upgrade-transaction\u2463\u2463"},{"id":"ref-for-upgrade-transaction\u2463\u2464"}],"title":"4.9. The IDBTransaction interface"},{"refs":[{"id":"ref-for-upgrade-transaction\u2463\u2465"}],"title":"5.1. Opening a database connection"},{"refs":[{"id":"ref-for-upgrade-transaction\u2463\u2466"},{"id":"ref-for-upgrade-transaction\u2463\u2467"}],"title":"5.4. Committing a transaction"},{"refs":[{"id":"ref-for-upgrade-transaction\u2463\u2468"},{"id":"ref-for-upgrade-transaction\u2464\u24ea"},{"id":"ref-for-upgrade-transaction\u2464\u2460"},{"id":"ref-for-upgrade-transaction\u2464\u2461"}],"title":"5.5. Aborting a transaction"},{"refs":[{"id":"ref-for-upgrade-transaction\u2464\u2462"},{"id":"ref-for-upgrade-transaction\u2464\u2463"}],"title":"5.7. Upgrading a database"},{"refs":[{"id":"ref-for-upgrade-transaction\u2464\u2464"}],"title":"5.8. Aborting an upgrade transaction"}],"url":"#upgrade-transaction"}, "valid-key-path": {"dfnID":"valid-key-path","dfnText":"valid key path","external":false,"refSections":[{"refs":[{"id":"ref-for-valid-key-path"}],"title":"4.4. The IDBDatabase interface"},{"refs":[{"id":"ref-for-valid-key-path\u2460"}],"title":"4.5. The IDBObjectStore interface"}],"url":"#valid-key-path"}, "value": {"dfnID":"value","dfnText":"value","external":false,"refSections":[{"refs":[{"id":"ref-for-value"},{"id":"ref-for-value\u2460"}],"title":"2.2. Object store"},{"refs":[{"id":"ref-for-value\u2461"},{"id":"ref-for-value\u2462"}],"title":"2.3. Values"},{"refs":[{"id":"ref-for-value\u2463"}],"title":"2.5. Key path"},{"refs":[{"id":"ref-for-value\u2464"},{"id":"ref-for-value\u2465"}],"title":"2.6. Index"},{"refs":[{"id":"ref-for-value\u2466"},{"id":"ref-for-value\u2467"},{"id":"ref-for-value\u2468"}],"title":"2.10. Cursor"},{"refs":[{"id":"ref-for-value\u2460\u24ea"},{"id":"ref-for-value\u2460\u2460"},{"id":"ref-for-value\u2460\u2461"},{"id":"ref-for-value\u2460\u2462"}],"title":"4.5. The IDBObjectStore interface"},{"refs":[{"id":"ref-for-value\u2460\u2463"},{"id":"ref-for-value\u2460\u2464"},{"id":"ref-for-value\u2460\u2465"},{"id":"ref-for-value\u2460\u2466"}],"title":"4.6. The IDBIndex interface"},{"refs":[{"id":"ref-for-value\u2460\u2467"},{"id":"ref-for-value\u2460\u2468"}],"title":"6.2. Object store retrieval operations"},{"refs":[{"id":"ref-for-value\u2461\u24ea"}],"title":"6.3. Index retrieval operations"},{"refs":[{"id":"ref-for-value\u2461\u2460"}],"title":"6.7. Cursor iteration operation"}],"url":"#value"}, }; document.addEventListener("DOMContentLoaded", ()=>{ genAllDfnPanels(); document.body.addEventListener("click", (e) => { // If not handled already, just hide all dfn panels. hideAllDfnPanels(); }); }); window.addEventListener("resize", () => { // Pin any visible dfn panel queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(el=>positionDfnPanel(el)); }); function genAllDfnPanels() { for(const panelData of Object.values(dfnPanelData)) { const dfnID = panelData.dfnID; const dfn = document.getElementById(dfnID); if(!dfn) { console.log(`Can't find dfn#${dfnID}.`, panelData); continue; } dfn.panelData = panelData; insertDfnPopupAction(dfn); } } function genDfnPanel(dfn, { dfnID, url, dfnText, refSections, external }) { const dfnPanel = mk.aside({ class: "dfn-panel on", 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, class:"dfn-link"}, url), refSections.length == 0 ? [] : 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})` ), " ", ] ), ), ), ), genLinkingSyntaxes(dfn), ); dfnPanel.addEventListener('click', (event) => { if (event.target.nodeName == 'A') { scrollToTargetAndHighlight(event); pinDfnPanel(dfnPanel); } event.stopPropagation(); refocusOnTarget(event); }); dfnPanel.addEventListener('keydown', (event) => { if(event.keyCode == 27) { // Escape key hideDfnPanel({dfnPanel}); event.stopPropagation(); event.preventDefault(); } }); dfnPanel.dfn = dfn; dfn.dfnPanel = dfnPanel; return dfnPanel; } function hideAllDfnPanels() { // Delete the currently-active dfn panel. queryAll(".dfn-panel").forEach(dfnPanel=>hideDfnPanel({dfnPanel})); } function showDfnPanel(dfn) { hideAllDfnPanels(); // Only display one at a time. dfn.setAttribute("aria-expanded", "true"); const dfnPanel = genDfnPanel(dfn, dfn.panelData); // Give the dfn a unique tabindex, and then // give all the tabbable panel bits successive indexes. let tabIndex = 100; dfn.tabIndex = tabIndex++; const tabbable = dfnPanel.querySelectorAll(":is(a, button)"); for (const el of tabbable) { el.tabIndex = tabIndex++; } append(document.body, dfnPanel); positionDfnPanel(dfnPanel); } function positionDfnPanel(dfnPanel) { const dfn = dfnPanel.dfn; const dfnPos = getBounds(dfn); dfnPanel.style.top = dfnPos.bottom + "px"; dfnPanel.style.left = dfnPos.left + "px"; const panelPos = dfnPanel.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, dfnPos.left - overflowAmount); dfnPanel.style.left = newLeft + "px"; } } function pinDfnPanel(dfnPanel) { // Switch it to "activated" state, which pins it. dfnPanel.classList.add("activated"); dfnPanel.style.position = "fixed"; dfnPanel.style.left = null; dfnPanel.style.top = null; } function hideDfnPanel({dfn, dfnPanel}) { if(!dfnPanel) dfnPanel = dfn.dfnPanel; if(!dfn) dfn = dfnPanel.dfn; dfn.dfnPanel = undefined; dfnPanel.dfn = undefined; dfn.setAttribute("aria-expanded", "false"); dfn.tabIndex = undefined; dfnPanel.remove() } function toggleDfnPanel(dfn) { if(dfn.dfnPanel) { hideDfnPanel(dfn); } else { showDfnPanel(dfn); } } function insertDfnPopupAction(dfn) { dfn.setAttribute('role', 'button'); dfn.setAttribute('aria-expanded', 'false') dfn.tabIndex = 0; dfn.classList.add('has-dfn-panel'); dfn.addEventListener('click', (event) => { toggleDfnPanel(dfn); event.stopPropagation(); }); dfn.addEventListener('keypress', (event) => { const kc = event.keyCode; // 32->Space, 13->Enter if(kc == 32 || kc == 13) { toggleDfnPanel(dfn); event.stopPropagation(); event.preventDefault(); } }); } function refocusOnTarget(event) { const target = event.target; setTimeout(() => { // Refocus on the event.target element. // This is needed after browser scrolls to the destination. target.focus(); }); } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function scrollToTargetAndHighlight(event) { let hash = event.target.hash; if (hash) { hash = decodeURIComponent(hash.substring(1)); const dest = document.getElementById(hash); if (dest) { dest.classList.add('highlighted'); setTimeout(() => dest.classList.remove('highlighted'), 1000); } } } // Functions, divided by link type, that wrap an autolink's // contents with the appropriate outer syntax. // Alternately, a string naming another type they format // the same as. function needsFor(type) { switch(type) { case "descriptor": case "value": case "element-attr": case "attr-value": case "element-state": case "method": case "constructor": case "argument": case "attribute": case "const": case "dict-member": case "event": case "enum-value": case "stringifier": case "serializer": case "iterator": case "maplike": case "setlike": case "state": case "mode": case "context": case "facet": return true; default: return false; } } function refusesFor(type) { switch(type) { case "property": case "element": case "interface": case "namespace": case "callback": case "dictionary": case "enum": case "exception": case "typedef": case "http-header": case "permission": return true; default: return false; } } function linkFormatterFromType(type) { switch(type) { case 'scheme': case 'permission': case 'dfn': return (text) => `[=${text}=]`; case 'abstract-op': return (text) => `[\$${text}\$]`; case 'function': case 'at-rule': case 'selector': case 'value': return (text) => `''${text}''`; case 'http-header': return (text) => `[:${text}:]`; case 'interface': case 'constructor': case 'method': case 'argument': case 'attribute': case 'callback': case 'dictionary': case 'dict-member': case 'enum': case 'enum-value': case 'exception': case 'const': case 'typedef': case 'stringifier': case 'serializer': case 'iterator': case 'maplike': case 'setlike': case 'extended-attribute': case 'event': case 'idl': return (text) => `{{${text}}}`; case 'element-state': case 'element-attr': case 'attr-value': case 'element': return (element) => `<{${element}}>`; case 'grammar': return (text) => `${text} (within a <pre class=prod>)`; case 'type': return (text)=> `<<${text}>>`; case 'descriptor': case 'property': return (text) => `'${text}'`; default: return; }; }; function genLinkingSyntaxes(dfn) { if(dfn.tagName != "DFN") return; const type = dfn.getAttribute('data-dfn-type'); if(!type) { console.log(`<dfn> doesn't have a data-dfn-type:`, dfn); return []; } // Return a function that wraps link text based on the type const linkFormatter = linkFormatterFromType(type); if(!linkFormatter) { console.log(`<dfn> has an unknown data-dfn-type:`, dfn); return []; } let ltAlts; if(dfn.hasAttribute('data-lt')) { ltAlts = dfn.getAttribute('data-lt') .split("|") .map(x=>x.trim()); } else { ltAlts = [dfn.textContent.trim()]; } if(type == "type") { // lt of "<foo>", but "foo" is the interior; // <<foo/bar>> is how you write it with a for, // not <foo/<bar>> or whatever. for(var i = 0; i < ltAlts.length; i++) { const lt = ltAlts[i]; const match = /<(.*)>/.exec(lt); if(match) { ltAlts[i] = match[1]; } } } let forAlts; if(dfn.hasAttribute('data-dfn-for')) { forAlts = dfn.getAttribute('data-dfn-for') .split(",") .map(x=>x.trim()); } else { forAlts = ['']; } let linkingSyntaxes = []; if(!needsFor(type)) { for(const lt of ltAlts) { linkingSyntaxes.push(linkFormatter(lt)); } } if(!refusesFor(type)) { for(const f of forAlts) { linkingSyntaxes.push(linkFormatter(`${f}/${ltAlts[0]}`)) } } return [ mk.b({}, 'Possible linking syntaxes:'), mk.ul({}, ...linkingSyntaxes.map(link => { const copyLink = async () => await navigator.clipboard.writeText(link); return mk.li({}, mk.div({ class: 'link-item' }, mk.button({ class: 'copy-icon', title: 'Copy', type: 'button', _onclick: copyLink, tabindex: 0, }, mk.span({ class: 'icon' }) ), mk.span({}, link) ) ); }) ) ]; } } </script> <script>/* Boilerplate: script-position-annos */ "use strict"; { function repositionAnnoPanels(){ const panels = [...document.querySelectorAll("[data-anno-for]")]; hydratePanels(panels); 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 hydratePanels(panels) { const main = document.querySelector("main"); let mainRect; if(main) mainRect = main.getBoundingClientRect(); // First display them all, if they're not already visible. for(const panel of panels) { panel.classList.remove("unpositioned"); } // Measure them all 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; } panel.dfn = dfn; panel.top = window.scrollY + dfn.getBoundingClientRect().top; let panelRect = panel.getBoundingClientRect(); panel.height = panelRect.height; if(main) { panel.overlappingMain = panelRect.left < mainRect.right; } else { panel.overlappingMain = false; } } // And finally position them for(const panel of panels) { const dfn = panel.dfn; if(!dfn) continue; panel.style.top = panel.top + "px"; panel.classList.toggle("overlapping-main", panel.overlappingMain); } } function cmpTops(a,b) { return a.top - b.top; } window.addEventListener("load", repositionAnnoPanels); window.addEventListener("resize", repositionAnnoPanels); } </script> <script>/* Boilerplate: script-ref-hints */ "use strict"; { let refsData = { "#abort-a-transaction": {"displayText":"abort a transaction","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"abort a transaction","type":"dfn","url":"#abort-a-transaction"}, "#abort-an-upgrade-transaction": {"displayText":"abort an upgrade transaction","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"abort an upgrade transaction","type":"dfn","url":"#abort-an-upgrade-transaction"}, "#add-or-put": {"displayText":"add or put","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"add or put","type":"dfn","url":"#add-or-put"}, "#array-key": {"displayText":"array key","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"array key","type":"dfn","url":"#array-key"}, "#asynchronously-execute-a-request": {"displayText":"asynchronously execute a request","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"asynchronously execute a request","type":"dfn","url":"#asynchronously-execute-a-request"}, "#check-that-a-key-could-be-injected-into-a-value": {"displayText":"check that a key could be injected into a value","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"check that a key could be injected into a value","type":"dfn","url":"#check-that-a-key-could-be-injected-into-a-value"}, "#cleanup-indexed-database-transactions": {"displayText":"cleanup indexed database transactions","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"cleanup indexed database transactions","type":"dfn","url":"#cleanup-indexed-database-transactions"}, "#clear-an-object-store": {"displayText":"clear an object store","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"clear an object store","type":"dfn","url":"#clear-an-object-store"}, "#clone": {"displayText":"clone","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"clone","type":"dfn","url":"#clone"}, "#close-a-database-connection": {"displayText":"close a database connection","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"close a database connection","type":"dfn","url":"#close-a-database-connection"}, "#commit-a-transaction": {"displayText":"commit a transaction","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"commit a transaction","type":"dfn","url":"#commit-a-transaction"}, "#compare-two-keys": {"displayText":"compare two keys","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"compare two keys","type":"dfn","url":"#compare-two-keys"}, "#connection": {"displayText":"connection","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"connection","type":"dfn","url":"#connection"}, "#connection-close-pending-flag": {"displayText":"close pending flag","export":true,"for_":["connection"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"close pending flag","type":"dfn","url":"#connection-close-pending-flag"}, "#connection-closed": {"displayText":"closed","export":true,"for_":["connection"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"closed","type":"dfn","url":"#connection-closed"}, "#connection-object-store-set": {"displayText":"object store set","export":true,"for_":["connection"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"object store set","type":"dfn","url":"#connection-object-store-set"}, "#connection-queue": {"displayText":"connection queue","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"connection queue","type":"dfn","url":"#connection-queue"}, "#connection-version": {"displayText":"version","export":true,"for_":["connection"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"version","type":"dfn","url":"#connection-version"}, "#containing-only": {"displayText":"containing only","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"containing only","type":"dfn","url":"#containing-only"}, "#convert-a-key-to-a-value": {"displayText":"convert a key to a value","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"convert a key to a value","type":"dfn","url":"#convert-a-key-to-a-value"}, "#convert-a-value-to-a-key": {"displayText":"convert a value to a key","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"convert a value to a key","type":"dfn","url":"#convert-a-value-to-a-key"}, "#convert-a-value-to-a-key-range": {"displayText":"convert a value to a key range","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"convert a value to a key range","type":"dfn","url":"#convert-a-value-to-a-key-range"}, "#convert-a-value-to-a-multientry-key": {"displayText":"convert a value to a multientry key","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"convert a value to a multientry key","type":"dfn","url":"#convert-a-value-to-a-multientry-key"}, "#count-the-records-in-a-range": {"displayText":"count the records in a range","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"count the records in a range","type":"dfn","url":"#count-the-records-in-a-range"}, "#create-a-sorted-name-list": {"displayText":"create a sorted name list","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"create a sorted name list","type":"dfn","url":"#create-a-sorted-name-list"}, "#cursor": {"displayText":"cursor","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"cursor","type":"dfn","url":"#cursor"}, "#cursor-direction": {"displayText":"direction","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"direction","type":"dfn","url":"#cursor-direction"}, "#cursor-effective-key": {"displayText":"effective key","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"effective key","type":"dfn","url":"#cursor-effective-key"}, "#cursor-effective-object-store": {"displayText":"effective object store","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"effective object store","type":"dfn","url":"#cursor-effective-object-store"}, "#cursor-got-value-flag": {"displayText":"got value flag","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"got value flag","type":"dfn","url":"#cursor-got-value-flag"}, "#cursor-key": {"displayText":"key","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"key","type":"dfn","url":"#cursor-key"}, "#cursor-key-only-flag": {"displayText":"key only flag","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"key only flag","type":"dfn","url":"#cursor-key-only-flag"}, "#cursor-object-store-position": {"displayText":"object store position","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"object store position","type":"dfn","url":"#cursor-object-store-position"}, "#cursor-position": {"displayText":"position","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"position","type":"dfn","url":"#cursor-position"}, "#cursor-range": {"displayText":"range","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"range","type":"dfn","url":"#cursor-range"}, "#cursor-request": {"displayText":"request","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"request","type":"dfn","url":"#cursor-request"}, "#cursor-source": {"displayText":"source","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"source","type":"dfn","url":"#cursor-source"}, "#cursor-transaction": {"displayText":"transaction","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"transaction","type":"dfn","url":"#cursor-transaction"}, "#cursor-value": {"displayText":"value","export":true,"for_":["cursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"value","type":"dfn","url":"#cursor-value"}, "#database": {"displayText":"database","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"database","type":"dfn","url":"#database"}, "#database-name": {"displayText":"name","export":true,"for_":["database"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"dfn","url":"#database-name"}, "#database-upgrade-transaction": {"displayText":"upgrade transaction","export":true,"for_":["database"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"upgrade transaction","type":"dfn","url":"#database-upgrade-transaction"}, "#database-version": {"displayText":"version","export":true,"for_":["database"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"version","type":"dfn","url":"#database-version"}, "#delete-a-database": {"displayText":"delete a database","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"delete a database","type":"dfn","url":"#delete-a-database"}, "#delete-records-from-an-object-store": {"displayText":"delete records from an object store","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"delete records from an object store","type":"dfn","url":"#delete-records-from-an-object-store"}, "#dictdef-idbdatabaseinfo": {"displayText":"IDBDatabaseInfo","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBDatabaseInfo","type":"dictionary","url":"#dictdef-idbdatabaseinfo"}, "#dictdef-idbindexparameters": {"displayText":"IDBIndexParameters","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBIndexParameters","type":"dictionary","url":"#dictdef-idbindexparameters"}, "#dictdef-idbobjectstoreparameters": {"displayText":"IDBObjectStoreParameters","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBObjectStoreParameters","type":"dictionary","url":"#dictdef-idbobjectstoreparameters"}, "#dictdef-idbtransactionoptions": {"displayText":"IDBTransactionOptions","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBTransactionOptions","type":"dictionary","url":"#dictdef-idbtransactionoptions"}, "#dictdef-idbversionchangeeventinit": {"displayText":"IDBVersionChangeEventInit","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBVersionChangeEventInit","type":"dictionary","url":"#dictdef-idbversionchangeeventinit"}, "#dom-idbcursor-advance": {"displayText":"advance(count)","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"advance(count)","type":"method","url":"#dom-idbcursor-advance"}, "#dom-idbcursor-continue": {"displayText":"continue(key)","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"continue(key)","type":"method","url":"#dom-idbcursor-continue"}, "#dom-idbcursor-continueprimarykey": {"displayText":"continuePrimaryKey(key, primaryKey)","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"continuePrimaryKey(key, primaryKey)","type":"method","url":"#dom-idbcursor-continueprimarykey"}, "#dom-idbcursor-delete": {"displayText":"delete()","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"delete()","type":"method","url":"#dom-idbcursor-delete"}, "#dom-idbcursor-direction": {"displayText":"direction","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"direction","type":"attribute","url":"#dom-idbcursor-direction"}, "#dom-idbcursor-key": {"displayText":"key","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"key","type":"attribute","url":"#dom-idbcursor-key"}, "#dom-idbcursor-primarykey": {"displayText":"primaryKey","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"primaryKey","type":"attribute","url":"#dom-idbcursor-primarykey"}, "#dom-idbcursor-request": {"displayText":"request","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"request","type":"attribute","url":"#dom-idbcursor-request"}, "#dom-idbcursor-source": {"displayText":"source","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"source","type":"attribute","url":"#dom-idbcursor-source"}, "#dom-idbcursor-update": {"displayText":"update(value)","export":true,"for_":["IDBCursor"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"update(value)","type":"method","url":"#dom-idbcursor-update"}, "#dom-idbcursordirection-next": {"displayText":"\"next\"","export":true,"for_":["IDBCursorDirection"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"next\"","type":"enum-value","url":"#dom-idbcursordirection-next"}, "#dom-idbcursordirection-nextunique": {"displayText":"\"nextunique\"","export":true,"for_":["IDBCursorDirection"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"nextunique\"","type":"enum-value","url":"#dom-idbcursordirection-nextunique"}, "#dom-idbcursordirection-prev": {"displayText":"\"prev\"","export":true,"for_":["IDBCursorDirection"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"prev\"","type":"enum-value","url":"#dom-idbcursordirection-prev"}, "#dom-idbcursordirection-prevunique": {"displayText":"\"prevunique\"","export":true,"for_":["IDBCursorDirection"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"prevunique\"","type":"enum-value","url":"#dom-idbcursordirection-prevunique"}, "#dom-idbcursorwithvalue-value": {"displayText":"value","export":true,"for_":["IDBCursorWithValue"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"value","type":"attribute","url":"#dom-idbcursorwithvalue-value"}, "#dom-idbdatabase-close": {"displayText":"close()","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"close()","type":"method","url":"#dom-idbdatabase-close"}, "#dom-idbdatabase-createobjectstore": {"displayText":"createObjectStore(name, options)","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"createObjectStore(name, options)","type":"method","url":"#dom-idbdatabase-createobjectstore"}, "#dom-idbdatabase-deleteobjectstore": {"displayText":"deleteObjectStore(name)","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"deleteObjectStore(name)","type":"method","url":"#dom-idbdatabase-deleteobjectstore"}, "#dom-idbdatabase-name": {"displayText":"name","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"attribute","url":"#dom-idbdatabase-name"}, "#dom-idbdatabase-objectstorenames": {"displayText":"objectStoreNames","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"objectStoreNames","type":"attribute","url":"#dom-idbdatabase-objectstorenames"}, "#dom-idbdatabase-onabort": {"displayText":"onabort","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onabort","type":"attribute","url":"#dom-idbdatabase-onabort"}, "#dom-idbdatabase-onclose": {"displayText":"onclose","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onclose","type":"attribute","url":"#dom-idbdatabase-onclose"}, "#dom-idbdatabase-onerror": {"displayText":"onerror","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onerror","type":"attribute","url":"#dom-idbdatabase-onerror"}, "#dom-idbdatabase-onversionchange": {"displayText":"onversionchange","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onversionchange","type":"attribute","url":"#dom-idbdatabase-onversionchange"}, "#dom-idbdatabase-transaction": {"displayText":"transaction(storeNames)","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"transaction(storeNames)","type":"method","url":"#dom-idbdatabase-transaction"}, "#dom-idbdatabase-version": {"displayText":"version","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"version","type":"attribute","url":"#dom-idbdatabase-version"}, "#dom-idbdatabaseinfo-name": {"displayText":"name","export":true,"for_":["IDBDatabaseInfo"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"dict-member","url":"#dom-idbdatabaseinfo-name"}, "#dom-idbdatabaseinfo-version": {"displayText":"version","export":true,"for_":["IDBDatabaseInfo"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"version","type":"dict-member","url":"#dom-idbdatabaseinfo-version"}, "#dom-idbfactory-cmp": {"displayText":"cmp(first, second)","export":true,"for_":["IDBFactory"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"cmp(first, second)","type":"method","url":"#dom-idbfactory-cmp"}, "#dom-idbfactory-databases": {"displayText":"databases()","export":true,"for_":["IDBFactory"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"databases()","type":"method","url":"#dom-idbfactory-databases"}, "#dom-idbfactory-deletedatabase": {"displayText":"deleteDatabase(name)","export":true,"for_":["IDBFactory"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"deleteDatabase(name)","type":"method","url":"#dom-idbfactory-deletedatabase"}, "#dom-idbfactory-open": {"displayText":"open(name)","export":true,"for_":["IDBFactory"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"open(name)","type":"method","url":"#dom-idbfactory-open"}, "#dom-idbindex-count": {"displayText":"count(query)","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"count(query)","type":"method","url":"#dom-idbindex-count"}, "#dom-idbindex-get": {"displayText":"get(query)","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"get(query)","type":"method","url":"#dom-idbindex-get"}, "#dom-idbindex-getall": {"displayText":"getAll(query, count)","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"getAll(query, count)","type":"method","url":"#dom-idbindex-getall"}, "#dom-idbindex-getallkeys": {"displayText":"getAllKeys(query, count)","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"getAllKeys(query, count)","type":"method","url":"#dom-idbindex-getallkeys"}, "#dom-idbindex-getkey": {"displayText":"getKey(query)","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"getKey(query)","type":"method","url":"#dom-idbindex-getkey"}, "#dom-idbindex-keypath": {"displayText":"keyPath","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"keyPath","type":"attribute","url":"#dom-idbindex-keypath"}, "#dom-idbindex-multientry": {"displayText":"multiEntry","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"multiEntry","type":"attribute","url":"#dom-idbindex-multientry"}, "#dom-idbindex-name": {"displayText":"name","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"attribute","url":"#dom-idbindex-name"}, "#dom-idbindex-objectstore": {"displayText":"objectStore","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"objectStore","type":"attribute","url":"#dom-idbindex-objectstore"}, "#dom-idbindex-opencursor": {"displayText":"openCursor(query, direction)","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"openCursor(query, direction)","type":"method","url":"#dom-idbindex-opencursor"}, "#dom-idbindex-openkeycursor": {"displayText":"openKeyCursor(query, direction)","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"openKeyCursor(query, direction)","type":"method","url":"#dom-idbindex-openkeycursor"}, "#dom-idbindex-unique": {"displayText":"unique","export":true,"for_":["IDBIndex"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"unique","type":"attribute","url":"#dom-idbindex-unique"}, "#dom-idbindexparameters-multientry": {"displayText":"multiEntry","export":true,"for_":["IDBIndexParameters"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"multiEntry","type":"dict-member","url":"#dom-idbindexparameters-multientry"}, "#dom-idbindexparameters-unique": {"displayText":"unique","export":true,"for_":["IDBIndexParameters"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"unique","type":"dict-member","url":"#dom-idbindexparameters-unique"}, "#dom-idbkeyrange-bound": {"displayText":"bound(lower, upper, lowerOpen, upperOpen)","export":true,"for_":["IDBKeyRange"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"bound(lower, upper, lowerOpen, upperOpen)","type":"method","url":"#dom-idbkeyrange-bound"}, "#dom-idbkeyrange-includes": {"displayText":"includes(key)","export":true,"for_":["IDBKeyRange"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"includes(key)","type":"method","url":"#dom-idbkeyrange-includes"}, "#dom-idbkeyrange-lower": {"displayText":"lower","export":true,"for_":["IDBKeyRange"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"lower","type":"attribute","url":"#dom-idbkeyrange-lower"}, "#dom-idbkeyrange-lowerbound": {"displayText":"lowerBound(lower, open)","export":true,"for_":["IDBKeyRange"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"lowerBound(lower, open)","type":"method","url":"#dom-idbkeyrange-lowerbound"}, "#dom-idbkeyrange-loweropen": {"displayText":"lowerOpen","export":true,"for_":["IDBKeyRange"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"lowerOpen","type":"attribute","url":"#dom-idbkeyrange-loweropen"}, "#dom-idbkeyrange-only": {"displayText":"only(value)","export":true,"for_":["IDBKeyRange"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"only(value)","type":"method","url":"#dom-idbkeyrange-only"}, "#dom-idbkeyrange-upper": {"displayText":"upper","export":true,"for_":["IDBKeyRange"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"upper","type":"attribute","url":"#dom-idbkeyrange-upper"}, "#dom-idbkeyrange-upperbound": {"displayText":"upperBound(upper, open)","export":true,"for_":["IDBKeyRange"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"upperBound(upper, open)","type":"method","url":"#dom-idbkeyrange-upperbound"}, "#dom-idbkeyrange-upperopen": {"displayText":"upperOpen","export":true,"for_":["IDBKeyRange"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"upperOpen","type":"attribute","url":"#dom-idbkeyrange-upperopen"}, "#dom-idbobjectstore-add": {"displayText":"add(value, key)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"add(value, key)","type":"method","url":"#dom-idbobjectstore-add"}, "#dom-idbobjectstore-autoincrement": {"displayText":"autoIncrement","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"autoIncrement","type":"attribute","url":"#dom-idbobjectstore-autoincrement"}, "#dom-idbobjectstore-clear": {"displayText":"clear()","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"clear()","type":"method","url":"#dom-idbobjectstore-clear"}, "#dom-idbobjectstore-count": {"displayText":"count(query)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"count(query)","type":"method","url":"#dom-idbobjectstore-count"}, "#dom-idbobjectstore-createindex": {"displayText":"createIndex(name, keyPath, options)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"createIndex(name, keyPath, options)","type":"method","url":"#dom-idbobjectstore-createindex"}, "#dom-idbobjectstore-delete": {"displayText":"delete(query)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"delete(query)","type":"method","url":"#dom-idbobjectstore-delete"}, "#dom-idbobjectstore-deleteindex": {"displayText":"deleteIndex(name)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"deleteIndex(name)","type":"method","url":"#dom-idbobjectstore-deleteindex"}, "#dom-idbobjectstore-get": {"displayText":"get(query)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"get(query)","type":"method","url":"#dom-idbobjectstore-get"}, "#dom-idbobjectstore-getall": {"displayText":"getAll(query, count)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"getAll(query, count)","type":"method","url":"#dom-idbobjectstore-getall"}, "#dom-idbobjectstore-getallkeys": {"displayText":"getAllKeys(query, count)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"getAllKeys(query, count)","type":"method","url":"#dom-idbobjectstore-getallkeys"}, "#dom-idbobjectstore-getkey": {"displayText":"getKey(query)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"getKey(query)","type":"method","url":"#dom-idbobjectstore-getkey"}, "#dom-idbobjectstore-index": {"displayText":"index(name)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"index(name)","type":"method","url":"#dom-idbobjectstore-index"}, "#dom-idbobjectstore-indexnames": {"displayText":"indexNames","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"indexNames","type":"attribute","url":"#dom-idbobjectstore-indexnames"}, "#dom-idbobjectstore-keypath": {"displayText":"keyPath","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"keyPath","type":"attribute","url":"#dom-idbobjectstore-keypath"}, "#dom-idbobjectstore-name": {"displayText":"name","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"attribute","url":"#dom-idbobjectstore-name"}, "#dom-idbobjectstore-opencursor": {"displayText":"openCursor(query, direction)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"openCursor(query, direction)","type":"method","url":"#dom-idbobjectstore-opencursor"}, "#dom-idbobjectstore-openkeycursor": {"displayText":"openKeyCursor(query, direction)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"openKeyCursor(query, direction)","type":"method","url":"#dom-idbobjectstore-openkeycursor"}, "#dom-idbobjectstore-put": {"displayText":"put(value, key)","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"put(value, key)","type":"method","url":"#dom-idbobjectstore-put"}, "#dom-idbobjectstore-transaction": {"displayText":"transaction","export":true,"for_":["IDBObjectStore"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"transaction","type":"attribute","url":"#dom-idbobjectstore-transaction"}, "#dom-idbobjectstoreparameters-autoincrement": {"displayText":"autoIncrement","export":true,"for_":["IDBObjectStoreParameters"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"autoIncrement","type":"dict-member","url":"#dom-idbobjectstoreparameters-autoincrement"}, "#dom-idbobjectstoreparameters-keypath": {"displayText":"keyPath","export":true,"for_":["IDBObjectStoreParameters"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"keyPath","type":"dict-member","url":"#dom-idbobjectstoreparameters-keypath"}, "#dom-idbopendbrequest-onblocked": {"displayText":"onblocked","export":true,"for_":["IDBOpenDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onblocked","type":"attribute","url":"#dom-idbopendbrequest-onblocked"}, "#dom-idbopendbrequest-onupgradeneeded": {"displayText":"onupgradeneeded","export":true,"for_":["IDBOpenDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onupgradeneeded","type":"attribute","url":"#dom-idbopendbrequest-onupgradeneeded"}, "#dom-idbrequest-error": {"displayText":"error","export":true,"for_":["IDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"error","type":"attribute","url":"#dom-idbrequest-error"}, "#dom-idbrequest-onerror": {"displayText":"onerror","export":true,"for_":["IDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onerror","type":"attribute","url":"#dom-idbrequest-onerror"}, "#dom-idbrequest-onsuccess": {"displayText":"onsuccess","export":true,"for_":["IDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onsuccess","type":"attribute","url":"#dom-idbrequest-onsuccess"}, "#dom-idbrequest-readystate": {"displayText":"readyState","export":true,"for_":["IDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"readyState","type":"attribute","url":"#dom-idbrequest-readystate"}, "#dom-idbrequest-result": {"displayText":"result","export":true,"for_":["IDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"result","type":"attribute","url":"#dom-idbrequest-result"}, "#dom-idbrequest-source": {"displayText":"source","export":true,"for_":["IDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"source","type":"attribute","url":"#dom-idbrequest-source"}, "#dom-idbrequest-transaction": {"displayText":"transaction","export":true,"for_":["IDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"transaction","type":"attribute","url":"#dom-idbrequest-transaction"}, "#dom-idbrequestreadystate-done": {"displayText":"\"done\"","export":true,"for_":["IDBRequestReadyState"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"done\"","type":"enum-value","url":"#dom-idbrequestreadystate-done"}, "#dom-idbrequestreadystate-pending": {"displayText":"\"pending\"","export":true,"for_":["IDBRequestReadyState"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"pending\"","type":"enum-value","url":"#dom-idbrequestreadystate-pending"}, "#dom-idbtransaction-abort": {"displayText":"abort()","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"abort()","type":"method","url":"#dom-idbtransaction-abort"}, "#dom-idbtransaction-commit": {"displayText":"commit()","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"commit()","type":"method","url":"#dom-idbtransaction-commit"}, "#dom-idbtransaction-db": {"displayText":"db","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"db","type":"attribute","url":"#dom-idbtransaction-db"}, "#dom-idbtransaction-durability": {"displayText":"durability","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"durability","type":"attribute","url":"#dom-idbtransaction-durability"}, "#dom-idbtransaction-error": {"displayText":"error","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"error","type":"attribute","url":"#dom-idbtransaction-error"}, "#dom-idbtransaction-mode": {"displayText":"mode","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"mode","type":"attribute","url":"#dom-idbtransaction-mode"}, "#dom-idbtransaction-objectstore": {"displayText":"objectStore(name)","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"objectStore(name)","type":"method","url":"#dom-idbtransaction-objectstore"}, "#dom-idbtransaction-objectstorenames": {"displayText":"objectStoreNames","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"objectStoreNames","type":"attribute","url":"#dom-idbtransaction-objectstorenames"}, "#dom-idbtransaction-onabort": {"displayText":"onabort","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onabort","type":"attribute","url":"#dom-idbtransaction-onabort"}, "#dom-idbtransaction-oncomplete": {"displayText":"oncomplete","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"oncomplete","type":"attribute","url":"#dom-idbtransaction-oncomplete"}, "#dom-idbtransaction-onerror": {"displayText":"onerror","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"onerror","type":"attribute","url":"#dom-idbtransaction-onerror"}, "#dom-idbtransactiondurability-default": {"displayText":"\"default\"","export":true,"for_":["IDBTransactionDurability"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"default\"","type":"enum-value","url":"#dom-idbtransactiondurability-default"}, "#dom-idbtransactiondurability-relaxed": {"displayText":"\"relaxed\"","export":true,"for_":["IDBTransactionDurability"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"relaxed\"","type":"enum-value","url":"#dom-idbtransactiondurability-relaxed"}, "#dom-idbtransactiondurability-strict": {"displayText":"\"strict\"","export":true,"for_":["IDBTransactionDurability"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"strict\"","type":"enum-value","url":"#dom-idbtransactiondurability-strict"}, "#dom-idbtransactionmode-readonly": {"displayText":"\"readonly\"","export":true,"for_":["IDBTransactionMode"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"readonly\"","type":"enum-value","url":"#dom-idbtransactionmode-readonly"}, "#dom-idbtransactionmode-readwrite": {"displayText":"\"readwrite\"","export":true,"for_":["IDBTransactionMode"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"readwrite\"","type":"enum-value","url":"#dom-idbtransactionmode-readwrite"}, "#dom-idbtransactionmode-versionchange": {"displayText":"\"versionchange\"","export":true,"for_":["IDBTransactionMode"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"\"versionchange\"","type":"enum-value","url":"#dom-idbtransactionmode-versionchange"}, "#dom-idbtransactionoptions-durability": {"displayText":"durability","export":true,"for_":["IDBTransactionOptions"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"durability","type":"dict-member","url":"#dom-idbtransactionoptions-durability"}, "#dom-idbversionchangeevent-newversion": {"displayText":"newVersion","export":true,"for_":["IDBVersionChangeEvent"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"newVersion","type":"attribute","url":"#dom-idbversionchangeevent-newversion"}, "#dom-idbversionchangeevent-oldversion": {"displayText":"oldVersion","export":true,"for_":["IDBVersionChangeEvent"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"oldVersion","type":"attribute","url":"#dom-idbversionchangeevent-oldversion"}, "#dom-windoworworkerglobalscope-indexeddb": {"displayText":"indexedDB","export":true,"for_":["WindowOrWorkerGlobalScope"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"indexedDB","type":"attribute","url":"#dom-windoworworkerglobalscope-indexeddb"}, "#enumdef-idbcursordirection": {"displayText":"IDBCursorDirection","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBCursorDirection","type":"enum","url":"#enumdef-idbcursordirection"}, "#enumdef-idbrequestreadystate": {"displayText":"IDBRequestReadyState","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBRequestReadyState","type":"enum","url":"#enumdef-idbrequestreadystate"}, "#enumdef-idbtransactiondurability": {"displayText":"IDBTransactionDurability","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBTransactionDurability","type":"enum","url":"#enumdef-idbtransactiondurability"}, "#enumdef-idbtransactionmode": {"displayText":"IDBTransactionMode","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBTransactionMode","type":"enum","url":"#enumdef-idbtransactionmode"}, "#equal-to": {"displayText":"equal to","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"equal to","type":"dfn","url":"#equal-to"}, "#evaluate-a-key-path-on-a-value": {"displayText":"evaluate a key path on a value","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"evaluate a key path on a value","type":"dfn","url":"#evaluate-a-key-path-on-a-value"}, "#eventdef-idbdatabase-close": {"displayText":"close","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"close","type":"event","url":"#eventdef-idbdatabase-close"}, "#eventdef-idbdatabase-versionchange": {"displayText":"versionchange","export":true,"for_":["IDBDatabase"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"versionchange","type":"event","url":"#eventdef-idbdatabase-versionchange"}, "#eventdef-idbopendbrequest-blocked": {"displayText":"blocked","export":true,"for_":["IDBOpenDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"blocked","type":"event","url":"#eventdef-idbopendbrequest-blocked"}, "#eventdef-idbopendbrequest-upgradeneeded": {"displayText":"upgradeneeded","export":true,"for_":["IDBOpenDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"upgradeneeded","type":"event","url":"#eventdef-idbopendbrequest-upgradeneeded"}, "#eventdef-idbrequest-error": {"displayText":"error","export":true,"for_":["IDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"error","type":"event","url":"#eventdef-idbrequest-error"}, "#eventdef-idbrequest-success": {"displayText":"success","export":true,"for_":["IDBRequest"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"success","type":"event","url":"#eventdef-idbrequest-success"}, "#eventdef-idbtransaction-abort": {"displayText":"abort","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"abort","type":"event","url":"#eventdef-idbtransaction-abort"}, "#eventdef-idbtransaction-complete": {"displayText":"complete","export":true,"for_":["IDBTransaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"complete","type":"event","url":"#eventdef-idbtransaction-complete"}, "#extract-a-key-from-a-value-using-a-key-path": {"displayText":"extract a key from a value using a key path","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"extract a key from a value using a key path","type":"dfn","url":"#extract-a-key-from-a-value-using-a-key-path"}, "#fire-a-success-event": {"displayText":"fire a success event","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"fire a success event","type":"dfn","url":"#fire-a-success-event"}, "#fire-a-version-change-event": {"displayText":"fire a version change event","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"fire a version change event","type":"dfn","url":"#fire-a-version-change-event"}, "#fire-an-error-event": {"displayText":"fire an error event","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"fire an error event","type":"dfn","url":"#fire-an-error-event"}, "#generate-a-key": {"displayText":"generate a key","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"generate a key","type":"dfn","url":"#generate-a-key"}, "#greater-than": {"displayText":"ascending","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"ascending","type":"dfn","url":"#greater-than"}, "#idbcursor": {"displayText":"IDBCursor","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBCursor","type":"interface","url":"#idbcursor"}, "#idbcursorwithvalue": {"displayText":"IDBCursorWithValue","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBCursorWithValue","type":"interface","url":"#idbcursorwithvalue"}, "#idbdatabase": {"displayText":"IDBDatabase","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBDatabase","type":"interface","url":"#idbdatabase"}, "#idbfactory": {"displayText":"IDBFactory","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBFactory","type":"interface","url":"#idbfactory"}, "#idbindex": {"displayText":"IDBIndex","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBIndex","type":"interface","url":"#idbindex"}, "#idbkeyrange": {"displayText":"IDBKeyRange","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBKeyRange","type":"interface","url":"#idbkeyrange"}, "#idbobjectstore": {"displayText":"IDBObjectStore","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBObjectStore","type":"interface","url":"#idbobjectstore"}, "#idbopendbrequest": {"displayText":"IDBOpenDBRequest","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBOpenDBRequest","type":"interface","url":"#idbopendbrequest"}, "#idbrequest": {"displayText":"IDBRequest","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBRequest","type":"interface","url":"#idbrequest"}, "#idbtransaction": {"displayText":"IDBTransaction","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBTransaction","type":"interface","url":"#idbtransaction"}, "#idbversionchangeevent": {"displayText":"IDBVersionChangeEvent","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"IDBVersionChangeEvent","type":"interface","url":"#idbversionchangeevent"}, "#identifier": {"displayText":"identifier","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"identifier","type":"dfn","url":"#identifier"}, "#in": {"displayText":"in","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"in","type":"dfn","url":"#in"}, "#index-concept": {"displayText":"index","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"index","type":"dfn","url":"#index-concept"}, "#index-handle": {"displayText":"index handle","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"index handle","type":"dfn","url":"#index-handle"}, "#index-handle-index": {"displayText":"index","export":true,"for_":["index-handle"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"index","type":"dfn","url":"#index-handle-index"}, "#index-handle-name": {"displayText":"name","export":true,"for_":["index-handle"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"dfn","url":"#index-handle-name"}, "#index-handle-object-store-handle": {"displayText":"object store handle","export":true,"for_":["index-handle"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"object store handle","type":"dfn","url":"#index-handle-object-store-handle"}, "#index-handle-transaction": {"displayText":"transaction","export":true,"for_":["index-handle"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"transaction","type":"dfn","url":"#index-handle-transaction"}, "#index-key-path": {"displayText":"key path","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"key path","type":"dfn","url":"#index-key-path"}, "#index-keys": {"displayText":"keys","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"keys","type":"dfn","url":"#index-keys"}, "#index-list-of-records": {"displayText":"list of records","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"list of records","type":"dfn","url":"#index-list-of-records"}, "#index-multientry-flag": {"displayText":"multientry flag","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"multientry flag","type":"dfn","url":"#index-multientry-flag"}, "#index-name": {"displayText":"name","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"dfn","url":"#index-name"}, "#index-records": {"displayText":"records","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"records","type":"dfn","url":"#index-records"}, "#index-referenced": {"displayText":"referenced","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"referenced","type":"dfn","url":"#index-referenced"}, "#index-referenced-value": {"displayText":"referenced value","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"referenced value","type":"dfn","url":"#index-referenced-value"}, "#index-unique-flag": {"displayText":"unique flag","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"unique flag","type":"dfn","url":"#index-unique-flag"}, "#index-values": {"displayText":"values","export":true,"for_":["index"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"values","type":"dfn","url":"#index-values"}, "#inject-a-key-into-a-value-using-a-key-path": {"displayText":"inject a key into a value using a key path","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"inject a key into a value using a key path","type":"dfn","url":"#inject-a-key-into-a-value-using-a-key-path"}, "#iterate-a-cursor": {"displayText":"iterate a cursor","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"iterate a cursor","type":"dfn","url":"#iterate-a-cursor"}, "#key": {"displayText":"key","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"key","type":"dfn","url":"#key"}, "#key-generator": {"displayText":"key generator","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"key generator","type":"dfn","url":"#key-generator"}, "#key-generator-current-number": {"displayText":"current number","export":true,"for_":["key generator"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"current number","type":"dfn","url":"#key-generator-current-number"}, "#key-path": {"displayText":"key path","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"key path","type":"dfn","url":"#key-path"}, "#key-range": {"displayText":"key range","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"key range","type":"dfn","url":"#key-range"}, "#key-range-lower-bound": {"displayText":"lower bound","export":true,"for_":["key range"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"lower bound","type":"dfn","url":"#key-range-lower-bound"}, "#key-range-lower-open-flag": {"displayText":"lower open flag","export":true,"for_":["key range"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"lower open flag","type":"dfn","url":"#key-range-lower-open-flag"}, "#key-range-upper-bound": {"displayText":"upper bound","export":true,"for_":["key range"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"upper bound","type":"dfn","url":"#key-range-upper-bound"}, "#key-range-upper-open-flag": {"displayText":"upper open flag","export":true,"for_":["key range"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"upper open flag","type":"dfn","url":"#key-range-upper-open-flag"}, "#key-type": {"displayText":"type","export":true,"for_":["key"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"type","type":"dfn","url":"#key-type"}, "#key-value": {"displayText":"value","export":true,"for_":["key"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"value","type":"dfn","url":"#key-value"}, "#less-than": {"displayText":"less than","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"less than","type":"dfn","url":"#less-than"}, "#name": {"displayText":"name","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"dfn","url":"#name"}, "#object-store": {"displayText":"object store","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"object store","type":"dfn","url":"#object-store"}, "#object-store-handle": {"displayText":"object store handle","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"object store handle","type":"dfn","url":"#object-store-handle"}, "#object-store-handle-index-set": {"displayText":"index set","export":true,"for_":["object-store-handle"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"index set","type":"dfn","url":"#object-store-handle-index-set"}, "#object-store-handle-name": {"displayText":"name","export":true,"for_":["object-store-handle"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"dfn","url":"#object-store-handle-name"}, "#object-store-handle-object-store": {"displayText":"object store","export":true,"for_":["object-store-handle"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"object store","type":"dfn","url":"#object-store-handle-object-store"}, "#object-store-handle-transaction": {"displayText":"transaction","export":true,"for_":["object-store-handle"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"transaction","type":"dfn","url":"#object-store-handle-transaction"}, "#object-store-in-line-keys": {"displayText":"in-line keys","export":true,"for_":["object-store"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"in-line keys","type":"dfn","url":"#object-store-in-line-keys"}, "#object-store-key-path": {"displayText":"key path","export":true,"for_":["object-store"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"key path","type":"dfn","url":"#object-store-key-path"}, "#object-store-list-of-records": {"displayText":"list of records","export":true,"for_":["object-store"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"list of records","type":"dfn","url":"#object-store-list-of-records"}, "#object-store-name": {"displayText":"name","export":true,"for_":["object-store"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"name","type":"dfn","url":"#object-store-name"}, "#object-store-out-of-line-keys": {"displayText":"out-of-line keys","export":true,"for_":["object-store"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"out-of-line keys","type":"dfn","url":"#object-store-out-of-line-keys"}, "#object-store-record": {"displayText":"record","export":true,"for_":["object-store"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"record","type":"dfn","url":"#object-store-record"}, "#open-a-database-connection": {"displayText":"open a database connection","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"open a database connection","type":"dfn","url":"#open-a-database-connection"}, "#possibly-update-the-key-generator": {"displayText":"possibly update the key generator","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"possibly update the key generator","type":"dfn","url":"#possibly-update-the-key-generator"}, "#request": {"displayText":"request","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"request","type":"dfn","url":"#request"}, "#request-done-flag": {"displayText":"done flag","export":true,"for_":["request"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"done flag","type":"dfn","url":"#request-done-flag"}, "#request-error": {"displayText":"error","export":true,"for_":["request"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"error","type":"dfn","url":"#request-error"}, "#request-open-request": {"displayText":"open request","export":true,"for_":["request"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"open request","type":"dfn","url":"#request-open-request"}, "#request-placed": {"displayText":"placed","export":true,"for_":["request"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"placed","type":"dfn","url":"#request-placed"}, "#request-processed": {"displayText":"processed","export":true,"for_":["request"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"processed","type":"dfn","url":"#request-processed"}, "#request-processed-flag": {"displayText":"processed flag","export":true,"for_":["request"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"processed flag","type":"dfn","url":"#request-processed-flag"}, "#request-result": {"displayText":"result","export":true,"for_":["request"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"result","type":"dfn","url":"#request-result"}, "#request-source": {"displayText":"source","export":true,"for_":["request"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"source","type":"dfn","url":"#request-source"}, "#request-transaction": {"displayText":"transaction","export":true,"for_":["request"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"transaction","type":"dfn","url":"#request-transaction"}, "#retrieve-a-key-from-an-object-store": {"displayText":"retrieve a key from an object store","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"retrieve a key from an object store","type":"dfn","url":"#retrieve-a-key-from-an-object-store"}, "#retrieve-a-referenced-value-from-an-index": {"displayText":"retrieve a referenced value from an index","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"retrieve a referenced value from an index","type":"dfn","url":"#retrieve-a-referenced-value-from-an-index"}, "#retrieve-a-value-from-an-index": {"displayText":"retrieve a value from an index","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"retrieve a value from an index","type":"dfn","url":"#retrieve-a-value-from-an-index"}, "#retrieve-a-value-from-an-object-store": {"displayText":"retrieve a value from an object store","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"retrieve a value from an object store","type":"dfn","url":"#retrieve-a-value-from-an-object-store"}, "#retrieve-multiple-keys-from-an-object-store": {"displayText":"retrieve multiple keys from an object store","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"retrieve multiple keys from an object store","type":"dfn","url":"#retrieve-multiple-keys-from-an-object-store"}, "#retrieve-multiple-referenced-values-from-an-index": {"displayText":"retrieve multiple referenced values from an index","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"retrieve multiple referenced values from an index","type":"dfn","url":"#retrieve-multiple-referenced-values-from-an-index"}, "#retrieve-multiple-values-from-an-index": {"displayText":"retrieve multiple values from an index","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"retrieve multiple values from an index","type":"dfn","url":"#retrieve-multiple-values-from-an-index"}, "#retrieve-multiple-values-from-an-object-store": {"displayText":"retrieve multiple values from an object store","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"retrieve multiple values from an object store","type":"dfn","url":"#retrieve-multiple-values-from-an-object-store"}, "#store-a-record-into-an-object-store": {"displayText":"store a record into an object store","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"store a record into an object store","type":"dfn","url":"#store-a-record-into-an-object-store"}, "#subkeys": {"displayText":"subkeys","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"subkeys","type":"dfn","url":"#subkeys"}, "#transaction-abort": {"displayText":"aborted","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"aborted","type":"dfn","url":"#transaction-abort"}, "#transaction-active": {"displayText":"active","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"active","type":"dfn","url":"#transaction-active"}, "#transaction-cleanup-event-loop": {"displayText":"cleanup event loop","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"cleanup event loop","type":"dfn","url":"#transaction-cleanup-event-loop"}, "#transaction-commit": {"displayText":"committed","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"committed","type":"dfn","url":"#transaction-commit"}, "#transaction-committing": {"displayText":"committing","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"committing","type":"dfn","url":"#transaction-committing"}, "#transaction-concept": {"displayText":"transaction","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"transaction","type":"dfn","url":"#transaction-concept"}, "#transaction-connection": {"displayText":"connection","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"connection","type":"dfn","url":"#transaction-connection"}, "#transaction-created": {"displayText":"created","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"created","type":"dfn","url":"#transaction-created"}, "#transaction-durability-hint": {"displayText":"durability hint","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"durability hint","type":"dfn","url":"#transaction-durability-hint"}, "#transaction-error": {"displayText":"error","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"error","type":"dfn","url":"#transaction-error"}, "#transaction-finished": {"displayText":"finished","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"finished","type":"dfn","url":"#transaction-finished"}, "#transaction-inactive": {"displayText":"inactive","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"inactive","type":"dfn","url":"#transaction-inactive"}, "#transaction-lifetime": {"displayText":"lifetime","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"lifetime","type":"dfn","url":"#transaction-lifetime"}, "#transaction-live": {"displayText":"live","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"live","type":"dfn","url":"#transaction-live"}, "#transaction-mode": {"displayText":"mode","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"mode","type":"dfn","url":"#transaction-mode"}, "#transaction-overlap": {"displayText":"overlap","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"overlap","type":"dfn","url":"#transaction-overlap"}, "#transaction-read-only-transaction": {"displayText":"read-only transaction","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"read-only transaction","type":"dfn","url":"#transaction-read-only-transaction"}, "#transaction-read-write-transaction": {"displayText":"read/write transaction","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"read/write transaction","type":"dfn","url":"#transaction-read-write-transaction"}, "#transaction-request-list": {"displayText":"request list","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"request list","type":"dfn","url":"#transaction-request-list"}, "#transaction-scope": {"displayText":"scope","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"scope","type":"dfn","url":"#transaction-scope"}, "#transaction-start": {"displayText":"started","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"started","type":"dfn","url":"#transaction-start"}, "#transaction-state": {"displayText":"state","export":true,"for_":["transaction"],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"state","type":"dfn","url":"#transaction-state"}, "#unbounded-key-range": {"displayText":"unbounded key range","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"unbounded key range","type":"dfn","url":"#unbounded-key-range"}, "#upgrade-a-database": {"displayText":"upgrade a database","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"upgrade a database","type":"dfn","url":"#upgrade-a-database"}, "#upgrade-transaction": {"displayText":"upgrade transaction","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"upgrade transaction","type":"dfn","url":"#upgrade-transaction"}, "#valid-key-path": {"displayText":"valid key path","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"valid key path","type":"dfn","url":"#valid-key-path"}, "#value": {"displayText":"value","export":true,"for_":[],"level":"3","normative":true,"shortname":"indexeddb","spec":"indexeddb-3","status":"local","text":"value","type":"dfn","url":"#value"}, "https://dom.spec.whatwg.org/#canceled-flag": {"displayText":"canceled flag","export":true,"for_":["Event"],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"canceled flag","type":"dfn","url":"https://dom.spec.whatwg.org/#canceled-flag"}, "https://dom.spec.whatwg.org/#concept-event": {"displayText":"event","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"event","type":"dfn","url":"https://dom.spec.whatwg.org/#concept-event"}, "https://dom.spec.whatwg.org/#concept-event-create": {"displayText":"creating an event","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"creating an event","type":"dfn","url":"https://dom.spec.whatwg.org/#concept-event-create"}, "https://dom.spec.whatwg.org/#concept-event-dispatch": {"displayText":"dispatch","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"dispatch","type":"dfn","url":"https://dom.spec.whatwg.org/#concept-event-dispatch"}, "https://dom.spec.whatwg.org/#concept-event-fire": {"displayText":"fire an event","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"fire an event","type":"dfn","url":"https://dom.spec.whatwg.org/#concept-event-fire"}, "https://dom.spec.whatwg.org/#dictdef-eventinit": {"displayText":"EventInit","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"EventInit","type":"dictionary","url":"https://dom.spec.whatwg.org/#dictdef-eventinit"}, "https://dom.spec.whatwg.org/#document": {"displayText":"Document","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"Document","type":"interface","url":"https://dom.spec.whatwg.org/#document"}, "https://dom.spec.whatwg.org/#dom-event-bubbles": {"displayText":"bubbles","export":true,"for_":["Event"],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"bubbles","type":"attribute","url":"https://dom.spec.whatwg.org/#dom-event-bubbles"}, "https://dom.spec.whatwg.org/#dom-event-cancelable": {"displayText":"cancelable","export":true,"for_":["Event"],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"cancelable","type":"attribute","url":"https://dom.spec.whatwg.org/#dom-event-cancelable"}, "https://dom.spec.whatwg.org/#dom-event-preventdefault": {"displayText":"preventDefault()","export":true,"for_":["Event"],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"preventDefault()","type":"method","url":"https://dom.spec.whatwg.org/#dom-event-preventdefault"}, "https://dom.spec.whatwg.org/#dom-event-type": {"displayText":"type","export":true,"for_":["Event"],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"type","type":"attribute","url":"https://dom.spec.whatwg.org/#dom-event-type"}, "https://dom.spec.whatwg.org/#event": {"displayText":"Event","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"Event","type":"interface","url":"https://dom.spec.whatwg.org/#event"}, "https://dom.spec.whatwg.org/#eventtarget": {"displayText":"EventTarget","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"EventTarget","type":"interface","url":"https://dom.spec.whatwg.org/#eventtarget"}, "https://dom.spec.whatwg.org/#get-the-parent": {"displayText":"get the parent","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"get the parent","type":"dfn","url":"https://dom.spec.whatwg.org/#get-the-parent"}, "https://html.spec.whatwg.org/multipage/browsers.html#concept-origin": {"displayText":"origin","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"origin","type":"dfn","url":"https://html.spec.whatwg.org/multipage/browsers.html#concept-origin"}, "https://html.spec.whatwg.org/multipage/browsers.html#dom-document-domain": {"displayText":"domain","export":true,"for_":["Document"],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"domain","type":"attribute","url":"https://html.spec.whatwg.org/multipage/browsers.html#dom-document-domain"}, "https://html.spec.whatwg.org/multipage/canvas.html#imagedata": {"displayText":"ImageData","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"ImageData","type":"interface","url":"https://html.spec.whatwg.org/multipage/canvas.html#imagedata"}, "https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist": {"displayText":"DOMStringList","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"DOMStringList","type":"interface","url":"https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist"}, "https://html.spec.whatwg.org/multipage/document-sequences.html#browsing-context": {"displayText":"browsing context","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"browsing context","type":"dfn","url":"https://html.spec.whatwg.org/multipage/document-sequences.html#browsing-context"}, "https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel": {"displayText":"in parallel","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"in parallel","type":"dfn","url":"https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel"}, "https://html.spec.whatwg.org/multipage/structured-data.html#serializable-objects": {"displayText":"serializable object","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"serializable object","type":"dfn","url":"https://html.spec.whatwg.org/multipage/structured-data.html#serializable-objects"}, "https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize": {"displayText":"StructuredDeserialize","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"StructuredDeserialize","type":"abstract-op","url":"https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize"}, "https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage": {"displayText":"StructuredSerializeForStorage","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"StructuredSerializeForStorage","type":"abstract-op","url":"https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeforstorage"}, "https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type": {"displayText":"event handler event type","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"event handler event type","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type"}, "https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes": {"displayText":"event handler IDL attribute","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"event handler idl attribute","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-idl-attributes"}, "https://html.spec.whatwg.org/multipage/webappapis.html#event-loop": {"displayText":"event loop","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"event loop","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#event-loop"}, "https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler": {"displayText":"EventHandler","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"EventHandler","type":"typedef","url":"https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"}, "https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task": {"displayText":"queue a task","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"queue a task","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task"}, "https://html.spec.whatwg.org/multipage/webappapis.html#relevant-settings-object": {"displayText":"relevant settings object","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"relevant settings object","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#relevant-settings-object"}, "https://html.spec.whatwg.org/multipage/webappapis.html#task-queue": {"displayText":"task queues","export":false,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"task queues","type":"dfn","url":"https://html.spec.whatwg.org/multipage/webappapis.html#task-queue"}, "https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope": {"displayText":"WindowOrWorkerGlobalScope","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"WindowOrWorkerGlobalScope","type":"interface","url":"https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope"}, "https://infra.spec.whatwg.org/#assert": {"displayText":"assert","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"assert","type":"dfn","url":"https://infra.spec.whatwg.org/#assert"}, "https://infra.spec.whatwg.org/#byte": {"displayText":"byte","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"byte","type":"dfn","url":"https://infra.spec.whatwg.org/#byte"}, "https://infra.spec.whatwg.org/#byte-less-than": {"displayText":"byte less than","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"byte less than","type":"dfn","url":"https://infra.spec.whatwg.org/#byte-less-than"}, "https://infra.spec.whatwg.org/#byte-sequence": {"displayText":"byte sequence","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"byte sequence","type":"dfn","url":"https://infra.spec.whatwg.org/#byte-sequence"}, "https://infra.spec.whatwg.org/#byte-sequence-length": {"displayText":"length","export":true,"for_":["byte sequence"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"length","type":"dfn","url":"https://infra.spec.whatwg.org/#byte-sequence-length"}, "https://infra.spec.whatwg.org/#code-unit-less-than": {"displayText":"code unit less than","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"code unit less than","type":"dfn","url":"https://infra.spec.whatwg.org/#code-unit-less-than"}, "https://infra.spec.whatwg.org/#list": {"displayText":"list","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"list","type":"dfn","url":"https://infra.spec.whatwg.org/#list"}, "https://infra.spec.whatwg.org/#list-append": {"displayText":"append","export":true,"for_":["list"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"append","type":"dfn","url":"https://infra.spec.whatwg.org/#list-append"}, "https://infra.spec.whatwg.org/#list-contain": {"displayText":"contain","export":true,"for_":["list","stack","queue","set"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"contain","type":"dfn","url":"https://infra.spec.whatwg.org/#list-contain"}, "https://infra.spec.whatwg.org/#list-item": {"displayText":"item","export":true,"for_":["list","stack","queue","set"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"item","type":"dfn","url":"https://infra.spec.whatwg.org/#list-item"}, "https://infra.spec.whatwg.org/#list-iterate": {"displayText":"for each","export":true,"for_":["list","set"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"for each","type":"dfn","url":"https://infra.spec.whatwg.org/#list-iterate"}, "https://infra.spec.whatwg.org/#list-size": {"displayText":"size","export":true,"for_":["list","stack","queue","set"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"size","type":"dfn","url":"https://infra.spec.whatwg.org/#list-size"}, "https://infra.spec.whatwg.org/#list-sort-in-ascending-order": {"displayText":"sort in ascending order","export":true,"for_":["list","stack","queue","set"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"sort in ascending order","type":"dfn","url":"https://infra.spec.whatwg.org/#list-sort-in-ascending-order"}, "https://infra.spec.whatwg.org/#ordered-set": {"displayText":"set","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"set","type":"dfn","url":"https://infra.spec.whatwg.org/#ordered-set"}, "https://infra.spec.whatwg.org/#set-append": {"displayText":"append","export":true,"for_":["set"],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"append","type":"dfn","url":"https://infra.spec.whatwg.org/#set-append"}, "https://infra.spec.whatwg.org/#strictly-split": {"displayText":"strictly split a string","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"strictly split a string","type":"dfn","url":"https://infra.spec.whatwg.org/#strictly-split"}, "https://infra.spec.whatwg.org/#string": {"displayText":"string","export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"string","type":"dfn","url":"https://infra.spec.whatwg.org/#string"}, "https://storage.spec.whatwg.org/#obtain-a-storage-key": {"displayText":"obtain a storage key","export":true,"for_":[],"level":"1","normative":true,"shortname":"storage","spec":"storage","status":"current","text":"obtain a storage key","type":"dfn","url":"https://storage.spec.whatwg.org/#obtain-a-storage-key"}, "https://storage.spec.whatwg.org/#storage-bucket": {"displayText":"storage bucket","export":true,"for_":[],"level":"","normative":true,"shortname":"storage","spec":"storage","status":"anchor-block","text":"storage bucket","type":"dfn","url":"https://storage.spec.whatwg.org/#storage-bucket"}, "https://storage.spec.whatwg.org/#storage-key": {"displayText":"storage key","export":true,"for_":[],"level":"","normative":true,"shortname":"storage","spec":"storage","status":"anchor-block","text":"storage key","type":"dfn","url":"https://storage.spec.whatwg.org/#storage-key"}, "https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty": {"displayText":"CreateDataProperty","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"CreateDataProperty","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-createdataproperty"}, "https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p": {"displayText":"Get","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"Get","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-get-o-p"}, "https://tc39.es/ecma262/multipage/abstract-operations.html#sec-hasownproperty": {"displayText":"HasOwnProperty","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"HasOwnProperty","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-hasownproperty"}, "https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tolength": {"displayText":"ToLength","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"ToLength","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tolength"}, "https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring": {"displayText":"ToString","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"ToString","type":"abstract-op","url":"https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tostring"}, "https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type": {"displayText":"abrupt completion","export":true,"for_":["ECMAScript"],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"abrupt completion","type":"dfn","url":"https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type"}, "https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm": {"displayText":"the current Realm Record","export":true,"for_":["ECMAScript"],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"the current realm record","type":"dfn","url":"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#current-realm"}, "https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#realm": {"displayText":"realm","export":true,"for_":["ECMAScript"],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"realm","type":"dfn","url":"https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#realm"}, "https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object-objects": {"displayText":"Object","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"Object","type":"interface","url":"https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object-objects"}, "https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects": {"displayText":"Array","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"Array","type":"interface","url":"https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array-objects"}, "https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.sort": {"displayText":"sort(comparator)","export":true,"for_":["Array"],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"sort(comparator)","type":"method","url":"https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.sort"}, "https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-objects": {"displayText":"Date","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"Date","type":"interface","url":"https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-objects"}, "https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number-objects": {"displayText":"Number","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"Number","type":"interface","url":"https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number-objects"}, "https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#array-exotic-object": {"displayText":"array exotic object","export":true,"for_":["ECMAScript"],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"array exotic object","type":"dfn","url":"https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#array-exotic-object"}, "https://tc39.es/ecma262/multipage/text-processing.html#sec-regexp-regular-expression-objects": {"displayText":"RegExp","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"RegExp","type":"interface","url":"https://tc39.es/ecma262/multipage/text-processing.html#sec-regexp-regular-expression-objects"}, "https://tc39.es/ecma262/multipage/text-processing.html#sec-string-objects": {"displayText":"String","export":true,"for_":[],"level":"1","normative":true,"shortname":"ecmascript","spec":"ecmascript","status":"current","text":"String","type":"interface","url":"https://tc39.es/ecma262/multipage/text-processing.html#sec-string-objects"}, "https://tc39.github.io/ecma262/#prod-IdentifierName": {"displayText":"IdentifierName","export":true,"for_":["ECMAScript"],"level":"262","normative":true,"shortname":"ecma","spec":"ecma-262","status":"anchor-block","text":"identifiername","type":"dfn","url":"https://tc39.github.io/ecma262/#prod-IdentifierName"}, "https://tc39.github.io/ecma262/#sec-algorithm-conventions": {"displayText":"?","export":true,"for_":["ECMAScript"],"level":"262","normative":true,"shortname":"ecma","spec":"ecma-262","status":"anchor-block","text":"?","type":"dfn","url":"https://tc39.github.io/ecma262/#sec-algorithm-conventions"}, "https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values": {"displayText":"Type","export":true,"for_":["ECMAScript"],"level":"262","normative":true,"shortname":"ecma","spec":"ecma-262","status":"anchor-block","text":"type","type":"dfn","url":"https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values"}, "https://tc39.github.io/ecma262/#sec-returnifabrupt": {"displayText":"ReturnIfAbrupt","export":true,"for_":["ECMAScript"],"level":"262","normative":true,"shortname":"ecma","spec":"ecma-262","status":"anchor-block","text":"returnifabrupt","type":"dfn","url":"https://tc39.github.io/ecma262/#sec-returnifabrupt"}, "https://webidl.spec.whatwg.org/#EnforceRange": {"displayText":"EnforceRange","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"EnforceRange","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#EnforceRange"}, "https://webidl.spec.whatwg.org/#Exposed": {"displayText":"Exposed","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"Exposed","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#Exposed"}, "https://webidl.spec.whatwg.org/#NewObject": {"displayText":"NewObject","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"NewObject","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#NewObject"}, "https://webidl.spec.whatwg.org/#SameObject": {"displayText":"SameObject","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"SameObject","type":"extended-attribute","url":"https://webidl.spec.whatwg.org/#SameObject"}, "https://webidl.spec.whatwg.org/#a-new-promise": {"displayText":"a new promise","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"a new promise","type":"dfn","url":"https://webidl.spec.whatwg.org/#a-new-promise"}, "https://webidl.spec.whatwg.org/#a-promise-rejected-with": {"displayText":"a promise rejected with","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"a promise rejected with","type":"dfn","url":"https://webidl.spec.whatwg.org/#a-promise-rejected-with"}, "https://webidl.spec.whatwg.org/#aborterror": {"displayText":"AbortError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"AbortError","type":"exception","url":"https://webidl.spec.whatwg.org/#aborterror"}, "https://webidl.spec.whatwg.org/#constrainterror": {"displayText":"ConstraintError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"ConstraintError","type":"exception","url":"https://webidl.spec.whatwg.org/#constrainterror"}, "https://webidl.spec.whatwg.org/#datacloneerror": {"displayText":"DataCloneError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"DataCloneError","type":"exception","url":"https://webidl.spec.whatwg.org/#datacloneerror"}, "https://webidl.spec.whatwg.org/#dataerror": {"displayText":"DataError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"DataError","type":"exception","url":"https://webidl.spec.whatwg.org/#dataerror"}, "https://webidl.spec.whatwg.org/#dfn-buffer-source-type": {"displayText":"buffer source types","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"buffer source types","type":"dfn","url":"https://webidl.spec.whatwg.org/#dfn-buffer-source-type"}, "https://webidl.spec.whatwg.org/#dfn-create-exception": {"displayText":"create","export":true,"for_":["exception"],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"create","type":"dfn","url":"https://webidl.spec.whatwg.org/#dfn-create-exception"}, "https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy": {"displayText":"get a copy of the buffer source","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"get a copy of the buffer source","type":"dfn","url":"https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy"}, "https://webidl.spec.whatwg.org/#dfn-throw": {"displayText":"throw","export":true,"for_":["exception"],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"throw","type":"dfn","url":"https://webidl.spec.whatwg.org/#dfn-throw"}, "https://webidl.spec.whatwg.org/#exceptiondef-typeerror": {"displayText":"TypeError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"TypeError","type":"exception","url":"https://webidl.spec.whatwg.org/#exceptiondef-typeerror"}, "https://webidl.spec.whatwg.org/#idl-ArrayBuffer": {"displayText":"ArrayBuffer","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"ArrayBuffer","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-ArrayBuffer"}, "https://webidl.spec.whatwg.org/#idl-DOMException": {"displayText":"DOMException","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"DOMException","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-DOMException"}, "https://webidl.spec.whatwg.org/#idl-DOMString": {"displayText":"DOMString","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"DOMString","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-DOMString"}, "https://webidl.spec.whatwg.org/#idl-Uint8Array": {"displayText":"Uint8Array","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"Uint8Array","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-Uint8Array"}, "https://webidl.spec.whatwg.org/#idl-any": {"displayText":"any","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"any","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-any"}, "https://webidl.spec.whatwg.org/#idl-boolean": {"displayText":"boolean","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"boolean","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-boolean"}, "https://webidl.spec.whatwg.org/#idl-byte": {"displayText":"byte","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"byte","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-byte"}, "https://webidl.spec.whatwg.org/#idl-promise": {"displayText":"Promise","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"Promise","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-promise"}, "https://webidl.spec.whatwg.org/#idl-record": {"displayText":"record","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"record","type":"dfn","url":"https://webidl.spec.whatwg.org/#idl-record"}, "https://webidl.spec.whatwg.org/#idl-sequence": {"displayText":"sequence","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"sequence","type":"dfn","url":"https://webidl.spec.whatwg.org/#idl-sequence"}, "https://webidl.spec.whatwg.org/#idl-short": {"displayText":"short","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"short","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-short"}, "https://webidl.spec.whatwg.org/#idl-undefined": {"displayText":"undefined","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"undefined","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-undefined"}, "https://webidl.spec.whatwg.org/#idl-unrestricted-double": {"displayText":"unrestricted double","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"unrestricted double","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-unrestricted-double"}, "https://webidl.spec.whatwg.org/#idl-unsigned-long": {"displayText":"unsigned long","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"unsigned long","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-unsigned-long"}, "https://webidl.spec.whatwg.org/#idl-unsigned-long-long": {"displayText":"unsigned long long","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"unsigned long long","type":"interface","url":"https://webidl.spec.whatwg.org/#idl-unsigned-long-long"}, "https://webidl.spec.whatwg.org/#invalidaccesserror": {"displayText":"InvalidAccessError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"InvalidAccessError","type":"exception","url":"https://webidl.spec.whatwg.org/#invalidaccesserror"}, "https://webidl.spec.whatwg.org/#invalidstateerror": {"displayText":"InvalidStateError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"InvalidStateError","type":"exception","url":"https://webidl.spec.whatwg.org/#invalidstateerror"}, "https://webidl.spec.whatwg.org/#notfounderror": {"displayText":"NotFoundError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"NotFoundError","type":"exception","url":"https://webidl.spec.whatwg.org/#notfounderror"}, "https://webidl.spec.whatwg.org/#notreadableerror": {"displayText":"NotReadableError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"NotReadableError","type":"exception","url":"https://webidl.spec.whatwg.org/#notreadableerror"}, "https://webidl.spec.whatwg.org/#quotaexceedederror": {"displayText":"QuotaExceededError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"QuotaExceededError","type":"exception","url":"https://webidl.spec.whatwg.org/#quotaexceedederror"}, "https://webidl.spec.whatwg.org/#readonlyerror": {"displayText":"ReadOnlyError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"ReadOnlyError","type":"exception","url":"https://webidl.spec.whatwg.org/#readonlyerror"}, "https://webidl.spec.whatwg.org/#reject": {"displayText":"reject","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"reject","type":"dfn","url":"https://webidl.spec.whatwg.org/#reject"}, "https://webidl.spec.whatwg.org/#resolve": {"displayText":"resolve","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"resolve","type":"dfn","url":"https://webidl.spec.whatwg.org/#resolve"}, "https://webidl.spec.whatwg.org/#securityerror": {"displayText":"SecurityError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"SecurityError","type":"exception","url":"https://webidl.spec.whatwg.org/#securityerror"}, "https://webidl.spec.whatwg.org/#syntaxerror": {"displayText":"SyntaxError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"SyntaxError","type":"exception","url":"https://webidl.spec.whatwg.org/#syntaxerror"}, "https://webidl.spec.whatwg.org/#the-given-value": {"displayText":"the given value","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"the given value","type":"dfn","url":"https://webidl.spec.whatwg.org/#the-given-value"}, "https://webidl.spec.whatwg.org/#this": {"displayText":"this","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"this","type":"dfn","url":"https://webidl.spec.whatwg.org/#this"}, "https://webidl.spec.whatwg.org/#transactioninactiveerror": {"displayText":"TransactionInactiveError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"TransactionInactiveError","type":"exception","url":"https://webidl.spec.whatwg.org/#transactioninactiveerror"}, "https://webidl.spec.whatwg.org/#unknownerror": {"displayText":"UnknownError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"UnknownError","type":"exception","url":"https://webidl.spec.whatwg.org/#unknownerror"}, "https://webidl.spec.whatwg.org/#versionerror": {"displayText":"VersionError","export":true,"for_":[],"level":"1","normative":true,"shortname":"webidl","spec":"webidl","status":"current","text":"VersionError","type":"exception","url":"https://webidl.spec.whatwg.org/#versionerror"}, "https://www.w3.org/TR/FileAPI/#dfn-Blob": {"displayText":"Blob","export":true,"for_":[],"level":"1","normative":true,"shortname":"fileapi","spec":"fileapi","status":"snapshot","text":"Blob","type":"interface","url":"https://www.w3.org/TR/FileAPI/#dfn-Blob"}, "https://www.w3.org/TR/FileAPI/#dfn-file": {"displayText":"File","export":true,"for_":[],"level":"1","normative":true,"shortname":"fileapi","spec":"fileapi","status":"snapshot","text":"File","type":"interface","url":"https://www.w3.org/TR/FileAPI/#dfn-file"}, "https://www.w3.org/TR/FileAPI/#dfn-lastModified": {"displayText":"lastModified","export":true,"for_":["File"],"level":"1","normative":true,"shortname":"fileapi","spec":"fileapi","status":"snapshot","text":"lastModified","type":"attribute","url":"https://www.w3.org/TR/FileAPI/#dfn-lastModified"}, "https://www.w3.org/TR/FileAPI/#dfn-name": {"displayText":"name","export":true,"for_":["File"],"level":"1","normative":true,"shortname":"fileapi","spec":"fileapi","status":"snapshot","text":"name","type":"attribute","url":"https://www.w3.org/TR/FileAPI/#dfn-name"}, "https://www.w3.org/TR/FileAPI/#dfn-size": {"displayText":"size","export":true,"for_":["Blob"],"level":"1","normative":true,"shortname":"fileapi","spec":"fileapi","status":"snapshot","text":"size","type":"attribute","url":"https://www.w3.org/TR/FileAPI/#dfn-size"}, "https://www.w3.org/TR/FileAPI/#dfn-type": {"displayText":"type","export":true,"for_":["Blob"],"level":"1","normative":true,"shortname":"fileapi","spec":"fileapi","status":"snapshot","text":"type","type":"attribute","url":"https://www.w3.org/TR/FileAPI/#dfn-type"}, }; function mkRefHint(link, ref) { const linkText = link.textContent; let dfnTextElements = ''; if (ref.displayText.toLowerCase() != linkText.toLowerCase()) { // Give the original term if it's being displayed in a different way. // But allow casing differences, they're insignificant. dfnTextElements = mk.li({}, mk.b({}, "Term: "), mk.span({}, ref.displayText) ); } const forList = ref.for_; let forListElements; if(forList.length == 0) { forListElements = []; } else if(forList.length == 1) { forListElements = mk.li({}, mk.b({}, "For: "), mk.span({}, forList[0]), ); } else { forListElements = mk.li({}, mk.b({}, "For: "), mk.ul({}, ...forList.map(forItem => mk.li({}, mk.span({}, forItem) ), ), ), ); } const url = ref.url; const safeUrl = encodeURIComponent(url); const hintPanel = mk.aside({ class: "ref-hint", id: `ref-hint-for-${safeUrl}`, "data-for": url, "aria-labelled-by": `ref-hint-for-${safeUrl}`, }, mk.ul({}, dfnTextElements, mk.li({}, mk.b({}, "URL: "), mk.a({ href: url, class: "ref" }, url), ), mk.li({}, mk.b({}, "Type: "), mk.span({}, `${ref.type}`), ), mk.li({}, mk.b({}, "Spec: "), mk.span({}, `${ref.spec ? ref.spec : ''}`), ), forListElements ), ); hintPanel.forLink = link; setupRefHintEventListeners(link, hintPanel); return hintPanel; } function hideAllRefHints() { queryAll(".ref-hint").forEach(el=>hideRefHint(el)); } function hideRefHint(refHint) { const link = refHint.forLink; link.setAttribute("aria-expanded", "false"); if(refHint.teardownEventListeners) { refHint.teardownEventListeners(); } refHint.remove(); } function showRefHint(link) { if(link.classList.contains("dfn-link")) return; const url = link.getAttribute("href"); const ref = refsData[url]; if(!ref) return; hideAllRefHints(); // Only display one at this time. const refHint = mkRefHint(link, ref); append(document.body, refHint); link.setAttribute("aria-expanded", "true"); positionRefHint(refHint); } function setupRefHintEventListeners(link, refHint) { if (refHint.teardownEventListeners) return; // Add event handlers to hide the refHint after the user moves away // from both the link and refHint, if not hovering either within one second. let timeout = null; const startHidingRefHint = (event) => { if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { hideRefHint(refHint); }, 1000); } const resetHidingRefHint = (event) => { if (timeout) clearTimeout(timeout); timeout = null; }; link.addEventListener("mouseleave", startHidingRefHint); link.addEventListener("mouseenter", resetHidingRefHint); link.addEventListener("blur", startHidingRefHint); link.addEventListener("focus", resetHidingRefHint); refHint.addEventListener("mouseleave", startHidingRefHint); refHint.addEventListener("mouseenter", resetHidingRefHint); refHint.addEventListener("blur", startHidingRefHint); refHint.addEventListener("focus", resetHidingRefHint); refHint.teardownEventListeners = () => { // remove event listeners resetHidingRefHint(); link.removeEventListener("mouseleave", startHidingRefHint); link.removeEventListener("mouseenter", resetHidingRefHint); link.removeEventListener("blur", startHidingRefHint); link.removeEventListener("focus", resetHidingRefHint); refHint.removeEventListener("mouseleave", startHidingRefHint); refHint.removeEventListener("mouseenter", resetHidingRefHint); refHint.removeEventListener("blur", startHidingRefHint); refHint.removeEventListener("focus", resetHidingRefHint); }; } function positionRefHint(refHint) { const link = refHint.forLink; const linkPos = getBounds(link); refHint.style.top = linkPos.bottom + "px"; refHint.style.left = linkPos.left + "px"; const panelPos = refHint.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, linkPos.left - overflowAmount); refHint.style.left = newLeft + "px"; } } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function showRefHintListener(e) { // If the target isn't in a link (or is a link), // just ignore it. let link = e.target.closest("a"); if(!link) return; // If the target is in a ref-hint panel // (aka a link in the already-open one), // also just ignore it. if(link.closest(".ref-hint")) return; // Otherwise, show the panel for the link. showRefHint(link); } function hideAllHintsListener(e) { // If the click is inside a ref-hint panel, ignore it. if(e.target.closest(".ref-hint")) return; // Otherwise, close all the current panels. hideAllRefHints(); } document.addEventListener("DOMContentLoaded", () => { document.body.addEventListener("mousedown", showRefHintListener); document.body.addEventListener("focus", showRefHintListener); document.body.addEventListener("click", hideAllHintsListener); }); window.addEventListener("resize", () => { // Hide any open ref hint. hideAllRefHints(); }); } </script> <script>/* Boilerplate: script-var-click-highlighting */ "use strict"; { /* Color-choosing design: * Colors are ordered by goodness. * On clicking a var, give it the earliest color with the lowest usage in the algorithm. * On re-clicking, re-use the var's most recent color if that's not currently being used elsewhere. */ const COLOR_COUNT = 7; document.addEventListener("click", e=>{ if(e.target.nodeName == "VAR") { highlightSameAlgoVars(e.target); } }); function highlightSameAlgoVars(v) { // Find the algorithm container. let algoContainer = findAlgoContainer(v); // Not highlighting document-global vars, // too likely to be unrelated. if(algoContainer == null) return; const varName = nameFromVar(v); if(!v.hasAttribute("data-var-color")) { const newColor = chooseHighlightColor(algoContainer, v); for(const el of algoContainer.querySelectorAll("var")) { if(nameFromVar(el) == varName) { el.setAttribute("data-var-color", newColor); el.setAttribute("data-var-last-color", newColor); } } } else { for(const el of algoContainer.querySelectorAll("var")) { if(nameFromVar(el) == varName) { el.removeAttribute("data-var-color"); } } } } function findAlgoContainer(el) { while(el != document.body) { if(el.hasAttribute("data-algorithm")) return el; el = el.parentNode; } return null; } function nameFromVar(el) { return el.textContent.replace(/(\s|\xa0)+/g, " ").trim(); } function colorCountsFromContainer(container) { const namesFromColor = Array.from({length:COLOR_COUNT}, x=>new Set()); for(let v of container.querySelectorAll("var[data-var-color]")) { let color = +v.getAttribute("data-var-color"); namesFromColor[color].add(nameFromVar(v)); } return namesFromColor.map(x=>x.size); } function leastUsedColor(colors) { // Find the earliest color with the lowest count. let minCount = Infinity; let minColor = null; for(var i = 0; i < colors.length; i++) { if(colors[i] < minCount) { minColor = i; minCount = colors[i]; } } return minColor; } function chooseHighlightColor(container, v) { const colorCounts = colorCountsFromContainer(container); if(v.hasAttribute("data-var-last-color")) { let color = +v.getAttribute("data-var-last-color"); if(colorCounts[color] == 0) return color; } return leastUsedColor(colorCounts); } } </script>