mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
feat(script): add CrossOrigin*able
attributes to Window
and Location
's members
This commit is contained in:
parent
863c90acd8
commit
1d970b1351
2 changed files with 19 additions and 16 deletions
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#location
|
// https://html.spec.whatwg.org/multipage/#location
|
||||||
[Exposed=Window, Unforgeable] interface Location {
|
[Exposed=Window, Unforgeable] interface Location {
|
||||||
[Throws] stringifier attribute USVString href;
|
[Throws, CrossOriginWritable]
|
||||||
|
stringifier attribute USVString href;
|
||||||
[Throws] readonly attribute USVString origin;
|
[Throws] readonly attribute USVString origin;
|
||||||
[Throws] attribute USVString protocol;
|
[Throws] attribute USVString protocol;
|
||||||
[Throws] attribute USVString host;
|
[Throws] attribute USVString host;
|
||||||
|
@ -15,7 +16,8 @@
|
||||||
[Throws] attribute USVString hash;
|
[Throws] attribute USVString hash;
|
||||||
|
|
||||||
[Throws] void assign(USVString url);
|
[Throws] void assign(USVString url);
|
||||||
[Throws] void replace(USVString url);
|
[Throws, CrossOriginCallable]
|
||||||
|
void replace(USVString url);
|
||||||
[Throws] void reload();
|
[Throws] void reload();
|
||||||
|
|
||||||
//[SameObject] readonly attribute USVString[] ancestorOrigins;
|
//[SameObject] readonly attribute USVString[] ancestorOrigins;
|
||||||
|
|
|
@ -6,13 +6,14 @@
|
||||||
[Global=Window, Exposed=Window /*, LegacyUnenumerableNamedProperties */]
|
[Global=Window, Exposed=Window /*, LegacyUnenumerableNamedProperties */]
|
||||||
/*sealed*/ interface Window : GlobalScope {
|
/*sealed*/ interface Window : GlobalScope {
|
||||||
// the current browsing context
|
// the current browsing context
|
||||||
[Unforgeable] readonly attribute WindowProxy window;
|
[Unforgeable, CrossOriginReadable] readonly attribute WindowProxy window;
|
||||||
[BinaryName="Self_", Replaceable] readonly attribute WindowProxy self;
|
[BinaryName="Self_", Replaceable, CrossOriginReadable] readonly attribute WindowProxy self;
|
||||||
[Unforgeable] readonly attribute Document document;
|
[Unforgeable] readonly attribute Document document;
|
||||||
|
|
||||||
attribute DOMString name;
|
attribute DOMString name;
|
||||||
|
|
||||||
[PutForwards=href, Unforgeable] readonly attribute Location location;
|
[PutForwards=href, Unforgeable, CrossOriginReadable, CrossOriginWritable]
|
||||||
|
readonly attribute Location location;
|
||||||
readonly attribute History history;
|
readonly attribute History history;
|
||||||
[Pref="dom.customelements.enabled"]
|
[Pref="dom.customelements.enabled"]
|
||||||
readonly attribute CustomElementRegistry customElements;
|
readonly attribute CustomElementRegistry customElements;
|
||||||
|
@ -23,22 +24,22 @@
|
||||||
//[Replaceable] readonly attribute BarProp statusbar;
|
//[Replaceable] readonly attribute BarProp statusbar;
|
||||||
//[Replaceable] readonly attribute BarProp toolbar;
|
//[Replaceable] readonly attribute BarProp toolbar;
|
||||||
attribute DOMString status;
|
attribute DOMString status;
|
||||||
void close();
|
[CrossOriginCallable] void close();
|
||||||
readonly attribute boolean closed;
|
[CrossOriginReadable] readonly attribute boolean closed;
|
||||||
void stop();
|
void stop();
|
||||||
//void focus();
|
//[CrossOriginCallable] void focus();
|
||||||
//void blur();
|
//[CrossOriginCallable] void blur();
|
||||||
|
|
||||||
// other browsing contexts
|
// other browsing contexts
|
||||||
[Replaceable] readonly attribute WindowProxy frames;
|
[Replaceable, CrossOriginReadable] readonly attribute WindowProxy frames;
|
||||||
[Replaceable] readonly attribute unsigned long length;
|
[Replaceable, CrossOriginReadable] readonly attribute unsigned long length;
|
||||||
// Note that this can return null in the case that the browsing context has been discarded.
|
// Note that this can return null in the case that the browsing context has been discarded.
|
||||||
// https://github.com/whatwg/html/issues/2115
|
// https://github.com/whatwg/html/issues/2115
|
||||||
[Unforgeable] readonly attribute WindowProxy? top;
|
[Unforgeable, CrossOriginReadable] readonly attribute WindowProxy? top;
|
||||||
attribute any opener;
|
[CrossOriginReadable] attribute any opener;
|
||||||
// Note that this can return null in the case that the browsing context has been discarded.
|
// Note that this can return null in the case that the browsing context has been discarded.
|
||||||
// https://github.com/whatwg/html/issues/2115
|
// https://github.com/whatwg/html/issues/2115
|
||||||
[Replaceable] readonly attribute WindowProxy? parent;
|
[Replaceable, CrossOriginReadable] readonly attribute WindowProxy? parent;
|
||||||
readonly attribute Element? frameElement;
|
readonly attribute Element? frameElement;
|
||||||
[Throws] WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank",
|
[Throws] WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank",
|
||||||
optional DOMString features = "");
|
optional DOMString features = "");
|
||||||
|
@ -63,9 +64,9 @@
|
||||||
unsigned long requestAnimationFrame(FrameRequestCallback callback);
|
unsigned long requestAnimationFrame(FrameRequestCallback callback);
|
||||||
void cancelAnimationFrame(unsigned long handle);
|
void cancelAnimationFrame(unsigned long handle);
|
||||||
|
|
||||||
[Throws]
|
[Throws, CrossOriginCallable]
|
||||||
void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []);
|
void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []);
|
||||||
[Throws]
|
[Throws, CrossOriginCallable]
|
||||||
void postMessage(any message, optional WindowPostMessageOptions options = {});
|
void postMessage(any message, optional WindowPostMessageOptions options = {});
|
||||||
|
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue