Callback with error if doc is not fully active (#97) · w3c/geolocation@de05002 (original) (raw)

`@@ -544,8 +544,12 @@

`

544

544

` method steps are:

`

545

545

`

`

546

546

`

    `

    547

    ``

    `-

  1. [=Request position=], passing |successCallback|, |errorCallback|,

    `

    548

    ``

    `-

    |options|, and (repeats) false.

    `

    ``

    547

    `` +

  2. If the [=current settings object=]'s [=associated `Document`=] is

    ``

    ``

    548

    `+

    not [=Document/fully active=], [=call back with error=]

    `

    ``

    549

    `+

    |errorCallback| and {{GeolocationPositionError/POSITION_UNAVAILABLE}}.

    `

    ``

    550

    `+

  3. `

    ``

    551

    `+

  4. Otherwise, [=request position=], passing |successCallback|,

    `

    ``

    552

    `+

    |errorCallback|, |options|, and (repeats) false.

    `

    549

    553

    `

  5. `

    550

    554

    ``

  6. Return undefined.
  7. ``

    551

    555

    `

    `

    `@@ -562,6 +566,16 @@

    `

    562

    566

    ` method steps are:

    `

    563

    567

    `

    `

    564

    568

    `

      `

      ``

      569

      `` +

    1. If the [=current settings object=]'s [=associated `Document`=] is

      ``

      ``

      570

      `+

      not [=Document/fully active=]:

      `

      ``

      571

      `+

        `

        ``

        572

        `+

      1. [=Call back with error=] |errorCallback| and

        `

        ``

        573

        `+

        {{GeolocationPositionError/POSITION_UNAVAILABLE}}.

        `

        ``

        574

        `+

      2. `

        ``

        575

        `+

      3. Return an [=implementation-defined=] {{long}}.

        `

        ``

        576

        `+

      4. `

        ``

        577

        `+

      `

      ``

      578

      `+

    2. `

      565

      579

      `

    3. Let |watchId:long| be [=request position=], passing
    4. `

      566

      580

      ` |successCallback|, |errorCallback|, |options|, and (repeats) true.

      `

      567

      581

      `

      `

      `@@ -595,10 +609,6 @@

      `

      595

      609

      ` optionally (and only if |repeats| is true) a |previousId:long|.

      `

      596

      610

      `

      `

      597

      611

      `

        `

        598

        ``

        `` -

      1. If the [=current settings object=]'s [=associated `Document`=] is

        ``

        599

        ``

        `-

        not [=Document/fully active=], return an [=implementation-defined=]

        `

        600

        ``

        `-

        {{long}}.

        `

        601

        ``

        `-

      2. `

        602

        612

        `

      3. Let |watchTasks:Set| be [=this=]'s
      4. `

        603

        613

        ` {{Geolocation/[[watchTasks]]}}.

        `

        604

        614

        `

        `