How to use the metal-dom.enterDocument function in metal-dom

To help you get started, we’ve selected a few metal-dom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liferay / senna.js / test / app / AppDataAttributeHandler.js View on Github external
function enterDocumentRouteElement(path) {
	dom.enterDocument('');
	return document.querySelector('link[href="' + path + '"]');
}
github metal / metal.js / test / IncrementalDomAop.js View on Github external
beforeEach(function() {
		element = document.createElement('div');
		dom.enterDocument(element);
	});
github liferay / senna.js / test / screen / Screen.js View on Github external
function enterDocumentSurfaceElement(surfaceId, opt_content) {
	dom.enterDocument('<div id="' + surfaceId + '">' + (opt_content ? opt_content : '') + '</div>');
	return document.getElementById(surfaceId);
}
github liferay / senna.js / test / app / AppDataAttributeHandler.js View on Github external
function enterDocumentRouteElementMissingScreenType(path) {
	dom.enterDocument('');
	return document.querySelector('link[href="' + path + '"]');
}
github deprecate / metal-position / test / Align.js View on Github external
beforeEach(function() {
		dom.enterDocument('<div style="position:absolute;height: 25px;width:25px;" id="element"></div>');
		dom.enterDocument('<div style="position:absolute;top:100px;left:100px;width:50px;height:50px;" id="center"></div>');
		dom.enterDocument('<div style="position:absolute;width:50px;height:50px;" id="mutable"></div>');
		dom.enterDocument('<div style="position:absolute;width:500px;height:500px;top:100px;left:100px;"></div>');
		element = dom.toElement('#element');
		mutable = dom.toElement('#mutable');
		center = dom.toElement('#center');
		offsetParent = dom.toElement('#offsetParent');

		mutable.style.top = '100px';
		mutable.style.left = '100px';
		mutable.style.bottom = '';
		mutable.style.right = '';
	});
github deprecate / metal-position / test / Align.js View on Github external
beforeEach(function() {
		dom.enterDocument('<div style="position:absolute;height: 25px;width:25px;" id="element"></div>');
		dom.enterDocument('<div style="position:absolute;top:100px;left:100px;width:50px;height:50px;" id="center"></div>');
		dom.enterDocument('<div style="position:absolute;width:50px;height:50px;" id="mutable"></div>');
		dom.enterDocument('<div style="position:absolute;width:500px;height:500px;top:100px;left:100px;"></div>');
		element = dom.toElement('#element');
		mutable = dom.toElement('#mutable');
		center = dom.toElement('#center');
		offsetParent = dom.toElement('#offsetParent');

		mutable.style.top = '100px';
		mutable.style.left = '100px';
		mutable.style.bottom = '';
		mutable.style.right = '';
	});
github liferay / senna.js / test / surface / Surface.js View on Github external
function enterDocumentSurfaceElement(surfaceId, opt_content) {
	dom.enterDocument('<div id="' + surfaceId + '">' + (opt_content ? opt_content : '') + '</div>');
	return document.getElementById(surfaceId);
}
github metal / metal.js / packages / metal-component / src / Component.js View on Github external
getPortalElement_(portalElementSelector) {
		let portalElement = toElement(portalElementSelector);

		if (portalElement) {
			return portalElement;
		}

		if (
			portalElementSelector.indexOf('#') === 0 &&
			portalElementSelector.indexOf(' ') === -1
		) {
			portalElement = document.createElement('div');
			portalElement.setAttribute('id', portalElementSelector.slice(1));

			enterDocument(portalElement);
		}

		return portalElement;
	}