Skip to content

Commit f4aeced

Browse files
save file
1 parent a52455c commit f4aeced

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

utils/editors/html-editor/html/output-html/v2.0/output-html-v2.0.html

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@
3535
<input type=checkbox checked>
3636
allow-modals
3737
</span>
38-
<span id=allow-popups class=radio>
38+
<span id=allow-popups class=radio style='margin-right:30px'>
3939
<input type=checkbox checked>
4040
allow-popups
4141
</span>
42+
<span id=isolate class=radio>
43+
<input type=checkbox checked>
44+
isolate
45+
</span>
4246

4347
<div style='flex:1'></div>
4448

@@ -116,8 +120,12 @@
116120
var glass;
117121

118122

119-
var btn = {};
120-
obj.on = {};
123+
var sandbox_url;
124+
125+
126+
var btn = {};
127+
btn.console = {};
128+
obj.on = {};
121129

122130

123131
//:
@@ -136,7 +144,7 @@
136144
//:
137145

138146

139-
obj.initdom = function(rootnode){
147+
obj.initdom = function(){
140148

141149
shadow = host.shadowRoot;
142150

@@ -149,18 +157,20 @@
149157
chk['allow-scripts'] = $.chkbox(hdr,'#allow-scripts');
150158
chk['allow-modals'] = $.chkbox(hdr,'#allow-modals');
151159
chk['allow-popups'] = $.chkbox(hdr,'#allow-popups');
160+
chk['isolate'] = $.chkbox(hdr,'#isolate',btn.isolate);
152161

153-
chk['console-show'] = $.chkbox(hdr,'#console-show',btn.show_console);
162+
chk['console-show'] = $.chkbox(hdr,'#console-show',btn.console.show);
154163
chk['console-echo'] = $.chkbox(hdr,'#console-echo');
155164
chk['console-persist'] = $.chkbox(hdr,'#console-persist');
156-
$(shadow,'#console-clear').onclick = btn.clear_console;
165+
$(shadow,'#console-clear').onclick = btn.console.clear;
157166

158167
$(hdr,'#kill').onclick = btn.kill;
159168

160169

161170
hldr = $(shadow,'#hldr');
162171
iframe = $(shadow,'iframe');
163172
def_sandbox = iframe.getAttribute('sandbox');
173+
sandbox_url = iframe.src;
164174
glass = $(shadow,'#glass');
165175

166176

@@ -177,25 +187,39 @@
177187
}//kill
178188

179189

180-
btn.show_console = function(chk){
190+
btn.isolate = function(chk){
191+
192+
var url = new URL(sandbox_url);
193+
if(chk.checked){
194+
sanbox_url += '?isolate';
195+
}else{
196+
var i = sandbox_url.indexOf('?');
197+
sandbox_url = sandbox_url.slice(0,i);
198+
}
199+
200+
}//isolate
201+
202+
203+
btn.console.show = function(chk){
181204

182205
if(chk.checked){
183206
webconsole.host.style.display = '';
184207
}else{
185208
webconsole.host.style.display = 'none';
186209
}
187210

188-
}//show_console
211+
}//show
189212

190213

191-
btn.clear_console = function(){
214+
btn.console.clear = function(){
192215

193216
webconsole.clear();
194217
if(chk['console-echo'].checked){
195218
console.clear();
196219
}
197220

198-
}//clear_console
221+
}//clear
222+
199223

200224

201225
obj.glass = function(show=true){

0 commit comments

Comments
 (0)