简体   繁体   English

在 Chrome 开发者工具中禁用对 HTML 实体的解码

[英]Disable decoding of HTML entities in Chrome developer tools

I am working in Chrome developer tools and looking for a way to show HTML entities by default.我正在使用 Chrome 开发人员工具并寻找一种默认显示 HTML 实体的方法。

The view I see is this:我看到的视图是这样的:

在此处输入图像描述

Whereas, the view I need is this:然而,我需要的观点是:

在此处输入图像描述

Does anybody know how I can enable the view I need?有人知道我如何启用我需要的视图吗?

I know there is a theme engine for Chrome but is there an existing feature that fits my needs?我知道有一个适用于 Chrome 的主题引擎,但是否有适合我需要的现有功能?

Thanks guys;)多谢你们;)

我有同样的问题,发现使用 chrome,右键单击 > 查看源代码,显示纯未解码(未评估)的 html 实体,而右键单击 > 检查选项似乎评估它们......可能对某人有所帮助:)

You can't: The DOM Inspector shows a view of the DOM, not the source code.您不能:DOM Inspector 显示 DOM 的视图,而不是源代码。

The HTML has already been parsed and the entities converted to characters in text nodes. HTML 已经被解析并且实体被转换为文本节点中的字符。

The Inspector shows an HTML-like view because it is easy to understand. Inspector 显示类似 HTML 的视图,因为它易于理解。 It doesn't reflect the original source code.它不反映原始源代码。

Browsers have an explicit "View Source" feature if you want to see the source code.如果您想查看源代码,浏览器具有明确的“查看源代码”功能。

In Google Chrome the correct way to see the actual source of the document that is currently loaded is to click the Sources tab and choose the file from the tree on the left.在 Google Chrome 中,查看当前加载文档的实际来源的正确方法是单击来源选项卡并从左侧的树中选择文件。 If you have a unique string on the line that you're searching for, you can press Ctrl-Shift-F to search all files for that string.如果您要搜索的行中有一个唯一的字符串,您可以按Ctrl-Shift-F在所有文件中搜索该字符串。

  • RightClick -> View Source is incorrect because it reloads the document, which may cause unexpected behaviour . RightClick -> View Source不正确,因为它会重新加载文档,这可能会导致 意外行为
  • Inspect Element is incorrect because it displays the current DOM, not the HTML source. Inspect Element不正确,因为它显示当前 DOM,而不是 HTML 源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM