Trait script::dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequest_Binding::XMLHttpRequestMethods
source · pub trait XMLHttpRequestMethods {
Show 25 methods
// Required methods
fn GetOnreadystatechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnreadystatechange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn ReadyState(&self) -> u16;
fn Open(&self, method: ByteString, url: USVString) -> Result<(), Error>;
fn Open_(
&self,
method: ByteString,
url: USVString,
async: bool,
username: Option<USVString>,
password: Option<USVString>,
) -> Result<(), Error>;
fn SetRequestHeader(
&self,
name: ByteString,
value: ByteString,
) -> Result<(), Error>;
fn Timeout(&self) -> u32;
fn SetTimeout(&self, value: u32) -> Result<(), Error>;
fn WithCredentials(&self) -> bool;
fn SetWithCredentials(&self, value: bool) -> Result<(), Error>;
fn Upload(&self) -> Root<Dom<XMLHttpRequestUpload>>;
fn Send(
&self,
data: Option<DocumentOrBlobOrArrayBufferViewOrArrayBufferOrFormDataOrStringOrURLSearchParams>,
_can_gc: CanGc,
) -> Result<(), Error>;
fn Abort(&self, _can_gc: CanGc);
fn ResponseURL(&self) -> USVString;
fn Status(&self) -> u16;
fn StatusText(&self) -> ByteString;
fn GetResponseHeader(&self, name: ByteString) -> Option<ByteString>;
fn GetAllResponseHeaders(&self) -> ByteString;
fn OverrideMimeType(&self, mime: DOMString) -> Result<(), Error>;
fn ResponseType(&self) -> XMLHttpRequestResponseType;
fn SetResponseType(
&self,
value: XMLHttpRequestResponseType,
) -> Result<(), Error>;
fn Response(
&self,
cx: SafeJSContext,
_can_gc: CanGc,
retval: MutableHandleValue<'_>,
);
fn GetResponseText(&self) -> Result<USVString, Error>;
fn GetResponseXML(
&self,
_can_gc: CanGc,
) -> Result<Option<Root<Dom<Document>>>, Error>;
fn Constructor(
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
) -> Result<Root<Dom<XMLHttpRequest>>, Error>;
}
Required Methods§
fn GetOnreadystatechange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnreadystatechange(&self, value: Option<Rc<EventHandlerNonNull>>)
fn ReadyState(&self) -> u16
fn Open(&self, method: ByteString, url: USVString) -> Result<(), Error>
fn Open_( &self, method: ByteString, url: USVString, async: bool, username: Option<USVString>, password: Option<USVString>, ) -> Result<(), Error>
fn SetRequestHeader( &self, name: ByteString, value: ByteString, ) -> Result<(), Error>
fn Timeout(&self) -> u32
fn SetTimeout(&self, value: u32) -> Result<(), Error>
fn WithCredentials(&self) -> bool
fn SetWithCredentials(&self, value: bool) -> Result<(), Error>
fn Upload(&self) -> Root<Dom<XMLHttpRequestUpload>>
fn Send( &self, data: Option<DocumentOrBlobOrArrayBufferViewOrArrayBufferOrFormDataOrStringOrURLSearchParams>, _can_gc: CanGc, ) -> Result<(), Error>
fn Abort(&self, _can_gc: CanGc)
fn ResponseURL(&self) -> USVString
fn Status(&self) -> u16
fn StatusText(&self) -> ByteString
fn GetResponseHeader(&self, name: ByteString) -> Option<ByteString>
fn GetAllResponseHeaders(&self) -> ByteString
fn OverrideMimeType(&self, mime: DOMString) -> Result<(), Error>
fn ResponseType(&self) -> XMLHttpRequestResponseType
fn SetResponseType( &self, value: XMLHttpRequestResponseType, ) -> Result<(), Error>
fn Response( &self, cx: SafeJSContext, _can_gc: CanGc, retval: MutableHandleValue<'_>, )
fn GetResponseText(&self) -> Result<USVString, Error>
fn GetResponseXML( &self, _can_gc: CanGc, ) -> Result<Option<Root<Dom<Document>>>, Error>
fn Constructor( global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Result<Root<Dom<XMLHttpRequest>>, Error>
Object Safety§
This trait is not object safe.