feat: add webUtils module with getPathForFile method (#38776)
* feat: add blinkUtils module with getPathForFile method This is designed to replace the File.path augmentation we currently have in place to allow apps to get the filesystem path for a file that blink has a representation of. File.path is non-standard and messes with certain websites, using a method like this is effectively 0-cost and removes one of the final deviations we have with web standards. * add error * refactor: update per PR feedback * chore: update patches * oops * chore: update patches * chore: update patches * feat: add blinkUtils module with getPathForFile method This is designed to replace the File.path augmentation we currently have in place to allow apps to get the filesystem path for a file that blink has a representation of. File.path is non-standard and messes with certain websites, using a method like this is effectively 0-cost and removes one of the final deviations we have with web standards. * add error * refactor: update per PR feedback * chore: update patches * oops * chore: update patches * chore: update patches * chore: update patches * fix: provide isolate to WebBlob::FromV8Value * chore: add tests * build: fix depshash mismatch on arm64 macOS --------- Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
This commit is contained in:
parent
2c03b8fd6b
commit
d6bb9b40b0
16 changed files with 211 additions and 4 deletions
16
shell/renderer/api/electron_api_web_utils.h
Normal file
16
shell/renderer/api/electron_api_web_utils.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) 2023 Salesforce, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_RENDERER_API_ELECTRON_API_WEB_UTILS_H_
|
||||
#define ELECTRON_SHELL_RENDERER_API_ELECTRON_API_WEB_UTILS_H_
|
||||
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
namespace electron::api::web_utils {
|
||||
|
||||
std::string GetPathForFile(v8::Isolate* isolate, v8::Local<v8::Value> file);
|
||||
|
||||
} // namespace electron::api::web_utils
|
||||
|
||||
#endif // ELECTRON_SHELL_RENDERER_API_ELECTRON_API_WEB_UTILS_H_
|
Loading…
Add table
Add a link
Reference in a new issue