question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create and configure elements in child-before-parent order

See original GitHub issue

For instance <option> elements for a <select> need to be added before the value attribute for a select is added

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:34 (33 by maintainers)

github_iconTop GitHub Comments

4reactions
amahdycommented, Mar 7, 2018

Oh hey there, my bug was closed so it seems I need to bug this one. Initial impression feels that there will be a lot of complains about this problem. I was told that few people internally ran into this as well.

1reaction
Legiothcommented, May 22, 2018

I realized that we can actually treat creation and initial binding for an element as a special case and in that way fix anything related to ready, attached and connectedCallback with a quite easy fix, which is in https://github.com/vaadin/flow/pull/4146.

This means that for a newly created element, the ordering will always be:

  1. Add $server and @EventHandler stubs
  2. Add DOM listeners that do RPC to the server
  3. Attach children, virtual children and any server-provided shadow root
  4. Set inline styles and class names
  5. Set attributes and properties
  6. Attach the element to its parent

Incremental updates to an existing element will still happen in an arbitrary order.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can the :before and :after pseudo-elements inherit height from ...
No. The only way that pseudo-elements can inherit values from the parent of their generating element is when the generating element itself ...
Read more >
Creating Logical Tab Order with the Tabindex Attribute
The objective of this technique is to provide a logical tab order in cases where the default tab order is not sufficient to...
Read more >
8. Mining and Consensus - Mastering Bitcoin [Book] - O'Reilly
Miners receive two types of rewards for mining: new coins created with each new ... time of each other are received in reverse...
Read more >
Learn Python the Hard Way
a course of instruction that creates working software. ... through the elements of a list in order, but what if you want, say,...
Read more >
Zooming Background Images | CSS-Tricks
In order to achieve optimal performance, I decided to use the CSS transform property ... you can make use of pseudo elements like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found