File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Userland/Libraries/LibWeb/DOM Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1661,10 +1661,9 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Event>> Document::create_event(StringView i
1661
1661
// NOTE: These are done in the if-chain above
1662
1662
// 5. Let event be the result of creating an event given constructor.
1663
1663
// 6. Initialize event’s type attribute to the empty string.
1664
+ // 7. Initialize event’s timeStamp attribute to the result of calling current high resolution time with this’s relevant global object.
1664
1665
// NOTE: This is handled by each constructor.
1665
1666
1666
- // FIXME: 7. Initialize event’s timeStamp attribute to the result of calling current high resolution time with this’s relevant global object.
1667
-
1668
1667
// 8. Initialize event’s isTrusted attribute to false.
1669
1668
event->set_is_trusted (false );
1670
1669
Original file line number Diff line number Diff line change 11
11
#include < LibWeb/DOM/Event.h>
12
12
#include < LibWeb/DOM/Node.h>
13
13
#include < LibWeb/DOM/ShadowRoot.h>
14
+ #include < LibWeb/HighResolutionTime/TimeOrigin.h>
14
15
15
16
namespace Web ::DOM {
16
17
@@ -26,20 +27,24 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Event>> Event::construct_impl(JS::Realm& re
26
27
return create (realm, event_name, event_init);
27
28
}
28
29
30
+ // https://dom.spec.whatwg.org/#inner-event-creation-steps
29
31
Event::Event (JS::Realm& realm, FlyString const & type)
30
32
: PlatformObject(realm)
31
33
, m_type(type)
32
34
, m_initialized(true )
35
+ , m_time_stamp(HighResolutionTime::current_high_resolution_time(HTML::relevant_global_object(*this )))
33
36
{
34
37
}
35
38
39
+ // https://dom.spec.whatwg.org/#inner-event-creation-steps
36
40
Event::Event (JS::Realm& realm, FlyString const & type, EventInit const & event_init)
37
41
: PlatformObject(realm)
38
42
, m_type(type)
39
43
, m_bubbles(event_init.bubbles)
40
44
, m_cancelable(event_init.cancelable)
41
45
, m_composed(event_init.composed)
42
46
, m_initialized(true )
47
+ , m_time_stamp(HighResolutionTime::current_high_resolution_time(HTML::relevant_global_object(*this )))
43
48
{
44
49
}
45
50
You can’t perform that action at this time.
0 commit comments