|
|
1. Modify SafeHtmlMaker to optionally emit its HTML as part of the JS, as calls on the HTML emitter. This makes it possible to cajole some HTML to pure JS. This change envisions the following scenarios:
a. Cajoling HTML->HTML is mainly for containers that
compose their HTML pages server-side and wish to
optimize startup latency.
b. Cajoling HTML->JS is mainly for containers that
dynamically embed plugins and wish to use the
simplicity of the module system, or the cross site
capability of <script> loading.
2. Updated the cajoling service (and some upstream components) to allow a new Caja module format -- one that provides a JSONP-style callback function. So in addition to the classic:
___.loadModule({...});
we can now emit:
customCallback(___.prepareModule({...}));
where "customCallback" is something the client asked for. As an immediate use for this, a future change will take advantage of this in the <script> module loader, so that the <script> module loader will no longer be so fragile when container pages change the default module handler.
Total comments: 50
Total comments: 11
Total comments: 14
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+954 lines, -335 lines) |
Patch |
 |
M |
src/com/google/caja/parser/js/CajoledModule.java
|
View
|
5
6
7
8
9
10
11
|
5 chunks |
+130 lines, -11 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/plugin/PluginMeta.java
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/plugin/html-emitter.js
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/plugin/stages/CompileHtmlStage.java
|
View
|
12
|
3 chunks |
+31 lines, -1 line |
0 comments
|
Download
|
 |
A |
src/com/google/caja/service/CajaArguments.java
|
View
|
4
5
6
7
|
1 chunk |
+103 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/CajolingService.java
|
View
|
3
4
5
6
7
8
9
10
11
|
6 chunks |
+62 lines, -43 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/ContentHandler.java
|
View
|
3
4
5
6
7
8
9
10
11
|
2 chunks |
+17 lines, -6 lines |
0 comments
|
Download
|
 |
A |
src/com/google/caja/service/ContentHandlerArgs.java
|
View
|
|
1 chunk |
+49 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/GadgetHandler.java
|
View
|
3
4
5
6
7
8
9
10
11
|
1 chunk |
+9 lines, -3 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/HtmlHandler.java
|
View
|
3
4
5
6
7
8
9
10
11
|
7 chunks |
+93 lines, -33 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/ImageHandler.java
|
View
|
3
4
5
6
7
8
9
10
11
|
1 chunk |
+9 lines, -3 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/InnocentHandler.java
|
View
|
3
4
5
6
7
8
9
10
11
|
1 chunk |
+9 lines, -3 lines |
0 comments
|
Download
|
 |
A |
src/com/google/caja/service/InvalidArgumentsException.java
|
View
|
|
1 chunk |
+64 lines, -0 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/JsHandler.java
|
View
|
3
4
5
6
7
8
9
10
11
|
5 chunks |
+46 lines, -13 lines |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/LooseContentTypeCheck.java
|
View
|
5
6
7
8
9
10
11
|
2 chunks |
+7 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/quasiliteral/ModuleFormatTest.java
|
View
|
5
6
7
8
9
10
11
|
3 chunks |
+103 lines, -1 line |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/parser/quasiliteral/testModule.co.js
|
View
|
10
11
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/html-emitter-test.html
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+15 lines, -2 lines |
0 comments
|
Download
|
 |
A + |
tests/com/google/caja/plugin/stages/CompileHtmlStageTest.java
|
View
|
|
2 chunks |
+38 lines, -199 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/stages/PipelineStageTestCase.java
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/service/HtmlHandlerTest.java
|
View
|
3
4
5
6
7
8
9
10
11
|
3 chunks |
+101 lines, -5 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/service/JsHandlerTest.java
|
View
|
3
4
5
6
7
8
9
10
11
|
1 chunk |
+23 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/service/ServiceTestCase.java
|
View
|
3
4
5
6
7
8
9
10
11
|
2 chunks |
+18 lines, -3 lines |
0 comments
|
Download
|
Total messages: 22
|