startTagIsIndex method
void
startTagIsIndex(
- StartTagToken token
Implementation
void startTagIsIndex(StartTagToken token) {
parser.parseError(token.span, 'deprecated-tag', {'name': 'isindex'});
if (tree.formPointer != null) {
return;
}
final formAttrs = LinkedHashMap<Object, String>();
final dataAction = token.data['action'];
if (dataAction != null) {
formAttrs['action'] = dataAction;
}
processStartTag(StartTagToken('form', data: formAttrs));
processStartTag(StartTagToken('hr', data: LinkedHashMap<Object, String>()));
processStartTag(
StartTagToken('label', data: LinkedHashMap<Object, String>()));
// XXX Localization ...
var prompt = token.data['prompt'];
prompt ??= 'This is a searchable index. Enter search keywords: ';
processCharacters(CharactersToken(prompt));
final attributes = LinkedHashMap<Object, String>.from(token.data);
attributes.remove('action');
attributes.remove('prompt');
attributes['name'] = 'isindex';
processStartTag(StartTagToken('input',
data: attributes, selfClosing: token.selfClosing));
processEndTag(EndTagToken('label'));
processStartTag(StartTagToken('hr', data: LinkedHashMap<Object, String>()));
processEndTag(EndTagToken('form'));
}