parcoursup/node_modules/riot/esm/core/bind-dom-node-to-component-instance.js

14 lines
480 B
JavaScript
Raw Normal View History

2023-03-05 13:23:23 +01:00
/* Riot WIP, @license MIT */
import { DOM_COMPONENT_INSTANCE_PROPERTY } from '@riotjs/util';
/**
* Bind a DOM node to its component object
* @param {HTMLElement} node - html node mounted
* @param {Object} component - Riot.js component object
* @returns {Object} the component object received as second argument
*/
const bindDOMNodeToComponentInstance = (node, component) => node[DOM_COMPONENT_INSTANCE_PROPERTY] = component;
export { bindDOMNodeToComponentInstance };