mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
This is an implementation of the `prevent_scroll` feature in the focus transaction system. It allows to control whether focusing an element should prevent scrolling or not. Spec: https://html.spec.whatwg.org/multipage/interaction.html#dom-focusoptions-preventscroll Testing: Existing WPT tests Signed-off-by: abdelrahman1234567 <abdelrahman.hossameldin.awadalla@huawei.com>
25 lines
855 B
Text
25 lines
855 B
Text
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
/*
|
|
* The origin of this IDL file is
|
|
* https://html.spec.whatwg.org/multipage/#htmlorsvgelement
|
|
*
|
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
* liability, trademark and document use rules apply.
|
|
*/
|
|
|
|
dictionary FocusOptions {
|
|
boolean preventScroll = false;
|
|
// boolean focusVisible;
|
|
};
|
|
|
|
interface mixin HTMLOrSVGElement {
|
|
// [SameObject] readonly attribute DOMStringMap dataset;
|
|
attribute DOMString nonce; // intentionally no [CEReactions]
|
|
|
|
[CEReactions] attribute boolean autofocus;
|
|
// [CEReactions] attribute long tabIndex;
|
|
undefined focus(optional FocusOptions options = {});
|
|
// undefined blur();
|
|
};
|