Skip to content

Fire toggle events using microtasks #263

@josepharhar

Description

@josepharhar

WebKittens

@annevk

Title of the spec

Fire toggle events using microtasks

URL to the spec

whatwg/html#9775

URL to the spec's repository

https://github.com/whatwg/html

Issue Tracker URL

No response

Explainer URL

whatwg/html#9046

TAG Design Review URL

none

Mozilla standards-positions issue URL

mozilla/standards-positions#901

WebKit Bugzilla URL

No response

Radar URL

No response

Description

The toggle events for the popover attribute and the details element, as well as the close event for dialog elements, currently post a task to the DOM manipulation task source to fire these events asynchronously. This means that the event could fire before or after the next render, which could lead to flaky rendering for one frame. By using microtasks instead, the event will always fire before the next render. This was suggested in this HTML spec issue: whatwg/html#9046

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions