Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getNode() {
if (isDOM) {
return elementToTree(cachedNode)
}
const output = renderer.getRenderOutput()
return {
nodeType: nodeTypeFromType(cachedNode.type),
type: cachedNode.type,
props: cachedNode.props,
key: ensureKeyOrUndefined(cachedNode.key),
ref: cachedNode.ref,
instance: renderer._instance,
rendered: Array.isArray(output)
? flatten(output).map(elementToTree)
: elementToTree(output),
}
},
simulateEvent(node, event, ...args) {
getNode() {
if (isDOM) {
return elementToTree(cachedNode);
}
const output = renderer.getRenderOutput();
return {
nodeType: nodeTypeFromType(cachedNode.type),
type: cachedNode.type,
props: cachedNode.props,
key: ensureKeyOrUndefined(cachedNode.key),
ref: cachedNode.ref,
instance: renderer._instance,
rendered: Array.isArray(output)
? flatten(output).map(elementToTree)
: elementToTree(output),
};
},
simulateEvent(node, event, ...args) {
getNode() {
if (isDOM) {
return elementToTree(cachedNode)
}
const output = renderer.getRenderOutput()
return {
nodeType: nodeTypeFromType(cachedNode.type),
type: cachedNode.type,
props: cachedNode.props,
key: ensureKeyOrUndefined(cachedNode.key),
ref: cachedNode.ref,
instance: renderer._instance,
rendered: Array.isArray(output)
? flatten(output).map(elementToTree)
: elementToTree(output),
}
},
simulateEvent(node, event, ...args) {
function nodeTypeFromType(type) {
if (type === Portal) {
return 'portal';
}
return utilNodeTypeFromType(type);
}
function nodeTypeFromType(type) {
if (type === Portal) {
return 'portal';
}
return utilNodeTypeFromType(type);
}
function nodeTypeFromType(type) {
if (type === Portal) {
return 'portal';
}
return utilNodeTypeFromType(type);
}
getNode() {
if (isDOM) {
return elementToTree(cachedNode);
}
const output = renderer.getRenderOutput();
return {
nodeType: nodeTypeFromType(cachedNode.type),
type: cachedNode.type,
props: cachedNode.props,
key: ensureKeyOrUndefined(cachedNode.key),
ref: cachedNode.ref,
instance: renderer._instance,
rendered: Array.isArray(output)
? flatten(output).map(elementToTree)
: elementToTree(output),
};
},
simulateEvent(node, event, ...args) {