Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function makeReactComponent (tagName) {
const webComponentConstructor = skate(tagName, {
render: function (elem) {
elem.innerHTML = '<div></div>';
if (elem.hidden) {
elem.firstChild.setAttribute('aria-hidden', '');
} else {
elem.firstChild.removeAttribute('aria-hidden');
}
},
attached: function (elem) {
elem._hidden_on_attach = elem.hidden;
},
properties: {
hidden: {
set: function (elem) {
skate.render(elem);
}
export default function (name, opts) {
linkPropsToAttrsIfNotSpecified(opts.properties);
opts.render = render(opts.render);
return skate(name, opts);
}