1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:27:35 +00:00

LibWeb: Add the missing ProgressEvent IDL constructor

This commit is contained in:
Idan Horowitz 2021-10-01 18:55:24 +03:00 committed by Andreas Kling
parent 1e8ba0d9d3
commit 4d71f22673
4 changed files with 32 additions and 9 deletions

View file

@ -45,7 +45,11 @@ void XMLHttpRequest::set_ready_state(ReadyState ready_state)
void XMLHttpRequest::fire_progress_event(const String& event_name, u64 transmitted, u64 length)
{
dispatch_event(ProgressEvent::create(event_name, transmitted, length));
ProgressEventInit event_init {};
event_init.length_computable = true;
event_init.loaded = transmitted;
event_init.total = length;
dispatch_event(ProgressEvent::create(event_name, event_init));
}
String XMLHttpRequest::response_text() const