Skip to content Skip to sidebar Skip to footer

How To Expose Adwords To Javascript Via Clearscript?

Context: VS2015 Community; C#; ClearScript.V8.5.4.5; Google.AdWords.18.25.0 I'm trying to create a scripting environment to do my Budgets. One the C# side, I'm setting up a JScript

Solution 1:

You should be able to do the cast in script code. Try this:

// C#
JSengine.Script.host = newHostFunctions();

Then, in your script:

// JavaScriptvar bos = user.GetService(AdWordsService.v201603.BudgetOrderService);
bos = host.cast(BudgetOrderService, bos);

Or you can expose a delegate that does the cast in C# code.

Post a Comment for "How To Expose Adwords To Javascript Via Clearscript?"