Get content with EvaluateJS

I’m wondering if it’s any possibility to get content from NativeWebView with Fuse element. For example, user writes something in textarea which is shown as a WebView and then when user clicks on the Fuse button element so will Fuse get the content of textarea.

I can get the content of textarea with EvaluateJS as shown in examples. Is it possible to do what I’m asking for?

Yes, theoretically you should be able to do that, as the EvaluateJS example explains.

If you have trouble figuring out where in the DOM your textarea lives, I suggest trying to return the whole document and console.log() everything you get there.

It worked really well with UserEvent, example:

<NativeViewHost ux:Name="nvh" Visibility="Visible">
	<WebView Url="http://localhost/textarea.html" ZoomEnabled="false" Margin="0,60,0,0" MaxWidth="340" Height="320">
		<UserEvent ux:Name="getContentEvent" />

		<OnUserEvent EventName="getContentEvent">
			<EvaluateJS Handler="{onPageLoaded}">
				var result = {
				body :  document.forms[0]["children"][1]["children"][0].innerHTML
				};

				return result;
			</EvaluateJS>
		</OnUserEvent>
	</WebView>
</NativeViewHost>
<MyButton Text="GET" Clicked="{getThis}" Alignment="BottomLeft" Margin="10,0,10,10" />
function onPageLoaded(res) {
	console.log(res['json']);
}

function getThis() {
	getContentEvent.raise();
}