renderDescriptors method

List<JasprTagDescriptor> renderDescriptors({
  1. String? currentUrl,
})

Maps rendered head tags into typed JasprTagDescriptor instances for Jaspr component trees.

Implementation

List<JasprTagDescriptor> renderDescriptors({String? currentUrl}) {
  final tags = renderHeadTags(currentUrl: currentUrl);
  return tags.map((t) {
    return JasprTagDescriptor(
      tag: t.tagName,
      attributes: t.attributes,
      textContent: t.textContent,
    );
  }).toList();
}