public static ScriptElement Script(string srcOrCode) { var result = new ScriptElement(); if (srcOrCode.Contains("{") || srcOrCode.Contains("[")) { result.Value = srcOrCode; } else { result.Src = srcOrCode; } return result; }
public static ScriptElement RequireJs(string main = null, string requireJs = null) { if (string.IsNullOrWhiteSpace(requireJs)) { requireJs = "scripts/require.js"; } if (string.IsNullOrWhiteSpace(main)) { main = "scripts/main.js"; } var result = new ScriptElement {DataMain = main, Src = requireJs}; return result; }
public static ScriptElement Script(string srcOrCode) { var result = new ScriptElement(); if (srcOrCode.Contains("{") || srcOrCode.Contains("[")) { result.Value = srcOrCode; } else { result.Src = srcOrCode; } return(result); }
public static ScriptElement RequireJs(string main = null, string requireJs = null) { if (string.IsNullOrWhiteSpace(requireJs)) { requireJs = "scripts/require.js"; } if (string.IsNullOrWhiteSpace(main)) { main = "scripts/main.js"; } var result = new ScriptElement { DataMain = main, Src = requireJs }; return(result); }