MCPcopy Create free account
hub / github.com/ampproject/amphtml / render_

Method render_

extensions/amp-access-scroll/0.1/scroll-sheet.js:61–75  ·  view source on GitHub ↗

* @param {!Sheet.State} state * @private

(state)

Source from the content-addressed store, hash-verified

59 * @private
60 */
61 render_(state) {
62 this.mutate(() => {
63 if (!this.frame_) {
64 this.makeIframe_();
65 this.setWindow_(this.frame_.contentWindow);
66 }
67
68 if (this.frame_.src !== state.url) {
69 this.frame_.setAttribute('src', state.url);
70 }
71 this.renderHorizontalLayout();
72 this.frame_.setAttribute('title', state.title);
73 toggle(this.frame_, state.open);
74 });
75 }
76
77 /**
78 * @private

Callers 1

updateMethod · 0.95

Calls 5

makeIframe_Method · 0.95
toggleFunction · 0.90
mutateMethod · 0.45
setAttributeMethod · 0.45

Tested by

no test coverage detected