pub struct ResolveValuesParams {
pub values: Vec<String>,
pub node_id: NodeId,
pub property_name: Option<String>,
pub pseudo_type: Option<PseudoType>,
pub pseudo_identifier: Option<String>,
}Expand description
Resolve the specified values in the context of the provided element.
For example, a value of ‘1em’ is evaluated according to the computed
‘font-size’ of the element and a value ‘calc(1px + 2px)’ will be
resolved to ‘3px’.
If the propertyName was specified the values are resolved as if
they were property’s declaration. If a value cannot be parsed according
to the provided property syntax, the value is parsed using combined
syntax as if null propertyName was provided. If the value cannot be
resolved even then, return the provided value without any changes.
resolveValues
Fields§
§values: Vec<String>Substitution functions (var()/env()/attr()) and cascade-dependent keywords (revert/revert-layer) do not work.
node_id: NodeIdId of the node in whose context the expression is evaluated
property_name: Option<String>Only longhands and custom property names are accepted.
pseudo_type: Option<PseudoType>Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.
pseudo_identifier: Option<String>Pseudo element custom ident.
Implementations§
Source§impl ResolveValuesParams
impl ResolveValuesParams
pub fn builder() -> ResolveValuesParamsBuilder
Source§impl ResolveValuesParams
impl ResolveValuesParams
pub const IDENTIFIER: &'static str = "CSS.resolveValues"
Trait Implementations§
Source§impl Clone for ResolveValuesParams
impl Clone for ResolveValuesParams
Source§fn clone(&self) -> ResolveValuesParams
fn clone(&self) -> ResolveValuesParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Command for ResolveValuesParams
impl Command for ResolveValuesParams
Source§impl Debug for ResolveValuesParams
impl Debug for ResolveValuesParams
Source§impl<'de> Deserialize<'de> for ResolveValuesParams
impl<'de> Deserialize<'de> for ResolveValuesParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResolveValuesParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResolveValuesParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Method for ResolveValuesParams
impl Method for ResolveValuesParams
Source§fn identifier(&self) -> Cow<'static, str>
fn identifier(&self) -> Cow<'static, str>
DOM.removeNodeSource§fn domain_name(&self) -> Cow<'static, str>
fn domain_name(&self) -> Cow<'static, str>
DOMSource§fn method_name(&self) -> Cow<'static, str>
fn method_name(&self) -> Cow<'static, str>
removeNodeSource§impl MethodType for ResolveValuesParams
impl MethodType for ResolveValuesParams
Source§impl PartialEq for ResolveValuesParams
impl PartialEq for ResolveValuesParams
Source§impl Serialize for ResolveValuesParams
impl Serialize for ResolveValuesParams
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ResolveValuesParams
Auto Trait Implementations§
impl Freeze for ResolveValuesParams
impl RefUnwindSafe for ResolveValuesParams
impl Send for ResolveValuesParams
impl Sync for ResolveValuesParams
impl Unpin for ResolveValuesParams
impl UnwindSafe for ResolveValuesParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 more