pub struct HtmlTextAreaElement(/* private fields */);Expand description
A multi-line text editing control (<textarea>).
Chrome equivalent: HTMLTextAreaElement.
Implementations§
Trait Implementations§
Source§impl Clone for HtmlTextAreaElement
impl Clone for HtmlTextAreaElement
Source§fn clone(&self) -> HtmlTextAreaElement
fn clone(&self) -> HtmlTextAreaElement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ContainerNode for HtmlTextAreaElement
impl ContainerNode for HtmlTextAreaElement
Source§fn append(&self, child: impl HasHandle)
fn append(&self, child: impl HasHandle)
Append
child as the last child of this node. Read moreSource§fn child(self, child: impl HasHandle) -> Self
fn child(self, child: impl HasHandle) -> Self
Append a child and return self for chaining (GPUI-style). Read more
Source§fn add_children<I, C>(self, items: I) -> Selfwhere
I: IntoIterator<Item = C>,
C: HasHandle,
fn add_children<I, C>(self, items: I) -> Selfwhere
I: IntoIterator<Item = C>,
C: HasHandle,
Append multiple children at once.
Source§fn insert_before(&self, child: impl HasHandle)
fn insert_before(&self, child: impl HasHandle)
Insert
child before this node in the parent’s child list.Source§fn first_child(&self) -> Option<Handle>
fn first_child(&self) -> Option<Handle>
Get the first child, or
None if empty.Source§fn last_child(&self) -> Option<Handle>
fn last_child(&self) -> Option<Handle>
Get the last child, or
None if empty.Source§impl Debug for HtmlTextAreaElement
impl Debug for HtmlTextAreaElement
Source§impl Element for HtmlTextAreaElement
impl Element for HtmlTextAreaElement
Source§const IS_FOCUSABLE: bool = true
const IS_FOCUSABLE: bool = true
Whether this element is focusable by default.
Source§type Data = TextAreaData
type Data = TextAreaData
Element-specific data type (e.g.,
ButtonData). Use () if none.Source§fn from_handle(handle: Handle) -> Self
fn from_handle(handle: Handle) -> Self
Wrap a raw Handle into this element’s typed handle. Read more
Source§fn tag_name(&self) -> &'static str
fn tag_name(&self) -> &'static str
Get the tag name (runtime — reads from
ElementData). Read moreSource§fn class_name(&self) -> String
fn class_name(&self) -> String
Get the
class attribute.Source§fn set_class_name(&self, class: impl Into<String>)
fn set_class_name(&self, class: impl Into<String>)
Set the
class attribute.Source§fn class_add(&self, name: &str)
fn class_add(&self, name: &str)
Add a CSS class. No-op if already present.
Chrome:
element.classList.add("name").Source§fn class_remove(&self, name: &str)
fn class_remove(&self, name: &str)
Remove a CSS class. No-op if absent.
Chrome:
element.classList.remove("name").Source§fn class_toggle(&self, name: &str) -> bool
fn class_toggle(&self, name: &str) -> bool
Toggle a CSS class. Returns true if now present.
Chrome:
element.classList.toggle("name").Source§fn class_contains(&self, name: &str) -> bool
fn class_contains(&self, name: &str) -> bool
Check if an element has a CSS class.
Chrome:
element.classList.contains("name").Source§impl EventTarget for HtmlTextAreaElement
impl EventTarget for HtmlTextAreaElement
Source§fn on<E: Event>(
&self,
callback: impl FnMut(&E, &EventContext) + 'static,
) -> ListenerId
fn on<E: Event>( &self, callback: impl FnMut(&E, &EventContext) + 'static, ) -> ListenerId
Add a typed event listener. Returns an ID for removal. Read more
Source§fn on_with_options<E: Event>(
&self,
callback: impl FnMut(&E, &EventContext) + 'static,
options: ListenerOptions,
) -> ListenerId
fn on_with_options<E: Event>( &self, callback: impl FnMut(&E, &EventContext) + 'static, options: ListenerOptions, ) -> ListenerId
Add a listener with explicit options. Read more
Source§fn on_capture<E: Event>(
&self,
callback: impl FnMut(&E, &EventContext) + 'static,
) -> ListenerId
fn on_capture<E: Event>( &self, callback: impl FnMut(&E, &EventContext) + 'static, ) -> ListenerId
Add a capture-phase listener. Read more
Source§fn on_once<E: Event>(
&self,
callback: impl FnMut(&E, &EventContext) + 'static,
) -> ListenerId
fn on_once<E: Event>( &self, callback: impl FnMut(&E, &EventContext) + 'static, ) -> ListenerId
Add a one-shot listener that auto-removes after first call.
Source§fn off(&self, id: ListenerId)
fn off(&self, id: ListenerId)
Remove a listener by its ID.
Source§impl FormControlElement for HtmlTextAreaElement
impl FormControlElement for HtmlTextAreaElement
fn set_disabled(&self, disabled: bool)
fn set_name(&self, name: impl Into<String>)
fn set_form_id(&self, form_id: impl Into<String>)
fn set_required(&self, required: bool)
Source§fn check_validity(&self) -> bool
fn check_validity(&self) -> bool
Whether this control’s value satisfies its constraints. Read more
Source§impl HasHandle for HtmlTextAreaElement
impl HasHandle for HtmlTextAreaElement
Source§impl HtmlElement for HtmlTextAreaElement
impl HtmlElement for HtmlTextAreaElement
The
hidden attribute. Elements with hidden should not be rendered.fn set_title(&self, title: impl Into<String>)
fn set_lang(&self, lang: impl Into<String>)
fn set_dir(&self, dir: impl Into<String>)
Source§fn tab_index(&self) -> i32
fn tab_index(&self) -> i32
The
tabindex attribute. Controls focus order.
Returns the element’s default if not explicitly set.fn set_tab_index(&self, index: i32)
fn set_draggable(&self, draggable: bool)
Source§fn spellcheck(&self) -> bool
fn spellcheck(&self) -> bool
The
spellcheck attribute.fn set_spellcheck(&self, spellcheck: bool)
Source§fn collect_presentation_styles(&self)
fn collect_presentation_styles(&self)
Map presentation attributes to a
PropertyDeclarationBlock. Read moreSource§impl Node for HtmlTextAreaElement
impl Node for HtmlTextAreaElement
Source§fn parent(&self) -> Option<Handle>
fn parent(&self) -> Option<Handle>
Get the parent node, or
None if this is the root or detached.Source§fn next_sibling(&self) -> Option<Handle>
fn next_sibling(&self) -> Option<Handle>
Get the next sibling in the parent’s child list.
Source§fn prev_sibling(&self) -> Option<Handle>
fn prev_sibling(&self) -> Option<Handle>
Get the previous sibling in the parent’s child list.
Source§fn detach(&self)
fn detach(&self)
Detach this node from its parent. The node stays alive but is no longer in the tree.
Source§fn node_kind(&self) -> Option<NodeType>
fn node_kind(&self) -> Option<NodeType>
Get the DOM node type (Element, Text, Document, etc.).
Source§fn is_element(&self) -> bool
fn is_element(&self) -> bool
Is this an element node?
Source§fn is_document(&self) -> bool
fn is_document(&self) -> bool
Is this the document root?
Source§fn style(&self) -> StyleAccess
fn style(&self) -> StyleAccess
Per-property style access — like JavaScript’s
element.style.Source§impl TextControlElement for HtmlTextAreaElement
impl TextControlElement for HtmlTextAreaElement
fn set_value(&self, value: impl Into<String>)
Source§fn placeholder(&self) -> String
fn placeholder(&self) -> String
The placeholder text shown when the control is empty.
fn set_placeholder(&self, placeholder: impl Into<String>)
fn set_readonly(&self, readonly: bool)
Source§fn max_length(&self) -> Option<u32>
fn max_length(&self) -> Option<u32>
Maximum number of characters allowed.
fn set_max_length(&self, max: u32)
impl Copy for HtmlTextAreaElement
Auto Trait Implementations§
impl Freeze for HtmlTextAreaElement
impl !RefUnwindSafe for HtmlTextAreaElement
impl Send for HtmlTextAreaElement
impl !Sync for HtmlTextAreaElement
impl Unpin for HtmlTextAreaElement
impl UnsafeUnpin for HtmlTextAreaElement
impl !UnwindSafe for HtmlTextAreaElement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert