Using elements that aren't defined

53 views
Skip to first unread message

Prateek Saxena

unread,
Jul 13, 2014, 10:26:39 PM7/13/14
to polymer-dev
Hey,

While creating <leaflet-polygon> [1] and <leaflet-polyline> [2]
elements, I wanted to use a <leaflet-point> element within them to let
the user compose these objects. Everything seems to be working fine
and I am using the select attribute on the content tag [3] to get the
<leaflet-point> elements.

I haven't defined <leaflet-point> anywhere and my question is if it is
alright to do so. The element does not need any events or methods on
it other than the normal DOM ones which it should already get as a
normal element.


—prtksxna


[1] http://prtksxna.github.io/leaflet-map-component/components/leaflet-map-component/#leaflet-marker
[2] http://prtksxna.github.io/leaflet-map-component/components/leaflet-map-component/#leaflet-polyline
[3] https://github.com/prtksxna/leaflet-map-component/blob/master/leaflet-polygon-component.html#L29

Rob Dodson

unread,
Jul 14, 2014, 11:15:42 AM7/14/14
to Prateek Saxena, polymer-dev
Hm good question.

What I know is that in browsers which support Custom Elements, the <leaflet-point> element should be treated as an HTMLElement because it has a dash in its name. In browsers which don't support Custom Elements, I believe it will be treated as HTMLUnknownElement which derives from HTMLElement. I believe most modern browsers can handle HTMLUnknownElements ok. IE8 traditionally has issues with them which is why the HTML5shiv is so popular but I imagine if you're using Polymer you're aiming for browsers at IE10+


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAMi5MH6kR3i1DwWxw80QR4S4Huyet7_dF%2BbZDgSuPX9ZTE6b5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages