Home Cooker Classes Others Rice
Classes  >  jsexecutor  >  SetData(string)
jsexecutor class : SetData(string) method

Description

Sets a string to the window.external object.

Syntax

jsexecutorInstance.SetData(string data)

Arguments

ClassNameDescription
stringdataData for passing to JavaScript.

Return value

None.

Sample code

1:

jsexecutor jse = new jsexecutor();

2:

jse.SetData("data string");

Notes

The SetData() method allows JavaScript to receive the string data written by Rice.

The JavaScript code to retrieve string data is as follows.

let dataStr = window.external.getData();

Links for reference

None.

Copyright © Rice All rights reserved.