MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / loadPreview

Function loadPreview

examples/js/editor.js:137–154  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

135
136//填充预览效果内容
137function loadPreview(content) {
138 var iFrame = createIFrame(),
139 iframeDocument = iFrame.contentWindow.document;
140 iFrame.contentWindow.resources=window.resources?window.resources.resources:{};
141 iframeDocument.open();
142 iframeDocument.write(content);
143 iframeDocument.close();
144 var doc = document;
145 iFrame.addEventListener('load', function () {
146 mapHeight();
147 setTimeout(function () {
148 doc.title = iframeDocument.title;
149 }, 100);
150
151 });
152
153 mapHeight();
154}
155
156function createIFrame() {
157 var preViewPane = $("#previewPane");

Callers 2

loadExampleHtmlFunction · 0.85
runFunction · 0.85

Calls 3

createIFrameFunction · 0.85
mapHeightFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected