From f837ce19d0540bfba76e038070e006a33d419ba1 Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Mon, 28 Sep 2020 09:27:56 -0700 Subject: [PATCH] Add "precustomized" custom element state For https://github.com/whatwg/html/pull/5909. Tests: https://github.com/web-platform-tests/wpt/pull/25794. Co-authored-by: Anne van Kesteren --- dom.bs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dom.bs b/dom.bs index 95bed6b67..91222a342 100644 --- a/dom.bs +++ b/dom.bs @@ -5875,19 +5875,19 @@ dictionary ShadowRootInit { initialized.

An element's custom element state is one of -"undefined", "failed", "uncustomized", or -"custom". An element whose custom element state is -"uncustomized" or "custom" is said to be -defined. An element whose -custom element state is "custom" is said to be +"undefined", "failed", "uncustomized", +"precustomized", or "custom". An element whose +custom element state is "uncustomized" or "custom" is +said to be defined. An element +whose custom element state is "custom" is said to be custom.

Whether or not an element is defined is used to determine the behavior of the '':defined'' pseudo-class. Whether or not an element is custom is used to determine the behavior of the mutation algorithms. The -"failed" state is used to ensure that if a custom element constructor fails to -execute correctly the first time, it is not executed again by an -upgrade.

+"failed" and "precustomized" states are used to ensure that if a +custom element constructor fails to execute correctly the first time, it is not executed +again by an upgrade.

The following code illustrates elements in each of these four states: