[英]How use Scripting.FileSystemObject in Microsoft Edge
I know that ActiveXObject is no longer in Microsoft Edge. 我知道ActiveXObject不再位于Microsoft Edge中。 So how can i use the FileSystemObject in Microsoft Edge?
那么,如何在Microsoft Edge中使用FileSystemObject? I'm trying to make a Microsoft Edge plugin that obtains the html code of a page web and writes it into a .txt in my local file system The following code is this:
我正在尝试制作一个Microsoft Edge插件,该插件可获取页面Web的html代码并将其写入本地文件系统中的.txt中。以下代码是这样的:
browser.browserAction.onClicked.addListener(function(tab) {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var f1 = fso.CreateTextFile("C:\\Users\\lucas\\Desktop\\htmltext.txt",true);
var markup = document.documentElement.outerHTML;
f1.WriteLine(markup);
f1.Close();});
ActiveX is not supported in Microsoft Edge, and Microsoft Edge doesn't support plugin either. Microsoft Edge不支持ActiveX,Microsoft Edge也不支持插件。
You could consider write an extension for Microsoft Edge, use Native Messaging to pass html code from extension to your native app, then write the info into file system from native app. 您可以考虑为Microsoft Edge编写扩展,使用本机消息传递将扩展中的html代码传递到您的本机应用程序,然后将信息从本机应用程序写入文件系统。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.