Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element Ready #39

Merged
merged 1 commit into from
May 12, 2022
Merged

Element Ready #39

merged 1 commit into from
May 12, 2022

Conversation

bvoelker
Copy link
Collaborator

@bvoelker bvoelker commented May 5, 2022

Solving the issue of the element not ready yet for when people have the script in the header

@bvoelker bvoelker changed the base branch from master to develop May 5, 2022 16:31
@bvoelker bvoelker requested a review from beeker1121 May 5, 2022 16:31
newChild.id = 'latediv'
setTimeout(() => {
main.appendChild(newChild)
}, 100)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with 10000ms delay and got the following error on the console:

index.ts?144e:87 Uncaught Error: Could not find container
    at eval (index.ts?144e:87:1)
    at eval (index.ts?144e:186:1)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats a good catch. But its intentional. It will stop attempting to look for the container after 10,000ms. Otherwise it would just keep looking. I figured if tokenizer is still looking for a container after 10,000ms the container doesnt exist.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, that make sense, thanks for the answer!

@bvoelker bvoelker merged commit 7ed408c into develop May 12, 2022
@bvoelker bvoelker deleted the feature/dom_ready branch May 12, 2022 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants