Skip to content

[cssom] styleSheets IDL attribute must exist on DocumentOrShadowRoot, not Document #548

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

Closed
rniwa opened this issue Sep 29, 2016 · 9 comments
Assignees
Labels

Comments

@rniwa
Copy link

rniwa commented Sep 29, 2016

CSS OM spec should directly define styleSheets IDL attribute on DocumentOrShadowRoot interface to match the latest shadow DOM specification.

@rniwa
Copy link
Author

rniwa commented Sep 29, 2016

@hayatoito @annevk

@annevk
Copy link
Member

annevk commented Sep 29, 2016

I suspect it's up to @zcorpan to define this?

@zcorpan zcorpan changed the title styleSheets IDL attribute must exist on DocumentOrShadowRoot, not Document [cssom] styleSheets IDL attribute must exist on DocumentOrShadowRoot, not Document Sep 29, 2016
@zcorpan zcorpan added the cssom-1 Current Work label Sep 29, 2016
@zcorpan zcorpan self-assigned this Sep 29, 2016
@zcorpan
Copy link
Member

zcorpan commented Sep 29, 2016

@rniwa
Copy link
Author

rniwa commented Sep 29, 2016

Yeah those CSS OM view methods are also supposed to be on DocumentOrShadowRoot interface.

@hayatoito
Copy link
Member

hayatoito commented Jan 10, 2017

Shadow DOM spec now defines the following methods on DocumentOrShadowRoot:
https://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin

partial interface DocumentOrShadowRoot {
    Selection?        getSelection();
    Element?          elementFromPoint(double x, double y);
    sequence<Element> elementsFromPoint(double x, double y);
    CaretPosition?    caretPositionFromPoint(double x, double y);
    readonly attribute Element?       activeElement;
    readonly attribute StyleSheetList styleSheets;
};

Out of them, it would be nice that CSS OM would define:

partial interface DocumentOrShadowRoot {
    readonly attribute StyleSheetList styleSheets;
};

CSS OM View should have:

partial interface DocumentOrShadowRoot {
    Element?          elementFromPoint(double x, double y);
    sequence<Element> elementsFromPoint(double x, double y);
    CaretPosition?    caretPositionFromPoint(double x, double y);
};

HTML Standard should have:

partial interface DocumentOrShadowRoot {
    readonly attribute Element?       activeElement;
};

..and Selection API should have:

partial interface DocumentOrShadowRoot {
    Selection?        getSelection();
};

@annevk
Copy link
Member

annevk commented Jan 10, 2017

activeElement should be in the HTML Standard I think.

@hayatoito
Copy link
Member

Thanks. I am sorry for the wrong information. I have updated my comment directly.

@rniwa
Copy link
Author

rniwa commented Oct 25, 2018

@emilio : could you fix this in CSS OM?

@emilio
Copy link
Collaborator

emilio commented Oct 26, 2018

Yes, happy to.

@emilio emilio closed this as completed in 461368d Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants