Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 2x 2x 2x 2x 2x 2x 2x 2x 8225x 4865x 8225x 4494x 4468x 4276x 510x 510x 510x 4355x 4355x 4355x | /** @import { SvelteNode } from '#compiler' */ import { is_element_node } from '../phases/nodes.js'; import { is_text_attribute } from './ast.js'; /** * @param {SvelteNode} node */ export function determine_slot(node) { if (!is_element_node(node)) return null; for (const attribute of node.attributes) { if (attribute.type !== 'Attribute') continue; if (attribute.name !== 'slot') continue; if (!is_text_attribute(attribute)) continue; return /** @type {string} */ (attribute.value[0].data); } return null; } |