package cc.winboll.studio.webpagesources.common;

/**
 * @Author ZhanGSKen@QQ.COM
 * @Date 2024/08/23 02:15:03
 * @Describe Javascript Console Log 接收类。
 */
import android.content.Context;
import android.webkit.JavascriptInterface;
import cc.winboll.studio.libappbase.LogUtils;

public class JSConsole {
    
    public static final String TAG = "JSConsole";
    
    Context mContext;
    
    public JSConsole(Context context) {
        //LogUtils.d(TAG, "JSConsole(Context context)");
        mContext = context;
    }
    
    @JavascriptInterface
    @SuppressWarnings("unused")
    public void log(String tag, String message) {
        LogUtils.i(TAG, "console.log(...)\n" + tag + " : " + message);
    }
    
    @JavascriptInterface
    @SuppressWarnings("unused")
    public void log(String message) {
        LogUtils.i(TAG, "console.log(...)\n" + message);
    }
}
