Issue #1727Opened January 14, 2019by alfaalex810 reactions

[QUESTION] Event to get children view

Question

I have a problem with a component. When I drop a component into the canvas I create a simple object. Before appending this object I need to check if some attribute is already populated but children are not yet available.

view: defaultView.extend( {
	tagName: 'alea-video',
	updateContent() {
		this.el.innerHTML = "";
		this.el.innerHTML = this.model.get('content')
	},    
	init() {
		this.listenTo(this.model, 'change:content', this.updateContent);
	},
	render: function () {
		defaultView.prototype.render.apply(this, arguments);
		var iframe = document.createElement("iframe");
		var value = document.createElement("div");

		value.style.pointerEvents = 'none';
		value.classList.add("video-container");
		if (this.el && this.el.childNodes[0] && this.el.childNodes[0].childNodes[0]) {
			value.appendChild(iframe);
		}				
		return this;
	},
});

Answers (2)

artfJanuary 16, 20190 reactions

Reproduce the issue in a live demo, if you're able to do so, open an issue as a BUG (follow the template)

lock[bot]January 16, 20200 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.