-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 8
-
Component/s: core-libs
-
None
-
b82
-
generic
-
generic
-
Verified
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.