mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
LibWeb/CSS: Implement FontFaceSet.onloadingdone
This commit is contained in:
parent
4210586730
commit
e56e09b820
Notes:
sideshowbarker
2024-07-17 08:38:37 +09:00
Author: https://github.com/jamierocks
Commit: e56e09b820
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/85
4 changed files with 16 additions and 1 deletions
|
@ -97,6 +97,18 @@ WebIDL::CallbackType* FontFaceSet::onloading()
|
|||
return event_handler_attribute(HTML::EventNames::loading);
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/css-font-loading/#dom-fontfaceset-onloadingdone
|
||||
void FontFaceSet::set_onloadingdone(WebIDL::CallbackType* event_handler)
|
||||
{
|
||||
set_event_handler_attribute(HTML::EventNames::loadingdone, event_handler);
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/css-font-loading/#dom-fontfaceset-onloadingdone
|
||||
WebIDL::CallbackType* FontFaceSet::onloadingdone()
|
||||
{
|
||||
return event_handler_attribute(HTML::EventNames::loadingdone);
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/css-font-loading/#dom-fontfaceset-load
|
||||
JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Promise>> FontFaceSet::load(String const&, String const&)
|
||||
{
|
||||
|
|
|
@ -33,6 +33,8 @@ public:
|
|||
|
||||
void set_onloading(WebIDL::CallbackType*);
|
||||
WebIDL::CallbackType* onloading();
|
||||
void set_onloadingdone(WebIDL::CallbackType*);
|
||||
WebIDL::CallbackType* onloadingdone();
|
||||
|
||||
JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Promise>> load(String const& font, String const& text);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ interface FontFaceSet : EventTarget {
|
|||
|
||||
// events for when loading state changes
|
||||
attribute EventHandler onloading;
|
||||
[FIXME] attribute EventHandler onloadingdone;
|
||||
attribute EventHandler onloadingdone;
|
||||
[FIXME] attribute EventHandler onloadingerror;
|
||||
|
||||
// check and start loads if appropriate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue