pub(crate) enum EditingContext {
TextControl(TextControlElementEditingContext),
Document(DomRoot<Document>),
}Variants§
TextControl(TextControlElementEditingContext)
Document(DomRoot<Document>)
Implementations§
Source§impl EditingContext
impl EditingContext
pub(crate) fn event_target(&self) -> DomRoot<EventTarget>
pub(crate) fn selection_content(&self, cx: &mut JSContext) -> Option<String>
pub(crate) fn has_uncollapsed_selection(&self) -> bool
pub(crate) fn has_selectable_text(&self) -> bool
pub(crate) fn has_selection_or_cursor(&self) -> bool
pub(crate) fn cutting_and_pasting_enabled(&self) -> bool
pub(crate) fn remove_the_contents_of_the_selection(&self, cx: &mut JSContext)
pub(crate) fn fire_cut_events(&self)
pub(crate) fn insert_content(&self, cx: &mut JSContext, text_content: &str)
pub(crate) fn fire_paste_events(&self, text_content: &str)
pub(crate) fn select_all(&self, cx: &mut JSContext)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EditingContext
impl !RefUnwindSafe for EditingContext
impl !Send for EditingContext
impl !Sync for EditingContext
impl Unpin for EditingContext
impl UnsafeUnpin for EditingContext
impl !UnwindSafe for EditingContext
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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