|
14 | 14 |
|
15 | 15 | .radio |
16 | 16 | {border:1px solid lightgray;padding:2px 10px;border-radius:5px;cursor:pointer;display:flex;align-items:center} |
| 17 | + |
17 | 18 | #isolate |
18 | 19 | {margin-right:10px} |
19 | 20 | #allow-scripts |
|
37 | 38 | </style> |
38 | 39 |
|
39 | 40 | <div id=hdr> |
40 | | - <span id=isolate class=radio> |
41 | | - <input type=checkbox> |
42 | | - isolate |
43 | | - </span> |
| 41 | + |
| 42 | + <output-settings v1.0 component=page> |
| 43 | + </output-settings> |
44 | 44 |
|
45 | 45 | <span id=allow-scripts class=radio> |
46 | 46 | <input type=checkbox checked disabled> |
47 | 47 | allow-scripts |
48 | 48 | </span> |
49 | | - <span id=allow-modals class=radio> |
50 | | - <input type=checkbox checked> |
51 | | - allow-modals |
52 | | - </span> |
53 | | - <span id=allow-popups class=radio style='margin-right:30px'> |
54 | | - <input type=checkbox checked> |
55 | | - allow-popups |
56 | | - </span> |
57 | 49 |
|
58 | 50 | <div style='flex:1'></div> |
59 | 51 |
|
60 | | - <span id=console-show class=radio> |
61 | | - <input type=checkbox checked> |
62 | | - console |
63 | | - </span> |
64 | | - <span id=console-echo class=radio> |
65 | | - <input type=checkbox checked> |
66 | | - echo |
67 | | - </span> |
68 | 52 | <span id=console-persist class=radio> |
69 | 53 | <input type=checkbox> |
70 | 54 | persist |
|
74 | 58 | </span> |
75 | 59 |
|
76 | 60 | <button id=kill>kill</button> |
| 61 | + |
77 | 62 | </div> |
78 | 63 |
|
79 | 64 |
|
|
83 | 68 | --> |
84 | 69 | <div id=hldr> |
85 | 70 | <iframe></iframe> |
86 | | - <div id=glass></div> |
87 | 71 | </div> |
88 | 72 |
|
89 | 73 | <div id=slider></div> |
|
126 | 110 | var hldr; |
127 | 111 | var iframe; |
128 | 112 | var def_sandbox; |
129 | | - var glass; |
130 | 113 |
|
131 | 114 |
|
132 | 115 | var sandbox_url = {}; |
|
191 | 174 |
|
192 | 175 | hldr = $(shadow,'#hldr'); |
193 | 176 | iframe = $(shadow,'iframe'); |
194 | | - glass = $(shadow,'#glass'); |
195 | 177 |
|
196 | 178 |
|
197 | 179 | $.slider(hldr,'#slider',webconsole.host,null,{root:shadow,mode:'horiz'}); |
|
250 | 232 |
|
251 | 233 |
|
252 | 234 |
|
253 | | - obj.glass = function(show=true){ |
254 | | - |
255 | | - var display = 'none'; |
256 | | - if(show){ |
257 | | - display = 'block'; |
258 | | - } |
259 | | - glass.style.display = display; |
260 | | - |
261 | | - }//glass |
262 | | - |
263 | | - |
264 | 235 | obj.horiz = function(){ |
265 | 236 |
|
266 | 237 | host.style.width = '100%'; |
|
297 | 268 |
|
298 | 269 | iframe.remove(); |
299 | 270 | iframe = iframe.cloneNode(); |
300 | | - debug(sandbox_url); |
301 | | - build.sandbox(); |
302 | 271 |
|
303 | | - iframe.setAttribute('allow',iframe_allow); |
304 | | - debug(iframe_allow); |
| 272 | + //build.sandbox(); |
| 273 | + var attr = settings.sandbox(); |
| 274 | + iframe.setAttribute('sandbox',attr); |
| 275 | + |
| 276 | + var attr = settings.permissions(); |
| 277 | + iframe.setAttribute('allow',attr); |
| 278 | + |
| 279 | + /* |
305 | 280 | if(chk.isolate.checked){ |
306 | 281 | src += '?isolate'; |
307 | 282 | } |
308 | 283 | iframe.src = src; |
| 284 | + */ |
309 | 285 | debug(src); |
310 | 286 | iframe.onload = onload; |
311 | 287 | hldr.append(iframe); |
312 | 288 |
|
313 | 289 | }//iframe |
314 | 290 |
|
315 | | - |
| 291 | +/* |
316 | 292 | build.sandbox = function(){ |
317 | 293 | |
318 | 294 | var attr = iframe_sandbox; |
|
334 | 310 | iframe.setAttribute('sandbox',attr); |
335 | 311 | |
336 | 312 | }//sandbox |
337 | | - |
338 | | - |
| 313 | +*/ |
| 314 | + |
| 315 | + |
339 | 316 | function sandbox1(html){ |
340 | 317 | debug('sandbox1'); |
341 | 318 | var src = iframe_src; |
|
0 commit comments