如何获取当前 LIElement 的 id,它在 activeNav() 中触发事件 e,因为我想从 navMap 中找到活动元素。
import 'dart:html';
Map navMap = new Map<String, LIElement>();
void main() {
navMap["#li-home"] = query("#li-home");
navMap["#li-about"] = query("#li-about");
navMap["#li-setting"] = query("#li-setting");
navMap["#li-home"].onClick.listen(activeNav);
navMap["#li-about"].onClick.listen(activeNav);
navMap["#li-setting"].onClick.listen(activeNav);
}
void activeNav(Event e){
// Get element #li-home from map and add class "active"
// remove the class "active" from remain LIElements in navMap