Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the ResizeObserver IDL file #9756

Merged
25 changes: 25 additions & 0 deletions interfaces/ResizeObserver.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[Constructor(ResizeObserverCallback callback),
Exposed=Window]
interface ResizeObserver {
void observe(Element target);
void unobserve(Element target);
void disconnect();
};

callback ResizeObserverCallback = void (sequence<ResizeObserverEntry> entries, ResizeObserver observer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sent WICG/resize-observer#56 to fix a missing semicolon here, will add it manually too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added manually for now.


[Constructor(Element target)
]
interface ResizeObserverEntry {
readonly attribute Element target;
readonly attribute DOMRectReadOnly contentRect;
};

[Constructor(Element target)
]
interface ResizeObservation {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a problem here, found existing bug: WICG/resize-observer#46

readonly attribute Element target;
readonly attribute float broadcastWidth;
readonly attribute float broadcastHeight;
boolean isActive();
};