mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 19:45:08 +00:00
LibWeb: Make File a Serializable object
This commit is contained in:
parent
44e5c62545
commit
0b64a71603
4 changed files with 74 additions and 5 deletions
|
@ -34,6 +34,7 @@
|
|||
#include <LibWeb/Bindings/Serializable.h>
|
||||
#include <LibWeb/Bindings/Transferable.h>
|
||||
#include <LibWeb/FileAPI/Blob.h>
|
||||
#include <LibWeb/FileAPI/File.h>
|
||||
#include <LibWeb/HTML/MessagePort.h>
|
||||
#include <LibWeb/HTML/StructuredSerialize.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
@ -927,6 +928,8 @@ private:
|
|||
{
|
||||
if (interface_name == "Blob"sv)
|
||||
return FileAPI::Blob::create(realm);
|
||||
if (interface_name == "File"sv)
|
||||
return FileAPI::File::create(realm);
|
||||
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue