pub fn introduce_script_object(
        &mut self,
        gc_context: MutationContext<'gc, '_>,
        new_object: Object<'gc>,
    ) {
        assert!(self.get_script_object().is_none(), "An attempt was made to change the already-established link between script object and XML node. This has been denied and is likely a bug.");

        match &mut *self.0.write(gc_context) {
            XmlNodeData::DocumentRoot { script_object, .. }
            | XmlNodeData::Element { script_object, .. }
            | XmlNodeData::Text { script_object, .. } => *script_object = Some(new_object),
        }
    }
/// Introduce this node to a new script object.
///
/// This internal function *will* overwrite already extant objects, so only
/// call this if you need to instantiate the script object for the first
/// time. Attempting to call it a second time will panic.
Introduce this node to a new script object.
This internal function *will* overwrite already extant objects, so only
call this if you need to instantiate the script object for the first
time. Attempting to call it a second time will panic.
Introduce this node to a new script object . This internal function * will * overwrite already extant objects so only call this if you need to instantiate the script object for the first time . Attempting to call it a second time will panic .
pub fn introduce_script_object(
        &mut self,
        gc_context: MutationContext<'gc, '_>,
        new_object: Object<'gc>,
    ) {
        assert!(self.get_script_object().is_none(), "An attempt was made to change the already-established link between script object and XML node. This has been denied and is likely a bug.");
        match &mut *self.0.write(gc_context) {
            XmlNodeData::DocumentRoot { script_object, .. }
            | XmlNodeData::Element { script_object, .. }
            | XmlNodeData::Text { script_object, .. } => *script_object = Some(new_object),
        }
    }
pub fn introduce_script_object ( & mut self , gc_context : MutationContext < ' gc , ' _ > , new_object : Object < ' gc > , ) { assert ! ( self get_script_object ( ) is_none ( ) " " ) ; match & mut * self . 0 . write ( gc_context ) { XmlNodeData :: DocumentRoot { script_object , .. } | XmlNodeData :: Element { script_object , .. } | XmlNodeData :: Text { script_object , .. } => * script_object = Some ( new_object ) , } }
Introduce this node to a new script object.
Introduce this node to a new script object .
&mut self
gc_context
MutationContext<'gc, '_>
new_object
Object<'gc>