Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
None
-
b82
-
generic
-
generic
-
Verified
Description
from Andreas Rieber <rieberandreas@gmail.com>:
The next one is about scopes in file: jdk8/jdk/src/share/sample/scripting/scriptpad/src/resources/scriptpad.js. I removed everything unimportant and the following code snippet show the problem:
------
var guiPkgs = { JFrame: function() { print("created"); } };
with (guiPkgs) {
function main() {
function createFrame() {
var frame = new JFrame();
}
createFrame();
}
}
main();
------
'created' should come out but JFrame is unknown. I tested this with some browsers (Firefox, Safari, Chrome) but only Rhino and Firefox can handle that construct.
The next one is about scopes in file: jdk8/jdk/src/share/sample/scripting/scriptpad/src/resources/scriptpad.js. I removed everything unimportant and the following code snippet show the problem:
------
var guiPkgs = { JFrame: function() { print("created"); } };
with (guiPkgs) {
function main() {
function createFrame() {
var frame = new JFrame();
}
createFrame();
}
}
main();
------
'created' should come out but JFrame is unknown. I tested this with some browsers (Firefox, Safari, Chrome) but only Rhino and Firefox can handle that construct.