Togakangaroo wrote:
Sure, the host can pass any string to a script function:
... or store the string as a property in a script object (the global object in this case):
There are no restrictions on string size or contents.
Good luck!
I would like to use ClearScript to compile handlebarsjs templates. Handlebars templates can be full html documents that as far as I know there's no good way to build up in js alone ( they have to be passed in via an API or grabbed via an ajax download or elment.innerHTML).
Is there a way in ClearScript where I can inject a multiline string containing a document into a variable or am I barking up the wrong tree?
Sure, the host can pass any string to a script function:
// C#string document = GetOrCreateDocument(); engine.Script.processDocument(document);
// C#
engine.Script.document = document;
Good luck!