Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var onChosenFileToOpen = function(theFileEntry) {
- $('.nav-tabs li:nth-child(' + $(".nav-tabs").children().length + ') a').click(); //synchronous function that creates a tab
- var checker=setInterval(()=>{
- if(currentiframe.contentWindow && currentiframe.contentWindow.editor){//waits those 2 conditions to be true
- currentiframe.contentWindow.readFileIntoEditor(theFileEntry)//content is loaded to that tab
- clearInterval(checker)
- }
- },1)};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement