From ceb14fb45ec9e24926d29f8e6f36bb099e0ed72b Mon Sep 17 00:00:00 2001 From: richie Date: Mon, 23 Sep 2019 09:27:59 +0800 Subject: [PATCH] js --- .../api/report/script/JavaScriptKit.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/main/java/com/fanruan/api/report/script/JavaScriptKit.java diff --git a/src/main/java/com/fanruan/api/report/script/JavaScriptKit.java b/src/main/java/com/fanruan/api/report/script/JavaScriptKit.java new file mode 100644 index 0000000..385f3d9 --- /dev/null +++ b/src/main/java/com/fanruan/api/report/script/JavaScriptKit.java @@ -0,0 +1,23 @@ +package com.fanruan.api.report.script; + +import com.fr.js.JavaScript; +import com.fr.js.JavaScriptImpl; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019/9/20 + * 从服务器端生成给web端使用的javascript代码的工具类 + */ +public class JavaScriptKit { + + /** + * 生成一个简单的JavaScript实例 + * + * @param content 脚本内容 + * @return JavaScript实例 + */ + public JavaScript newSimpleJavaScript(String content) { + return new JavaScriptImpl(content); + } +}