|
|
@ -430,14 +430,19 @@ export default class Element extends Node {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
validate_special_cases() {
|
|
|
|
validate_special_cases() {
|
|
|
|
const { component, attributes } = this;
|
|
|
|
const { component, attributes, handlers } = this;
|
|
|
|
|
|
|
|
|
|
|
|
const attribute_map = new Map();
|
|
|
|
const attribute_map = new Map();
|
|
|
|
|
|
|
|
const handlers_map = new Map();
|
|
|
|
|
|
|
|
|
|
|
|
attributes.forEach(attribute => (
|
|
|
|
attributes.forEach(attribute => (
|
|
|
|
attribute_map.set(attribute.name, attribute)
|
|
|
|
attribute_map.set(attribute.name, attribute)
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handlers.forEach(handler => (
|
|
|
|
|
|
|
|
handlers_map.set(handler.name, handler)
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
if (this.name === 'a') {
|
|
|
|
if (this.name === 'a') {
|
|
|
|
const href_attribute = attribute_map.get('href') || attribute_map.get('xlink:href');
|
|
|
|
const href_attribute = attribute_map.get('href') || attribute_map.get('xlink:href');
|
|
|
|
const id_attribute = attribute_map.get('id');
|
|
|
|
const id_attribute = attribute_map.get('id');
|
|
|
|