Is it possible to check if a JQuery string has a valid syntax? I've tried Jint because of this Determine whether a string contains valid javascript code. Unfortunately, it seems as if this is meant for another use-case.
I have tried the following (which leads to "document is not defined"):
public bool IsValidJqueryString(string jQueryString)
{
// Validate JQuery
var executedQuery = new Jint.Engine().Execute(
@"$(document).ready(function () {
});"
);
}