changeset 1711:78ea155b6b14

Fixed 'onload' handling for img tag.
author Vladimir Shabanov <vshabanoff@gmail.com>
date Wed, 11 Apr 2012 03:06:23 +0400
parents 540df112ff62
children 355dc023fbb8
files src/monoize.sml
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/monoize.sml	Sun Apr 15 12:40:53 2012 -0400
+++ b/src/monoize.sml	Wed Apr 11 03:06:23 2012 +0400
@@ -3047,7 +3047,11 @@
                       | ("Onunload", e, _) :: rest => findOnload (rest, onload, SOME e, acc)
                       | x :: rest => findOnload (rest, onload, onunload, x :: acc)
 
-                val (onload, onunload, attrs) = findOnload (attrs, NONE, NONE, [])
+                val (onload, onunload, attrs) =
+                    if tag = "body" then
+                        findOnload (attrs, NONE, NONE, [])
+                    else
+                        (NONE, NONE, attrs)
 
                 val (class, fm) = monoExp (env, st, fm) class
                 val (dynClass, fm) = monoExp (env, st, fm) dynClass