- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
启用后 chrome://flags/#native-file-system-api
在我的 chrome 83.0.4103.61 中,我尝试使用这个新 API 访问文件夹
handle = await window.chooseFileSystemEntries({type: 'open-directory'})
最佳答案
他们在 a source file 中对其进行了硬编码.
一旦他们重命名文件(已经发生了几次),这个链接就会腐烂,所以这篇文章的相关内容是:
const struct {
// base::BasePathKey value (or one of the platform specific extensions to it)
// for a path that should be blocked. Specify kNoBasePathKey if |path| should
// be used instead.
int base_path_key;
// Explicit path to block instead of using |base_path_key|. Set to nullptr to
// use |base_path_key| on its own. If both |base_path_key| and |path| are set,
// |path| is treated relative to the path |base_path_key| resolves to.
const base::FilePath::CharType* path;
// If this is set to kDontBlockChildren, only the given path and its parents
// are blocked. If this is set to kBlockAllChildren, all children of the given
// path are blocked as well. Finally if this is set to kBlockNestedDirectories
// access is allowed to individual files in the directory, but nested
// directories are still blocked.
// The BlockType of the nearest ancestor of a path to check is what ultimately
// determines if a path is blocked or not. If a blocked path is a descendent
// of another blocked path, then it may override the child-blocking policy of
// its ancestor. For example, if /home blocks all children, but
// /home/downloads does not, then /home/downloads/file.ext will *not* be
// blocked.
BlockType type;
} kBlockedPaths[] = {
// Don't allow users to share their entire home directory, entire desktop or
// entire documents folder, but do allow sharing anything inside those
// directories not otherwise blocked.
{base::DIR_HOME, nullptr, kDontBlockChildren},
{base::DIR_USER_DESKTOP, nullptr, kDontBlockChildren},
{chrome::DIR_USER_DOCUMENTS, nullptr, kDontBlockChildren},
// Similar restrictions for the downloads directory.
{chrome::DIR_DEFAULT_DOWNLOADS, nullptr, kDontBlockChildren},
{chrome::DIR_DEFAULT_DOWNLOADS_SAFE, nullptr, kDontBlockChildren},
// The Chrome installation itself should not be modified by the web.
{chrome::DIR_APP, nullptr, kBlockAllChildren},
// And neither should the configuration of at least the currently running
// Chrome instance (note that this does not take --user-data-dir command
// line overrides into account).
{chrome::DIR_USER_DATA, nullptr, kBlockAllChildren},
// ~/.ssh is pretty sensitive on all platforms, so block access to that.
{base::DIR_HOME, FILE_PATH_LITERAL(".ssh"), kBlockAllChildren},
// And limit access to ~/.gnupg as well.
{base::DIR_HOME, FILE_PATH_LITERAL(".gnupg"), kBlockAllChildren},
#if defined(OS_WIN)
// Some Windows specific directories to block, basically all apps, the
// operating system itself, as well as configuration data for apps.
{base::DIR_PROGRAM_FILES, nullptr, kBlockAllChildren},
{base::DIR_PROGRAM_FILESX86, nullptr, kBlockAllChildren},
{base::DIR_PROGRAM_FILES6432, nullptr, kBlockAllChildren},
{base::DIR_WINDOWS, nullptr, kBlockAllChildren},
{base::DIR_APP_DATA, nullptr, kBlockAllChildren},
{base::DIR_LOCAL_APP_DATA, nullptr, kBlockAllChildren},
{base::DIR_COMMON_APP_DATA, nullptr, kBlockAllChildren},
// Opening a file from an MTP device, such as a smartphone or a camera, is
// implemented by Windows as opening a file in the temporary internet files
// directory. To support that, allow opening files in that directory, but
// not whole directories.
{base::DIR_IE_INTERNET_CACHE, nullptr, kBlockNestedDirectories},
#endif
#if defined(OS_MAC)
// Similar Mac specific blocks.
{base::DIR_APP_DATA, nullptr, kBlockAllChildren},
{base::DIR_HOME, FILE_PATH_LITERAL("Library"), kBlockAllChildren},
#endif
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
// On Linux also block access to devices via /dev, as well as security
// sensitive data in /sys and /proc.
{kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren},
{kNoBasePathKey, FILE_PATH_LITERAL("/sys"), kBlockAllChildren},
{kNoBasePathKey, FILE_PATH_LITERAL("/proc"), kBlockAllChildren},
// And block all of ~/.config, matching the similar restrictions on mac
// and windows.
{base::DIR_HOME, FILE_PATH_LITERAL(".config"), kBlockAllChildren},
// Block ~/.dbus as well, just in case, although there probably isn't much a
// website can do with access to that directory and its contents.
{base::DIR_HOME, FILE_PATH_LITERAL(".dbus"), kBlockAllChildren},
#endif
// TODO(https://crbug.com/984641): Refine this list, for example add
// XDG_CONFIG_HOME when it is not set ~/.config?
};
请注意错误网址:
https://crbug.com/984641
关于chromium - Chromium 如何定义系统文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62153191/
启用后 chrome://flags/#native-file-system-api在我的 chrome 83.0.4103.61 中,我尝试使用这个新 API 访问文件夹 handle = awai
我下载并开始玩 CEF,但似乎没有任何文档。甚至没有一个有效的维基……我错过了什么吗? 最佳答案 大多数文档都在 CEF 的 header files 中.二进制分发版附带从这些文件生成的文档。它在编
我正在尝试在 ubuntu 上构建 chromium,我遵循了 chromium 官方网站上的所有说明但是之后我遇到了一些错误 fetch --nohooks --no-history chromiu
我尝试使用命令ninja -C out/Debug chrome来编译Chromium。 但是错误消息显示: ninja error loading 'build.ninja': the system
有没有办法告诉Tampermonkey脚本在 Chromium 中运行使用亲属 @require文件路径?例如,如果我有以下脚本标题: // ==UserScript== // @name
在Qt5.2版本下,我使用的是QtWebView,它可以自动调用第三方扩展,支持avi、mpeg、mov、flv等视频格式。但是当我升级到Qt5.10,把QtWebView改成QtWebengineV
我认为这很容易,但我找不到任何指向简单 tar.gz/tar.bz2/zip 存档的链接。 Chrome 使用一些自定义工具,例如 build_depot甚至下载源代码。但是我不想编译源代码,我只想看
我尝试将 --ignore-gpu-blacklist 参数设置为 JCEF,但我找不到方法。我应该使用的方法是这样的:CefApp::onBeforeCommandLineProcessing(St
我尝试使用 update-alternatives 通过以下命令将 Chromium 设置为默认 Web 浏览器。虽然我成功地将'/snap/bin/chromium'添加到--config中,但它不
我在我们的应用程序中遇到了奇怪的行为,这是一个在 Android 上运行的 Phonegap 包装的 WebView。我不确定我是在查看错误还是可能有其他原因,因此提出了这个问题。 大约从 2013
背景 我的任务是用 Chromium 替换我们基于 IE 的打印逻辑,以便我们最终可以支持在 Windows Server Core 或可能支持 .Net Core 的其他操作系统上运行我们当前的服务
Electron 可以编译成操作系统,基于 Chromium 操作系统而不是 Chromium 浏览器吗?至少理论上是这样。 所以我可以在没有任何操作系统的情况下安装我的软件。它可以在类似 kiosk
如果我的计算机上运行多个不同的 native 应用程序,这些应用程序使用某种形式的嵌入式 Chromium(可以是 CEF、Electron 或类似的东西)是否有任何 Chromium 消息传递(进程
我在我的 .NET 应用程序中使用 Puppeteer Sharp 来执行一些网页自动化任务。但是,我必须在只能访问 Intranet 的环境中部署我的应用程序,这意味着 Puppeteer 的 Br
What settings can be modified/added, to optimize Firefox / Chromium for low memory/cpu systems su
What settings can be modified/added, to optimize Firefox / Chromium for low memory/cpu systems su
我有一个 RPi 4 在 kiosk 模式下运行,带有 7 英寸显示屏,它在启动时使用以下参数打开 Chromium(禁用捏合缩放和信息栏): chromium-browser --noerrdial
在 Ubuntu 18.04 上,我尝试创建一个提醒来提醒我每天跟踪我的工作日志。 创建sh文件put_hours.sh #!/bin/bash zenity \ --forms \
所以我尝试我的第一个 Chrome 构建只是为了好玩,我已经通过 gclient 配置和同步获得了我想要的所有文件。然而,没有VS可以打开的项目文件,只有一堆对我来说没用的.gyp文件。 命令“gcl
我创建了一个使用 Playwright 的 Azure 函数。它在本地工作,好吧,那部分不会改变) 然后我创建了 Azure DevOps 管道,因此它使用 Ubuntu 代理,使用 PLAYWRIG
我是一名优秀的程序员,十分优秀!