File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 1- #Trash Script
1+ # Trash Script
22
33A very tiny JS-like script interpreter implemented throw JS.
44
@@ -11,19 +11,20 @@ TrashScript was originally designed for modules in the
1111
1212While not all JavaScript syntax has been implemented, the majority of commonly used syntax is available.
1313
14- ###Keywords: How to allow eval in chrome extension
14+ ### Keywords:
15+ How to allow eval in chrome extension
1516
1617
17- ##Usage examples:
18+ ## Usage examples:
1819
19- ###Config
20+ ### Config
2021```
2122TrashScript.config = {
2223 max_exec_limit:1000000 //default
2324}
2425```
2526
26- ###Basic
27+ ### Basic
2728```
2829var executor = TrashScript("Source code",function(e)
2930{
@@ -36,7 +37,7 @@ var executor = TrashScript("Source code",function(e)
3637executor.exec();
3738```
3839
39- ###Bind existing JavaScript functions or objects
40+ ### Bind existing JavaScript functions or objects
4041```
4142TrashScript.bind("alert",function(arg){
4243 window.alert(arg);
@@ -52,7 +53,7 @@ TrashScript.bind({
5253});
5354```
5455
55- ###Context object for 'this'
56+ ### Context object for 'this'
5657```
5758var executor = TrashScript("function aaa(){alert(this)};return aaa()",function(e){...});
5859executor.exec(window); //'this' is window
You can’t perform that action at this time.
0 commit comments