parse method

  1. @nonVirtual
MetaInfo parse(
  1. Element htmlHead
)

Resolve rich information metadata from given htmlHead which is <head> Element in HTML.

This method should not be override. Instead, all data apply must be done under resolveMetaTags.

Implementation

@nonVirtual
MetaInfo parse(Element htmlHead) {
  final MetaInfoParser metaParser = MetaInfoParser()..markInitalized();
  final Iterable<PropertyPair> metaTagsProp = htmlHead
      .querySelectorAll(
          r'meta[property^="' + propertyNamePrefix + r':"][content]')
      .map((e) {
    final attr = e.attributes;

    return (attr['property']!, attr['content']!);
  });

  resolveMetaTags(metaParser, UnmodifiableListView(metaTagsProp));

  return metaParser.compile();
}