Implement global write() and writeln()
This commit is contained in:
parent
fd2882e21d
commit
a70ace86bd
1 changed files with 24 additions and 1 deletions
|
@ -59,7 +59,7 @@ public class GlobalObject extends ScriptableObject {
|
|||
"renderSkin", "renderSkinAsString", "getProperty",
|
||||
"authenticate", "createSkin", "format", "encode",
|
||||
"encodeXml", "encodeForm", "stripTags",
|
||||
"getDBConnection", "getURL"
|
||||
"getDBConnection", "getURL", "write", "writeln"
|
||||
};
|
||||
|
||||
defineFunctionProperties(globalFuncs, GlobalObject.class, 0);
|
||||
|
@ -305,6 +305,29 @@ public class GlobalObject extends ScriptableObject {
|
|||
return HtmlEncoder.encode(str);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param str ...
|
||||
*
|
||||
* @return ...
|
||||
*/
|
||||
public void write(String str) {
|
||||
System.out.print(str);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param str ...
|
||||
*
|
||||
* @return ...
|
||||
*/
|
||||
public void writeln(String str) {
|
||||
System.out.println(str);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue