Class: ImageElements::ImageMap

Inherits:
ContainerElement
  • Object
show all
Defined in:
lib/reparcs/elements/image_elements.rb

Overview

A Image map element ‘<map></map>’

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ ImageMap

Creates a new ImageMap element, takes an optional hash of attributes as parameter.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/reparcs/elements/image_elements.rb', line 27

def initialize(attrs={})
  aattrs = [
    "class", "id", "title", "dir", "xml:lang",
    "onclick", "ondblclick", "onkeydown", "onkeypress",
    "onkeyup", "onmousedown", "onmousemove", "onmouseout",
    "onmouseover", "onmouseover", "onmouseup", "style"
  ]
  childs = [
    "address", "area", "blockquote", "del", "div", "dl",
    "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6",
    "hr", "ins", "noscript", "ol", "p", "pre", "script",
    "table", "ul"
  ]
  super("map", aattrs. childs, attrs)
  @start_element = "<map"
  @end_element = "</map>"
end