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.

Issue with appending container to body

See original GitHub issue

I think that there is some problem with commit 3cb3cbb098d4b4b545a23646ce2533c816f27ac5 (merged 3 days ago which in case of issue #115 ). This is due to the following error which occures in console when vue-toasted should be append to body.

Image with content of error in console: image

It makes following syntax not working: this.$toasted...

This syntax is still working: Vue.toasted...

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
charles-owencommented, Oct 16, 2019

Add Toasted after the document is initialized. I have a simple Ready function like this:

/**

  • Call a function when the document is ready.
  • @param fn Function to be called on document ready */ Ready.go = function(fn) { if (document.attachEvent ? document.readyState === “complete” : document.readyState !== “loading”){ fn(); } else { document.addEventListener(‘DOMContentLoaded’, fn); } }

And I load Toasted this way: Ready.go(() => { // Toasted tries to add to the document body when it is initialized, // so it has be be loaded after the document is ready. Vue.use(Toasted); }

0reactions
shakee93commented, May 25, 2020

make sure body element is available in the dom.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a temporary container and append all body content to ...
What I am attempting to do with JavaScript (no libraries) is to create a fragment append all the content of the body into...
Read more >
Bug: pac-container append to body [35827219] - Issue Tracker
In other words, the pac-container is appended to BODY, if there was an option to attach pac-container to modal's DIV, this issue would...
Read more >
.append() | jQuery API Documentation
A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at the end of each element in...
Read more >
Using the body Element as a Top Level Container - Is it Safe ...
Why is a wrapper div used? Historically there have been a number of issues with using the body element as a top level...
Read more >
Node.appendChild() - Web APIs - MDN Web Docs
appendChild() returns the newly appended node, or if the child is a ... and append it to the end of the document body...
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