From cb7b93e4cb6a3fb329895733b3736fcaeae6f1b7 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Date: Wed, 3 Sep 2025 11:53:03 +0530 Subject: [PATCH 1/3] update deactivate timing --- index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index f9deccf..ec6150e 100644 --- a/index.html +++ b/index.html @@ -696,10 +696,16 @@

Extensions to the HTMLElement interface

  1. If |editContext|'s associated element is equal to [=this=], then terminate these steps.
  2. If |editContext|'s associated element is not null, then [=exception/throw=] a {{"NotSupportedError"}} {{DOMException}}.
  3. -
  4. Set |editContext|'s associated element to [=this=].
  • Let |oldEditContext| be the value of [=this=]'s internal [[\EditContext]] slot.
  • +
  • + If |oldEditContext| is not null and |oldEditContext| is [=this=]'s + node document's + [=active EditContext=], then run the steps to [=deactivate an EditContext=] + with |oldEditContext|. +
  • +
  • If |editContext| is not null, then set |editContext|'s associated element to [=this=].
  • If |oldEditContext| is not null, then:
    1. [=Assert=]: |oldEditContext|'s associated element is equal to [=this=].
    2. @@ -707,12 +713,6 @@

      Extensions to the HTMLElement interface

  • Set [=this=]'s internal [[\EditContext]] slot to be |editContext|.
  • -
  • - If |oldEditContext| is not null and |oldEditContext| is [=this=]'s - node document's - [=active EditContext=], then run the steps to [=deactivate an EditContext=] - with |oldEditContext|. -
  • From d3043e005c9e667c3155db17b89cf19b35760a97 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Date: Thu, 4 Sep 2025 18:11:38 +0530 Subject: [PATCH 2/3] update steps to handle re-entracy --- index.html | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index ec6150e..79d5c61 100644 --- a/index.html +++ b/index.html @@ -705,13 +705,16 @@

    Extensions to the HTMLElement interface

    [=active EditContext=], then run the steps to [=deactivate an EditContext=] with |oldEditContext|. -
  • If |editContext| is not null, then set |editContext|'s associated element to [=this=]. -
  • If |oldEditContext| is not null, then: -
      -
    1. [=Assert=]: |oldEditContext|'s associated element is equal to [=this=].
    2. -
    3. Set |oldEditContext|'s associated element to null.
    4. -
    +
  • + If |oldEditContext| is not null and |oldEditContext|'s associated element is not equal to [=this=], then + terminate these steps.
  • +
  • + If |editContext| is not null, |editContext|'s associated element is not null and |editContext|'s + associated element is not equal to [=this=], then [=exception/throw=] a {{"NotSupportedError"}} {{DOMException}}. +
  • +
  • If |oldEditContext| is not null, set |oldEditContext|'s associated element to null.
  • +
  • If |editContext| is not null, then set |editContext|'s associated element to [=this=].
  • Set [=this=]'s internal [[\EditContext]] slot to be |editContext|.
  • From 7c9f095e2833a31472e5ab9b7b927755ddf4bb3c Mon Sep 17 00:00:00 2001 From: Ashish Kumar Date: Fri, 5 Sep 2025 10:39:37 +0530 Subject: [PATCH 3/3] address formatting feedback --- index.html | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 79d5c61..a3e11b7 100644 --- a/index.html +++ b/index.html @@ -702,16 +702,17 @@

    Extensions to the HTMLElement interface

  • If |oldEditContext| is not null and |oldEditContext| is [=this=]'s node document's - [=active EditContext=], then run the steps to [=deactivate an EditContext=] - with |oldEditContext|. -
  • -
  • - If |oldEditContext| is not null and |oldEditContext|'s associated element is not equal to [=this=], then - terminate these steps. -
  • -
  • - If |editContext| is not null, |editContext|'s associated element is not null and |editContext|'s - associated element is not equal to [=this=], then [=exception/throw=] a {{"NotSupportedError"}} {{DOMException}}. + [=active EditContext=], then: +
      +
    1. Run the steps to [=deactivate an EditContext=] with |oldEditContext|.
    2. +
    3. + If |oldEditContext|'s associated element is not equal to [=this=], then terminate these steps. +
    4. +
    5. + If |editContext| is not null, |editContext|'s associated element is not null and |editContext|'s + associated element is not equal to [=this=], then [=exception/throw=] a {{"NotSupportedError"}} {{DOMException}}. +
    6. +
  • If |oldEditContext| is not null, set |oldEditContext|'s associated element to null.
  • If |editContext| is not null, then set |editContext|'s associated element to [=this=].