S
S
Sergey Andreev2015-07-03 22:49:55
HTML
Sergey Andreev, 2015-07-03 22:49:55

How do browsers react to custom tags?

There was a question: Is it possible to use your tags for layout, for example, etc.
I know that there is a Custom Elements standard, but it is about something else, it can be done officially there.
But as far as I know now, almost all browsers can work with such tags, hang styles on them and catch events.
In general: what problems can there be, do all browsers catch events and are there any display problems?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Petrov, 2015-07-04
@Petroveg

The only problem I had was adding elements in IE8 with innerHTML (the parsing didn't work correctly). Inserting the created element with createElement() solves this problem. Well, don't forget to specify display for such elements in CSS .
There are no problems with event generation and listening in any browser, and the profit is obvious for those who create modules that are embedded in different sites. Including with govnostils, registered for tag names.
Look at Yandex Maps - the whole structure is built using the ymaps tag .

I
Ivan, 2015-07-03
@LiguidCool

Problems will be primarily with older browsers. So far it's not very common.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question