Trait TextControlElement
Source pub(crate) trait TextControlElement {
Show 30 methods
// Required methods
fn as_element(&self) -> ∈
fn text_input<'a>(&'a self) -> Ref<'a, TextInput<EmbedderClipboardProvider>>;
fn text_input_mut<'a>(
&'a self,
) -> RefMut<'a, TextInput<EmbedderClipboardProvider>>;
fn selection_api_applies(&self) -> bool;
fn has_selectable_text(&self) -> bool;
fn has_uncollapsed_selection(&self) -> bool;
fn set_dirty_value_flag(&self, value: bool);
fn select_all(&self);
fn maybe_update_shared_selection(&self);
fn placeholder_text<'a>(&'a self) -> Ref<'a, DOMString>;
fn value_text(&self) -> DOMString;
fn read_only_or_disabled(&self) -> bool;
fn handle_text_content_changed(&self, cx: &mut JSContext);
// Provided methods
fn is_password_field(&self) -> bool { ... }
fn insert_content(&self, cx: &mut JSContext, text_content: &str) { ... }
fn remove_the_contents_of_the_selection(&self, cx: &mut JSContext) { ... }
fn queue_input_event(
&self,
data: Option<String>,
is_composing: IsComposing,
input_type: InputEventType,
) { ... }
fn dom_select(&self) { ... }
fn dom_start(&self) -> Option<Utf16CodeUnits> { ... }
fn set_dom_start(&self, start: Option<Utf16CodeUnits>) -> ErrorResult { ... }
fn dom_end(&self) -> Option<Utf16CodeUnits> { ... }
fn set_dom_end(&self, end: Option<Utf16CodeUnits>) -> ErrorResult { ... }
fn dom_direction(&self) -> Option<DOMString> { ... }
fn set_dom_direction(&self, direction: Option<DOMString>) -> ErrorResult { ... }
fn set_dom_range(
&self,
start: Utf16CodeUnits,
end: Utf16CodeUnits,
direction: Option<DOMString>,
) -> ErrorResult { ... }
fn set_dom_range_text(
&self,
replacement: DOMString,
start: Option<Utf16CodeUnits>,
end: Option<Utf16CodeUnits>,
selection_mode: SelectionMode,
) -> ErrorResult { ... }
fn start(&self) -> Utf16CodeUnits { ... }
fn end(&self) -> Utf16CodeUnits { ... }
fn direction(&self) -> SelectionDirection { ... }
fn set_range(
&self,
start: Option<Utf16CodeUnits>,
end: Option<Utf16CodeUnits>,
direction: Option<SelectionDirection>,
original_selection_state: Option<SelectionState>,
) { ... }
}