getAttribute method
Synchronously reads the current string value of attribute name on host.
Returns null if the attribute is not set.
final id = context.getAttribute('data-id');
Implementation
String? getAttribute(String name) => host.getAttribute(name);