Skip to content

Commit f727783

Browse files
authored
chore: Adjust evaluation
1 parent 5704387 commit f727783

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView2.cs

+8-7
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ public async Task When_InvokeScriptAsync()
4040
// may be set to true too early on wasm.
4141
color = await webView.ExecuteScriptAsync(
4242
"""
43-
let testElement = document.getElementById('test');
44-
let returnValue = "";
45-
if(testElement){
46-
returnValue = testElement.style.backgroundColor.toString();
47-
}
48-
49-
returnValue;
43+
func () => {
44+
let testElement = document.getElementById('test');
45+
let returnValue = "";
46+
if(testElement){
47+
return returnValue = testElement.style.backgroundColor.toString();
48+
}
49+
return "";
50+
}()
5051
""");
5152

5253
} while (sw.Elapsed < TimeSpan.FromSeconds(5) && string.IsNullOrEmpty(color));

0 commit comments

Comments
 (0)