MCPcopy
hub / github.com/talebook/talebook / create

Method create

app/public/static/candle-reader/js/epub-v0.3.88.js:11224–11271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11222 }
11223
11224 create() {
11225 if (this.iframe) {
11226 return this.iframe;
11227 }
11228
11229 if (!this.element) {
11230 this.element = this.createContainer();
11231 }
11232
11233 this.iframe = document.createElement("iframe");
11234 this.iframe.id = this.id;
11235 this.iframe.scrolling = "no"; // Might need to be removed: breaks ios width calculations
11236
11237 this.iframe.style.overflow = "hidden";
11238 this.iframe.seamless = "seamless"; // Back up if seamless isn't supported
11239
11240 this.iframe.style.border = "none";
11241 this.iframe.setAttribute("enable-annotation", "true");
11242 this.resizing = true; // this.iframe.style.display = "none";
11243
11244 this.element.style.visibility = "hidden";
11245 this.iframe.style.visibility = "hidden";
11246 this.iframe.style.width = "0";
11247 this.iframe.style.height = "0";
11248 this._width = 0;
11249 this._height = 0;
11250 this.element.setAttribute("ref", this.index);
11251 this.added = true;
11252 this.elementBounds = Object(_utils_core__WEBPACK_IMPORTED_MODULE_1__["bounds"])(this.element); // if(width || height){
11253 // this.resize(width, height);
11254 // } else if(this.width && this.height){
11255 // this.resize(this.width, this.height);
11256 // } else {
11257 // this.iframeBounds = bounds(this.iframe);
11258 // }
11259
11260 if ("srcdoc" in this.iframe) {
11261 this.supportsSrcdoc = true;
11262 } else {
11263 this.supportsSrcdoc = false;
11264 }
11265
11266 if (!this.settings.method) {
11267 this.settings.method = this.supportsSrcdoc ? "srcdoc" : "write";
11268 }
11269
11270 return this.iframe;
11271 }
11272
11273 render(request, show) {
11274 // view.onLayout = this.layout.format.bind(this.layout);

Callers 15

renderMethod · 0.95
onFunction · 0.45
DoFunction · 0.45
jaFunction · 0.45
CvFunction · 0.45
ooFunction · 0.45
nuFunction · 0.45
VvFunction · 0.45
iuFunction · 0.45
mtFunction · 0.45
ruFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected