1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 01:45:07 +00:00

LibWeb: Add XMLHttpRequest.readyState and constants

This commit is contained in:
Linus Groh 2020-04-22 19:47:26 +01:00 committed by Andreas Kling
parent 3c9693c6c7
commit 602a36970f
5 changed files with 46 additions and 0 deletions

View file

@ -39,6 +39,12 @@ XMLHttpRequestConstructor::XMLHttpRequestConstructor()
: NativeFunction(*interpreter().global_object().function_prototype())
{
put("length", JS::Value(1));
put("UNSENT", JS::Value((i32)XMLHttpRequest::ReadyState::Unsent));
put("OPENED", JS::Value((i32)XMLHttpRequest::ReadyState::Opened));
put("HEADERS_RECEIVED", JS::Value((i32)XMLHttpRequest::ReadyState::HeadersReceived));
put("LOADING", JS::Value((i32)XMLHttpRequest::ReadyState::Loading));
put("DONE", JS::Value((i32)XMLHttpRequest::ReadyState::Done));
}
XMLHttpRequestConstructor::~XMLHttpRequestConstructor()