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

Can you support access to get drag file path, it very useful #3

Open
mitheme opened this issue Mar 30, 2022 · 1 comment
Open

Can you support access to get drag file path, it very useful #3

mitheme opened this issue Mar 30, 2022 · 1 comment

Comments

@mitheme
Copy link

mitheme commented Mar 30, 2022

like electron

<div id="main">
  drop file to here
</div>

<script>
  var main = document.getElementById('main');
  main.ondragover = function () {
    return false;
  };
  main.ondragleave = main.ondragend = function () {
    return false;
  };
  main.ondrop = function (e) {
    e.preventDefault();
    var file = e.dataTransfer.files[0];
    console.log('filePath:', file.path);
    return false;
  };
</script>
@mitheme mitheme changed the title Can you support access to drag file path, it very useful Can you support access to get drag file path, it very useful Mar 30, 2022
@ci010
Copy link
Collaborator

ci010 commented May 30, 2022

Will do POC for webview2 via MicrosoftEdge/WebView2Feedback#2313

If you know the related API of webkit(mac) gtk(linux), please let me know.

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

No branches or pull requests

2 participants