mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
LibWeb: Add the Animatable IDL object
This commit is contained in:
parent
4792dc294b
commit
daaaaec2d0
5 changed files with 84 additions and 0 deletions
29
Userland/Libraries/LibWeb/Animations/Animatable.cpp
Normal file
29
Userland/Libraries/LibWeb/Animations/Animatable.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Animations/Animatable.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::Animations {
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dom-animatable-animate
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Animation>> Animatable::animate(Optional<JS::Handle<JS::Object>> keyframes, Variant<Empty, double, KeyframeAnimationOptions> options)
|
||||
{
|
||||
// FIXME: Implement this
|
||||
(void)keyframes;
|
||||
(void)options;
|
||||
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Element.animate is not implemented"sv };
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dom-animatable-getanimations
|
||||
Vector<JS::NonnullGCPtr<Animation>> Animatable::get_animations(Web::Animations::GetAnimationsOptions options)
|
||||
{
|
||||
// FIXME: Implement this
|
||||
(void)options;
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue