Menu

#797 style property of freshly created Image is null

closed
None
5
2012-10-21
2009-03-20
java cocoon
No

Hi -
Getting the following ScriptError. A piece of html/javascript that was used to reproduce the issue is attached below.

Version: htmlunit-2.5-snapshot.jar with all proper dependencies

Error:

com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot set property "position" of null to "relative"

Html/Javascript code piece used to reproduce the issue

<html>
<body>
<script type="text/javascript">

img1 = new Image(200,20);
img1.style.position = "relative";
</script>
</body>
</html>


Discussion

  • Marc Guillemot

    Marc Guillemot - 2009-03-20

    improved title

     
  • Daniel Gredler

    Daniel Gredler - 2009-03-23

    Fixed in SVN, thanks for the very concise bug report!

     

Log in to post a comment.