You need to be logged in to post in the forums. If you do not have an account, please sign up first.
Command line scope
Hi,Evaluating 'this' at the Dragonfly command line or in evaluated code seems not to be in the same scope.
Example:
<html>
<head>
<script type="text/javascript" >
function onClick() {
// Javascript alert shows [object HTMLDivElement] while
// typing 'this' (at a breakpoint) at the command line
// outputs [object Window] - why?
alert(this);
}
function RunTest() {
var elm = document.getElementById('box');
elm.onclick = onClick;
}
</script>
</head>
<body onload="javascript:RunTest()">
<div id="box" >
Add a breakpoint in Dragonfly the click here to test!
</div>
</body>
</html>
Why doesn't the command line output [object HTMLDivElement]? The property window seems to refer to the div.
Regards
Markus
This is a clear bug. Could you report it here https://bugs.opera.com/wizard/ ?