B
B
bulbazaur2011-06-11 18:20:28
ActionScript
bulbazaur, 2011-06-11 18:20:28

Get HTML code from AIR browser

var html2:HTMLLoader = HTMLLoader.createRootWindow();
html2.load(req);
html2.stage.nativeWindow.activate();

I did not find a method in the documentation to get the code of the open page. Is there such a thing, or is it unsafe, that's why it's not enabled?
I'm not talking about getting the code from the URLLoader, I'm talking about getting the code from the HTMLLoader object.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
loststylus, 2011-06-15
@loststylus

Not exactly the same, but practically:
var sourceCode:String = someHTMLLoader.window.document.getElementsByTagName('html')[0].outerHTML;
trace(new XML(sourceCode));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question