Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#316 closed enhancement (fixed)

Add ability to have a generic "behavior" function that gets notified via the parser

Reported by: david Owned by: dylan
Priority: high Milestone:
Component: General Version: 0.2
Keywords: behavior parser Cc:
Blocked By: Blocking:

Description

Something like so:

function sayHi(node, parsedNode) {
  node.onclick = function() {
    alert("Hello " + node.getAttribute("username") + "!");
  }
}

parser.addBehavior(function(node) {
  return node.hasAttibute("username");
}, sayHi);

Change History (3)

comment:1 Changed 14 years ago by dylan

Status: newassigned

comment:2 Changed 14 years ago by Dustin Machi

Resolution: fixed
Status: assignedclosed

Alex already committed something along these lines a few weeks ago.

comment:3 Changed 13 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.