edit-context.idl (3336B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: EditContext API (https://w3c.github.io/edit-context/) 5 6 partial interface HTMLElement { 7 attribute EditContext? editContext; 8 }; 9 10 dictionary EditContextInit { 11 DOMString text; 12 unsigned long selectionStart; 13 unsigned long selectionEnd; 14 }; 15 16 [Exposed=Window] 17 interface EditContext : EventTarget { 18 constructor(optional EditContextInit options = {}); 19 20 undefined updateText(unsigned long rangeStart, unsigned long rangeEnd, 21 DOMString text); 22 undefined updateSelection(unsigned long start, unsigned long end); 23 undefined updateControlBounds(DOMRect controlBounds); 24 undefined updateSelectionBounds(DOMRect selectionBounds); 25 undefined updateCharacterBounds(unsigned long rangeStart, sequence<DOMRect> characterBounds); 26 27 sequence<HTMLElement> attachedElements(); 28 29 readonly attribute DOMString text; 30 readonly attribute unsigned long selectionStart; 31 readonly attribute unsigned long selectionEnd; 32 readonly attribute unsigned long characterBoundsRangeStart; 33 sequence<DOMRect> characterBounds(); 34 35 attribute EventHandler ontextupdate; 36 attribute EventHandler ontextformatupdate; 37 attribute EventHandler oncharacterboundsupdate; 38 attribute EventHandler oncompositionstart; 39 attribute EventHandler oncompositionend; 40 }; 41 42 dictionary TextUpdateEventInit : EventInit { 43 unsigned long updateRangeStart; 44 unsigned long updateRangeEnd; 45 DOMString text; 46 unsigned long selectionStart; 47 unsigned long selectionEnd; 48 unsigned long compositionStart; 49 unsigned long compositionEnd; 50 }; 51 52 [Exposed=Window] 53 interface TextUpdateEvent : Event { 54 constructor(DOMString type, optional TextUpdateEventInit options = {}); 55 readonly attribute unsigned long updateRangeStart; 56 readonly attribute unsigned long updateRangeEnd; 57 readonly attribute DOMString text; 58 readonly attribute unsigned long selectionStart; 59 readonly attribute unsigned long selectionEnd; 60 }; 61 62 enum UnderlineStyle { "none", "solid", "dotted", "dashed", "wavy" }; 63 enum UnderlineThickness { "none", "thin", "thick" }; 64 65 dictionary TextFormatInit { 66 unsigned long rangeStart; 67 unsigned long rangeEnd; 68 UnderlineStyle underlineStyle; 69 UnderlineThickness underlineThickness; 70 }; 71 72 [Exposed=Window] 73 interface TextFormat { 74 constructor(optional TextFormatInit options = {}); 75 readonly attribute unsigned long rangeStart; 76 readonly attribute unsigned long rangeEnd; 77 readonly attribute UnderlineStyle underlineStyle; 78 readonly attribute UnderlineThickness underlineThickness; 79 }; 80 81 dictionary TextFormatUpdateEventInit : EventInit { 82 sequence<TextFormat> textFormats; 83 }; 84 85 [Exposed=Window] 86 interface TextFormatUpdateEvent : Event { 87 constructor(DOMString type, optional TextFormatUpdateEventInit options = {}); 88 sequence<TextFormat> getTextFormats(); 89 }; 90 91 dictionary CharacterBoundsUpdateEventInit : EventInit { 92 unsigned long rangeStart; 93 unsigned long rangeEnd; 94 }; 95 96 [Exposed=Window] 97 interface CharacterBoundsUpdateEvent : Event { 98 constructor(DOMString type, optional CharacterBoundsUpdateEventInit options = {}); 99 readonly attribute unsigned long rangeStart; 100 readonly attribute unsigned long rangeEnd; 101 };