cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Embedder embed function unmount after target element was unmounted

Embedder embed function unmount after target element was unmounted

rodrigo-sheetgo
Explorer | Level 4

Hey community,

 

I'm currently implementing the Embedder folowing along with the documentation. We decided to implement it with the "using JavaScript" method. It's working really fine as the example describes:

 

Dropbox.embed({link:"https://www.dropbox.com/sh/keptcjl08q3wsid/AACui966iXcXPbagCJ2py2L-a?dl=0"}, element

 

But unfortunately as we are using a JS Library for our app, as soon as the component which calls the embed function gets unmounted (and along with it the element which we called in the embed function as well), we start receiving a lot of warnings in console and it doesn't stops:

 

Uncaught Error: iframe does not contain a contentWindow
at dropins.js:1
at n (dropins.js:1)

 

So my question is, and what I've already tried, is to have a function which I could maybe call after my component gets unmounted to fire to embed to stop trying watching this element. Is there something like this already? I tried some methods of the Object like unmount and I don't have any success until now.

 

Thanks!

 

1 Accepted Solution

Accepted Solutions

Re: Embedder embed function unmount after target element was unmounted

Greg-DB
Dropboxer

We've added functionality for removing the Embedder. You can find information on this under the "Removing the Embedder" section in the documentation: https://www.dropbox.com/developers/embedder 

View solution in original post

4 Replies 4

Re: Embedder embed function unmount after target element was unmounted

Greg-DB
Dropboxer

Thanks for the report! We're aware of this issue and are looking into how to solve it. (We may offer a new method for cleaning up the Embedder after unmounting, or possibly handle this automatically, if possible.) I'll follow up here once I have an update on this.

Re: Embedder embed function unmount after target element was unmounted

rodrigo-sheetgo
Explorer | Level 4

Hey Greg,

 

cool! Happy to hear that you are already working on this! I'm looking forward to a solution and I'll keep the eyes here on the thread. Would be happy to be informed as soon as it is solved. Thanks again!

Re: Embedder embed function unmount after target element was unmounted

Greg-DB
Dropboxer

We've added functionality for removing the Embedder. You can find information on this under the "Removing the Embedder" section in the documentation: https://www.dropbox.com/developers/embedder 

View solution in original post

Re: Embedder embed function unmount after target element was unmounted

rodrigo-sheetgo
Explorer | Level 4

Thanks, Greg for letting me know. It worked like a charm.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    rodrigo-sheetgo Explorer | Level 4
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?