Hi,
I am noticing v8Engine.Execute() fails with :
_
SyntaxError: Unexpected identifier
at Script Document xx..xxx.... -> -----------------------_
exception.
I see that normally one of the Double quotes ( " ) in the javascript text is replaced with some other characters and hence the syntax error. This seems to be intermittent issue as it doesnt happen all the time and not on all the machines the application runs.
Can you please have a look? I am using version 5.3.
thanks
Pandey
Comments: Hi, you noticed it right. The snippet I provided is a part of big javascript code. < I can't put the complete code here :( > Also, it is interesting to know that not all users have this problem. ( We ship the same file for every one ). This is what I do to load the js file: ``` string jsContents = File.ReadAllText(jsFilePath); //jsFilePath is javascript file name. var _v8Engine = new V8ScriptEngine(V8ScriptEngineFlags.None); _v8Engine.Execute(jsContents); ``` The last line throws exception.
I am noticing v8Engine.Execute() fails with :
_
SyntaxError: Unexpected identifier
at Script Document xx..xxx.... -> -----------------------_
exception.
I see that normally one of the Double quotes ( " ) in the javascript text is replaced with some other characters and hence the syntax error. This seems to be intermittent issue as it doesnt happen all the time and not on all the machines the application runs.
Can you please have a look? I am using version 5.3.
thanks
Pandey
Comments: Hi, you noticed it right. The snippet I provided is a part of big javascript code. < I can't put the complete code here :( > Also, it is interesting to know that not all users have this problem. ( We ship the same file for every one ). This is what I do to load the js file: ``` string jsContents = File.ReadAllText(jsFilePath); //jsFilePath is javascript file name. var _v8Engine = new V8ScriptEngine(V8ScriptEngineFlags.None); _v8Engine.Execute(jsContents); ``` The last line throws exception.