Skip to content

Commit da4f8ce

Browse files
moved FocusOptions to idlSources.json
1 parent 1c8d91b commit da4f8ce

6 files changed

+33
-16
lines changed

baselines/dom.generated.d.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ interface FocusNavigationOrigin {
465465
}
466466

467467
interface FocusOptions {
468-
preventScoll: boolean;
468+
preventScroll?: boolean;
469469
}
470470

471471
interface GainOptions extends AudioNodeOptions {
@@ -5166,6 +5166,12 @@ interface ElementCSSInlineStyle {
51665166
readonly style: CSSStyleDeclaration;
51675167
}
51685168

5169+
interface ElementContentEditable {
5170+
contentEditable: string;
5171+
inputMode: string;
5172+
readonly isContentEditable: boolean;
5173+
}
5174+
51695175
interface ElementCreationOptions {
51705176
is?: string;
51715177
}
@@ -6065,7 +6071,7 @@ declare var HTMLDocument: {
60656071
new(): HTMLDocument;
60666072
};
60676073

6068-
interface HTMLElementEventMap {
6074+
interface HTMLElementEventMap extends ElementEventMap {
60696075
"abort": UIEvent;
60706076
"activate": Event;
60716077
"beforeactivate": Event;
@@ -6135,7 +6141,7 @@ interface HTMLElementEventMap {
61356141
"waiting": Event;
61366142
}
61376143

6138-
interface HTMLElement extends Element, HTMLOrSVGElement, ElementCSSInlineStyle {
6144+
interface HTMLElement extends Element, ElementCSSInlineStyle {
61396145
accessKey: string;
61406146
contentEditable: string;
61416147
readonly dataset: DOMStringMap;

inputfiles/addedTypes.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,18 +2364,6 @@
23642364
}
23652365
}
23662366
},
2367-
"FocusOptions": {
2368-
"name": "FocusOptions",
2369-
"members": {
2370-
"member": {
2371-
"preventScoll": {
2372-
"name": "preventScoll",
2373-
"override-type": "boolean",
2374-
"required": 1
2375-
}
2376-
}
2377-
}
2378-
},
23792367
"EventInit": {
23802368
"name": "EventInit",
23812369
"members": {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"click": "Acts as if the element was clicked.",
3+
"document-hasfocus": "Returns true if key events are being routed through or to the document; otherwise, returns\nfalse. Roughly speaking, this corresponds to the document, or a document nested inside this\none, being focused.",
4+
"window-focus": "Moves the focus to the window's browsing context, if any.",
5+
"focus": "Moves the focus to the element.\nIf the element is a browsing context container, moves the focus to the\nnested browsing context instead.\nBy default, this method also scrolls the element into view. Providing the preventScroll option and setting it to true\nprevents this behavior.",
6+
"blur": "Moves the focus to the viewport. Use of this method is discouraged; if you want\nto focus the viewport, call the focus() method on\nthe Document's document element.\nDo not use this method to hide the focus ring if you find the focus ring unsightly. Instead,\nuse a CSS rule to override the 'outline' property, and provide a different way to\nshow what element is focused. Be aware that if an alternative focusing style isn't made\navailable, the page will be significantly less usable for people who primarily navigate pages\nusing a keyboard, or those with reduced vision who use focus outlines to help them navigate the\npage.\nFor example, to hide the outline from links and instead use a yellow background to indicate\nfocus, you could use:\n:link:focus, :visited:focus { outline: none; background: yellow; color: black; }",
7+
"contenteditable": "Returns \"true\", \"false\", or \"inherit\", based on the state of the contenteditable attribute.\nCan be set, to change that state.\nThrows a \"SyntaxError\" DOMException if the new value\nisn't one of those strings.",
8+
"iscontenteditable": "Returns true if the element is editable; otherwise, returns false.",
9+
"spellcheck": "Returns true if the element is to have its spelling and grammar checked; otherwise, returns\nfalse.\nCan be set, to override the default and set the spellcheck content attribute.",
10+
"autocapitalize": "Returns the current autocapitalization state for the element, or an empty string if it hasn't\nbeen set. Note that for input and textarea elements that inherit their\nstate from a form element, this will return the autocapitalization state of the\nform element, but for an element in an editable region, this will not return the\nautocapitalization state of the editing host (unless this element is, in fact, the editing\nhost).\nCan be set, to set the autocapitalize content\nattribute (and thereby change the autocapitalization behavior for the element)."
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dictionary FocusOptions {
2+
boolean preventScroll = false;
3+
};
4+
5+
interface mixin ElementContentEditable {
6+
[CEReactions] attribute DOMString contentEditable;
7+
readonly attribute boolean isContentEditable;
8+
[CEReactions] attribute DOMString inputMode;
9+
};

inputfiles/idlSources.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@
113113
"url": "https://html.spec.whatwg.org/multipage/webstorage.html",
114114
"title": "HTML - Web storage"
115115
},
116+
{
117+
"url": "https://html.spec.whatwg.org/multipage/interaction.html",
118+
"title": "HTML - User interaction"
119+
},
116120
{
117121
"url": "https://www.w3.org/TR/IndexedDB-2/",
118122
"title": "Indexed Database"

inputfiles/overridingTypes.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,6 @@
898898
}
899899
},
900900
"HTMLElement": {
901-
"extends": "Element, HTMLOrSVGElement",
902901
"methods": {
903902
"method": {
904903
"focus": {

0 commit comments

Comments
 (0)