Reputation: 1268
In HTML, all elements share a set of global attributes, like class
, id
, the data-
specification, a common set of Javascript events and a couple of things here and there.
But how about SVG? I'm trying to build a trait in PHP able to represent the very core of a SVG element (so I can build every SVG object with this core set of attributes and add the specific attributes for that object in its own declaration).
The SVG section in the Mozilla Developer Network has a full-blown page with lots of attributes, but the only core attributes, according to their documentation, are id
, xml:base
, xml:lang
, xml:space
I see the class
attribute is on the navigation links, but not referred in the attributes category section, which confuses me a lot.
Isn't the class
attribute a global one like in HTML? And what about the Javascript events?
Upvotes: 1
Views: 177
Reputation: 124249
The class attribute is not global feFuncA doesn't have it for instance, nor does that element support javascript events. There are others.
Attributes are listed here in a list that shows which elements support them.
Upvotes: 1