On Wed, Aug 23, 2017 at 9:52 AM, Mark Miller <
eri...@gmail.com> wrote:
> What happens if you remove the "return"?
>
>
> On Wed, Aug 23, 2017 at 7:23 AM, <
jwi...@lifelink.com> wrote:
>>
>> I'm following the "Running Plain Javascript" example in the documentation.
>>
>> Instead of referencing an external URL, I'm passing in a javascript
>> string:
>>
>> caja.load(undefined, undefined, function(frame) {
>> frame.code('return function f(x) { return 1; }',
>> 'application/javascript')
>> .run();
>> });
>>
>> I'm getting:
>>
>> Uncaught SyntaxError: Failed to parse program: SyntaxError: Unexpected
>> token (1:15) in source: "return function f(x) { return 1; }" at line: -1
>>
>> The API reference documentation appears to be broken or moved, so I'm
>> having trouble digging into the exact issue.
>>
>> Any ideas?
>>
>> Thanks, Justin
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Google Caja Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an