是否可以获得通过 StageWebView 加载的 .html 文档的元标题?我的代码:
webViewC.stage = cont.stage;
webViewC.viewPort = new Rectangle(cont.x,cont.y,cont.width,cont.height);
webViewC.loadURL("http://www.example.com/foobar.html");
谢谢。乌里
是否可以获得通过 StageWebView 加载的 .html 文档的元标题?我的代码:
webViewC.stage = cont.stage;
webViewC.viewPort = new Rectangle(cont.x,cont.y,cont.width,cont.height);
webViewC.loadURL("http://www.example.com/foobar.html");
谢谢。乌里
StageWebView是目标平台上核心 HTML 渲染组件的一个非常低级的抽象。因此,它在 ActionScript 和底层 HTML 文档之间提供了非常少的交互。
如果您只是在寻找文档的<title>元素,那么一旦引发事件,就可以通过webViewC.titlegetter获得。Event.COMPLETE但是,如果您正在查找<meta name='Title' content='...' />元素的内容,则无法通过StageWebView.
我不太确定你到底想做什么,但你可能会URLLoader检索页面的内容,然后解析出你想要的信息,然后将原始 HTML blob 传递给webViewC.loadString()