Skip to content

Commit d6ac7b4

Browse files
authored
Make position and error nullable. (#77)
I think the intent here matches WebIDL's "nullable" concept, which also happens to line up with Chromium's current behavior (which returns `null` rather than `undefined` if a position hasn't yet been obtained).
1 parent b60a37d commit d6ac7b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

permission-elements.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,8 +1172,8 @@ the <{geolocation}> element report the location once or continously.
11721172
interface HTMLGeolocationElement : HTMLElement {
11731173
[HTMLConstructor] constructor();
11741174

1175-
readonly attribute GeolocationPosition position;
1176-
readonly attribute GeolocationPositionError error;
1175+
readonly attribute GeolocationPosition? position;
1176+
readonly attribute GeolocationPositionError? error;
11771177
[CEReactions, Reflect] attribute boolean autolocate;
11781178
[CEReactions, Reflect] attribute boolean watch;
11791179

@@ -1245,8 +1245,8 @@ The {{HTMLGeolocationElement}} <dfn constructor for=HTMLGeolocationElement>const
12451245
1. Initialize the internal {{[[watchIDs]]}} to &laquo; |watchID| &raquo;, where
12461246
|watchID| is an [=implementation-defined=] {{unsigned long}} that is
12471247
greater than zero.
1248-
1. Initialize the internal {{[[position]]}} to undefined.
1249-
1. Initialize the internal {{[[positionError]]}} to undefined.
1248+
1. Initialize the internal {{[[position]]}} to null.
1249+
1. Initialize the internal {{[[positionError]]}} to null.
12501250

12511251
</div>
12521252

0 commit comments

Comments
 (0)