pub fn attribute_script_object(
        &mut self,
        gc_context: MutationContext<'gc, '_>,
    ) -> Option<Object<'gc>> {
        match &mut *self.0.write(gc_context) {
            XmlNodeData::Element {
                attributes_script_object,
                ..
            }
            | XmlNodeData::DocumentRoot {
                attributes_script_object,
                ..
            }
            | XmlNodeData::Text {
                attributes_script_object,
                ..
            } => {
                if attributes_script_object.is_none() {
                    *attributes_script_object =
                        Some(XmlAttributesObject::from_xml_node(gc_context, *self));
                }

                *attributes_script_object
            }
        }
    }
/// Obtain the script object for a given XML tree node's attributes,
/// constructing a new script object if one does not exist.
Obtain the script object for a given XML tree node's attributes,
constructing a new script object if one does not exist.
Obtain the script object for a given XML tree node ' s attributes constructing a new script object if one does not exist .
pub fn attribute_script_object(
        &mut self,
        gc_context: MutationContext<'gc, '_>,
    ) -> Option<Object<'gc>> {
        match &mut *self.0.write(gc_context) {
            XmlNodeData::Element {
                attributes_script_object,
                ..
            }
            | XmlNodeData::DocumentRoot {
                attributes_script_object,
                ..
            }
            | XmlNodeData::Text {
                attributes_script_object,
                ..
            } => {
                if attributes_script_object.is_none() {
                    *attributes_script_object =
                        Some(XmlAttributesObject::from_xml_node(gc_context, *self));
                }
                *attributes_script_object
            }
        }
    }
pub fn attribute_script_object ( & mut self , gc_context : MutationContext < ' gc , ' _ > , ) -> Option < Object < ' gc > > { match & mut * self . 0 . write ( gc_context ) { XmlNodeData :: Element { attributes_script_object , .. } | XmlNodeData :: DocumentRoot { attributes_script_object , .. } | XmlNodeData :: Text { attributes_script_object , .. } => { if attributes_script_object . is_none ( ) { * attributes_script_object = Some ( XmlAttributesObject :: from_xml_node ( gc_context , * self ) ) ; } * attributes_script_object } } }
Obtain the script object for a given XML tree node's attributes,
constructing a new script object if one does not exist.
Obtain the script object for a given XML tree node ' s attributes constructing a new script object if one does not exist .
&mut self
gc_context
MutationContext<'gc, '_>