You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tkinter and askopen file won't work on Mac because it is running on a different thread.
It is also blocked on Windows sometimes by other tasks.
Remove tkinter and use javascript .
Example
functionopenFileDialog(accept,callback){// this function must be called from a user// activation event (ie an onclick event)// Create an input elementvarinputElement=document.createElement("input");// Set its type to fileinputElement.type="file";// Set accept to the file types you want the user to select. // Include both the file extension and the mime typeinputElement.accept=accept;// set onchange event to call callback when user has selected fileinputElement.addEventListener("change",callback)// dispatch a click event to open the file dialoginputElement.dispatchEvent(newMouseEvent("click"));}
The text was updated successfully, but these errors were encountered:
tkinter and askopen file won't work on Mac because it is running on a different thread.
It is also blocked on Windows sometimes by other tasks.
Remove tkinter and use javascript .
Example
The text was updated successfully, but these errors were encountered: