Uncaught TypeError: Cannot read property 'toLowerCase' of null
maphilight should detect this case and default to a rect value if the shape attribute is not in the element.
Additionally, there is a fourth "shape" that the shape attribute can describe: the confusingly named default (which is not the default value when the shape attribute is omitted). It specifies that the entire map area is a hot-spot region, and such an area tag would not have coords attribute (in fact it MUST not, according to the spec).
maphilight makes the assumption that the map
area
tags will always have ashape
attribute.However, according to the HTML spec, the
shape
attribute may be omitted. When this occurs, theshape
attribute should be assumed to be therect
value.If this attribute is omitted (as with the removeRedundantAttributes option of html-minifier), the library fails to initialize and will produce an error on hover:
maphilight should detect this case and default to a
rect
value if theshape
attribute is not in the element.Additionally, there is a fourth "shape" that the
shape
attribute can describe: the confusingly nameddefault
(which is not the default value when theshape
attribute is omitted). It specifies that the entire map area is a hot-spot region, and such an area tag would not havecoords
attribute (in fact it MUST not, according to the spec).maphilight incorrectly assumes that both a
coords
attribute must exist on anarea
tag, and that the shape of the area cannot bedefault
.