我想在编译成字节码之前打印或记录 JS 源代码。到目前为止,我已经尝试过各种 js-flags 但没有成功。是否可以?如果有,流程是怎样的?
HTML/JS 示例:
<html> <head>
<script type="text/javascript"> alert('newtext'); </script>
</head></html>
我想公开“警报('newtext')”。
我尝试了很多次都只能得到下游代码:
chromium --no-sandbox file:///...html --js-flags="--log-source-code" -> byte code
chromium --no-sandbox file:///...html --js-flags="--log-source-code" -> memory chunk addresses
到目前为止,我还尝试在启用调试的情况下编译 chromium,但没有成功。