Project

General

Profile

Actions

Bug #102550

closed

race condition in value-picker initialization

Added by Benjamin Franzke 12 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Start date:
2023-11-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

(Custom) element children are not guaranteed to be available by the time
the element is added to the DOM — i.e. when the connectedCallback() is
triggered by the browser. That means we can not assume that value-picker
<select> children will always be available.

Note that it worked most of the times, because JavaScript modules are
loaded asynchronously, and thus "most of the times" execute later after
the DOM is rendered, but when the server is really busy, the HTML output
can be rendered very late, so that a connectedCallback is triggered
immediately when an opening tag is written to the DOM — even before the
childrens are attached. (Otherwise the browsers would have to delay the
connectedCallback's until the closing tag is rendered, but that's not
the case — at least not in google chrome.)

Error:


Files

connected-callback-children.png (117 KB) connected-callback-children.png Benjamin Franzke, 2023-11-29 08:17
Actions

Also available in: Atom PDF