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

Issue 115082: onclick= set by innerHTML is broken (Closed)

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

Description

http://code.google.com/p/google-caja/issues/detail?id=588 domita has support for setting very simple onevent= handlers when assigning to innerHTML. for example, this is supposed to work: <div id='a'></div> <script> var a = document.getElementById('a'); a.innerHTML = '<input type="button" onclick="foo();">'; function foo () { cajita.log(1); } </script> however, this has been broken since valija was created, because plugin_dispatchEvent knows how to find a cajita 'foo', but not a valija 'foo'. this change teaches plugin_dispatchEvent about valija 'foo'.

Patch Set 1 #

Total comments: 1

Patch Set 2 : onclick= set by innerHTML is broken #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -1 line) Patch
M src/com/google/caja/plugin/domita.js View 1 1 chunk +2 lines, -1 line 0 comments Download
M tests/com/google/caja/plugin/domita_test_untrusted.html View 1 2 chunks +21 lines, -0 lines 1 comment Download

Messages

Total messages: 7
felix8a
16 years, 6 months ago (2009-09-09 23:39:54 UTC) #1
MikeSamuel
http://codereview.appspot.com/115082/diff/1/3 File src/com/google/caja/plugin/domita.js (right): http://codereview.appspot.com/115082/diff/1/3#newcode4050 Line 4050: handler = imports.$v ? imports.$v.ro(handler) : imports[handler]; Maybe ...
16 years, 6 months ago (2009-09-10 17:26:41 UTC) #2
felix8a
On 2009/09/10 17:26:41, MikeSamuel wrote: > http://codereview.appspot.com/115082/diff/1/3 > File src/com/google/caja/plugin/domita.js (right): > > http://codereview.appspot.com/115082/diff/1/3#newcode4050 > ...
16 years, 6 months ago (2009-09-10 21:19:39 UTC) #3
MikeSamuel
http://codereview.appspot.com/115082/diff/5/6 File tests/com/google/caja/plugin/domita_test_untrusted.html (right): http://codereview.appspot.com/115082/diff/5/6#newcode30 Line 30: <p class="clickme-testcontainer" id="test-add-event-listener"> What is this clickme-testcontainer? I ...
16 years, 6 months ago (2009-09-10 21:36:07 UTC) #4
MikeSamuel
LGTM
16 years, 6 months ago (2009-09-10 21:36:16 UTC) #5
felix8a
On 2009/09/10 21:36:07, MikeSamuel wrote: > http://codereview.appspot.com/115082/diff/5/6 > File tests/com/google/caja/plugin/domita_test_untrusted.html (right): > > http://codereview.appspot.com/115082/diff/5/6#newcode30 > ...
16 years, 6 months ago (2009-09-10 21:55:46 UTC) #6
felix8a
16 years, 6 months ago (2009-09-10 22:08:37 UTC) #7
On 2009/09/10 21:36:16, MikeSamuel wrote:
> LGTM

@r3722
Sign in to reply to this message.

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