简体   繁体   English

将chrome开发人员工具配置文件堆字符串分配给javascript变量

[英]Assigning a chrome developer tools profiles heap string to a javascript variable

快照

I am not able to select the string "They were often....." directly on the webpage or in HTML because it is used under canvas. 我无法直接在网页或HTML中选择字符串“他们经常.....”,因为它是在画布下使用的。

I created a memory heap of page and found the string. 我创建了一个页面的内存堆并找到了该字符串。

Is there any way by which i can assign this string to a variable? 有什么方法可以将此字符串分配给变量吗? like: 喜欢:

var foo = document.fa.fn.init[1].content;

You can use the "Store as Global Variable" option from the context menu. 您可以使用上下文菜单中的“存储为全局变量”选项。 It will make the value accessible in the console as temp1 . 它将使控制台中的值可以作为temp1访问。

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

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