lib/volt/server/html_parser/attribute_scope.rb
# Take the attributes and create any bindings
Take the attributes and create any bindings
Take the attributes and create any bindings
def process_event_binding(tag_name, attributes, name, value)
    id = add_id_to_attributes(attributes)
    event = name[2..-1]
    if tag_name == 'a'
      attributes['href'] ||= ''
    end
    attributes.delete(name)
    save_binding(id, "lambda { |__p, __t, __c, __id| EventBinding.new(__p, __t, __c, __id, #{event.inspect}, Proc.new {|event| #{value} })}")
  end
def process_event_binding ( tag_name , attributes , name , value ) id = add_id_to_attributes ( attributes ) event = name [ 2 .. - 1 ] if tag_name == 'a' attributes [ 'href' ] ||= '' end attributes . delete ( name ) save_binding ( id , "lambda { |__p, __t, __c, __id| EventBinding.new(__p, __t, __c, __id, #{event.inspect}, Proc.new {|event| #{value} })}" ) end
Take the attributes and create any bindings
Take the attributes and create any bindings
# For links, we need to add blank href to make it clickable. # Remove the e- attribute
tag_name
attributes
name
value