@@ -4044,25 +4044,23 @@
Set Window Rect
4044
4044
< ol >
4045
4045
< li > < p > Let < var > widthvar > be the result of
4046
4046
< a > getting a propertya > named "< code > widthcode > "
4047
- from < var > parametersvar > , else let it be < a > < code > null code > a > .
4047
+ from < var > parametersvar > a > .
4048
4048
4049
4049
< li > < p > Let < var > heightvar > be the result of
4050
4050
< a > getting a propertya > named "< code > heightcode > "
4051
- from < var > parametersvar > , else let it be < a > < code > null code > a > .
4051
+ from < var > parametersvar > .
4052
4052
4053
4053
< li > < p > Let < var > xvar > be the result of < a > getting a propertya >
4054
- named "< code > xcode > " from < var > parametersvar > ,
4055
- else let it be < a > < code > nullcode > a > .
4054
+ named "< code > xcode > " from < var > parametersvar > .
4056
4055
4057
4056
< li > < p > Let < var > yvar > be the result of < a > getting a propertya >
4058
- named "< code > ycode > " from < var > parametersvar > ,
4059
- else let it be < a > < code > nullcode > a > .
4057
+ named "< code > ycode > " from < var > parametersvar > .
4060
4058
4061
- < li > < p > If < var > widthvar > or < var > heightvar > is neither < a > < code > null code > a >
4059
+ < li > < p > If < var > widthvar > or < var > heightvar > is neither < a > undefined a >
4062
4060
nor a < a > Numbera > from 0 to 2< sup > 31sup > − 1,
4063
4061
return < a > errora > with < a > error codea > < a > invalid argumenta > .
4064
4062
4065
- < li > < p > If < var > xvar > or < var > yvar > is neither < a > < code > null code > a >
4063
+ < li > < p > If < var > xvar > or < var > yvar > is neither < a > undefined a >
4066
4064
nor a < a > Numbera > from −(2< sup > 31sup > ) to 2< sup > 31sup > − 1,
4067
4065
return < a > errora > with < a > error codea > < a > invalid argumenta > .
4068
4066
@@ -4071,6 +4069,11 @@
Set Window Rect
4071
4069
< var > sessionvar > 's < a > current top-level browsing contexta > for any reason,
4072
4070
return < a > errora > with < a > error codea > < a > unsupported operationa > .
4073
4071
4072
+ < p class ="note "> In case the < a > Set Window Recta > command is
4073
+ partially supported (i.e. some combinations of arguments are
4074
+ supported but not others), the implmentation is expected to continue
4075
+ with the remaining steps.
4076
+
4074
4077
< li > < p > If < var > sessionvar > 's < a > current top-level browsing
4075
4078
contexta > is < a > no longer opena > , return < a > errora >
4076
4079
with < a > error codea > < a > no such windowa > .
@@ -4082,21 +4085,25 @@
Set Window Rect
4082
4085
4083
4086
< li > < p > < a > Restore the windowa > .
4084
4087
4085
- < li > < p > If < var > widthvar > and < var > heightvar > are not < a > < code > nullcode > a > :
4088
+ < li > < p > Let < var > windowvar > be the operating system window containing
4089
+ < var > sessionvar > 's < a > current top-level browsing contexta >
4090
+
4091
+ < li > < p > If the implementation is able to set the dimensions
4092
+ of < var > windowvar > :
4086
4093
4087
4094
< ol >
4088
- < li > < p > Set the width, in < a > CSS pixelsa > ,
4089
- of the operating system window containing
4090
- < var > sessionvar > 's < a > current top-level browsing contexta > ,
4091
- including any < a > browser chromea > and externally drawn window decorations
4095
+ < li > < p > If < var > widthvar > is not < a > undefineda > , set the width,
4096
+ in < a > CSS pixelsa > , of < var > windowvar > , including
4097
+ any < a > browser chromea > and externally drawn window decorations,
4092
4098
to a value that is as close as possible to < var > widthvar > .
4093
4099
4094
- < li > < p > Set the height, in < a > CSS pixelsa > ,
4095
- of the operating system window containing
4096
- < var > sessionvar > 's < a > current top-level browsing contexta > ,
4097
- including any < a > browser chromea > and externally drawn window decorations
4100
+ < li > < p > If < var > heightvar > is not < a > undefineda > , set the height,
4101
+ in < a > CSS pixelsa > , of < var > windowvar > , including
4102
+ any < a > browser chromea > and externally drawn window decorations,
4098
4103
to a value that is as close as possible to < var > heightvar > .
4099
4104
4105
+ ol >
4106
+
4100
4107
< aside class =note >
4101
4108
< p > The specification does not guarantee
4102
4109
that the resulting window size will exactly match that which was requested.
@@ -4116,35 +4123,37 @@
Set Window Rect
4116
4123
of < a > outerHeighta > should be as close as possible
4117
4124
to < var > heightvar > .
4118
4125
aside >
4119
- ol >
4120
4126
4121
- < li > < p > If < var > x var > and < var > y var > are not < a > < code > null code > a > :
4127
+ < li > < p > If the implementation is able to set the position of < var > window var > :
4122
4128
4123
4129
< ol >
4124
- < li > < p > Run the implementation-specific steps to set the position of
4125
- the operating system level window
4126
- containing < var > sessionvar > 's < a > current top-level browsing
4127
- contexta > to the position given by the < var > xvar >
4128
- and < var > yvar > coordinates.
4129
-
4130
- < aside class =note >
4131
- < p > Note that this step is similar to calling the < a > moveTo(x,
4132
- y)a > method on the < a > < code > WindowProxycode > a > object
4133
- associated with < var > sessionvar > 's < a > current top-level browsing
4134
- contexta > , but without the
4135
- < a href =https://developer.mozilla.org/en-US/docs/Web/API/Window/moveTo > security
4136
- restrictionsa > that you
4137
-
4138
- < ol type =a >
4139
- < li > cannot move a window or tab
4140
- that was not created by < code > window.opencode > .
4141
-
4142
- < li > cannot move a window or tab
4143
- when it is in a window with more than one tab.
4144
- ol >
4145
- aside >
4130
+ < li > < p > If < var > xvar > is not < a > undefineda > , run specific
4131
+ steps set the x-coordinate of the left edge of < var > windowvar >
4132
+ to a value that is as close as possible to < var > xvar > .
4133
+
4134
+ < li > < p > If < var > yvar > is not < a > undefineda > , run specific
4135
+ steps set the y-coordinate of the top edge of < var > windowvar > to
4136
+ a value that is as close as possible to < var > yvar > .
4146
4137
ol >
4147
4138
4139
+ < aside class =note >
4140
+ < p > The specification does not guarantee
4141
+ that the resulting window position will match that which was requested.
4142
+
4143
+ < p > This step is similar to calling the < a > moveTo(x,
4144
+ y)a > method on the < a > < code > WindowProxycode > a > object
4145
+ associated with < var > sessionvar > 's < a > current top-level browsing
4146
+ contexta > , but without the
4147
+ < a href =https://developer.mozilla.org/en-US/docs/Web/API/Window/moveTo > security
4148
+ restrictionsa > that you
4149
+
4150
+ < ol type =a >
4151
+ < li > cannot move a window or tab that was not created by < code > window.opencode > .
4152
+
4153
+ < li > cannot move a window or tab when it is in a window with more than one tab.
4154
+ ol >
4155
+ aside >
4156
+
4148
4157
< li > < p > Return < a > successa > with data set to the < a > WindowRect
4149
4158
objecta > for the < var > sessionvar > 's < a > current top-level browsing
4150
4159
contexta > .
0 commit comments