GaloisInc / FiveUI

Extensible UI Analysis in your browser
Other
29 stars 1 forks source link

Provide overrides of report.error() and report.warn() that accept just a node #21

Open creswick opened 10 years ago

creswick commented 10 years ago

It's often the case that the rule text is sufficient to explain a rule failure; but report.error and report.warn don't have overrides that support just passing in a dom node (or a jquery object) for highlighting.

This should be possible with some run-time type checking in report.error() and report.warn() on the first argument.

If it's a string, use that as a message. If it's a DOM node or a jquery object, use those values for highlighting.