Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(307)

Issue 22060043: Remove special handling of "simple" event handler attributes. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by kpreid_google
Modified:
12 years, 4 months ago
Reviewers:
felix8a
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Since eval is now always available, the notion of simple event handlers which are rewritten and executed without eval is unnecessary complexity, which we now remove. Note this has an additional cost: event handler attributes are compiled and kept around in the domicile.handlers table and never deleted from it, whereas simple event handlers would be stored inline in the rewritten handler and thus not accumulate garbage if repeatedly created. This could be avoided by storing the code inline as well (as a string) and either recompiling each time the handler is invoked or using a bounded cache. This change affects only event handlers expressed as attributes (<span onclick="..."> or el.setAttribute('onclick', ...)), not those expressed as functions (el.onclick = function () {...}). @r5623

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -74 lines) Patch
M src/com/google/caja/plugin/domado.js View 7 chunks +19 lines, -72 lines 0 comments Download
M tests/com/google/caja/plugin/test-domado-forms-guest.html View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 2
kpreid_google
12 years, 4 months ago (2013-11-05 19:33:31 UTC) #1
felix8a
12 years, 4 months ago (2013-11-05 19:39:08 UTC) #2
lgtm
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b