How to use the can-connect.tag function in can-connect

To help you get started, we’ve selected a few can-connect 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 canjs / can-connect / can / tag / tag.js View on Github external
// Append the resulting document fragment to the element
		domMutateNode.appendChild.call(el, frag);

		// update the nodeList with the new children so the mapping gets applied
		nodeLists.update(nodeList, el.childNodes);

		var removalDisposal = domMutate.onNodeRemoval(el, function () {
			if (!el.ownerDocument.contains(el)) {
				removalDisposal();
				nodeLists.unregister(nodeList);
			}
		});
	});
};

module.exports = connect.tag;
github bitovi-components / bit-c3 / bit-c3 / node_modules / can-connect / src / can / tag / tag.js View on Github external
// Append the resulting document fragment to the element
		can.appendChild(el, frag);

		// update the nodeList with the new children so the mapping gets applied
		can.view.nodeLists.update(nodeList, el.childNodes);

		// add to pageData

		can.one.call(el, 'removed', function() {
			can.view.nodeLists.unregister(nodeList);
		});
	});
};

module.exports = connect.tag;