Setting sourceURL for .js extracted from element definition

39 views
Skip to first unread message

Jan Miksovsky

unread,
Oct 18, 2013, 5:01:46 PM10/18/13
to polym...@googlegroups.com
I notice that the sourceURL for JavaScript which Polymer extracts from element <script> tags have a generated name like "1234.js", while those of Polymer's own elements (e.g., polymer-collapse.html) get a friendly, matching name like polymer-collapse.js. A key advantage of the latter is that the name is stable across reloads, allowing one to set breakpoints that don't disappear when you need to reload updated source.

Where's the magic that produces these stable .js names? Can it be applied to elements other than Polymer's own?

Jan Miksovsky

unread,
Apr 8, 2014, 1:42:35 PM4/8/14
to polym...@googlegroups.com
Wait! Did this just get fixed?!?

It looks like Polymer's now giving extracted scripts meaningful, persistent names, like "my-element.html" instead of "1234.js". This means we can now set useful breakpoints that persist across page reloads.

Waahoo! I didn't see that change mentioned in release notes, but just wanted to say thanks to whoever fixed that.
Reply all
Reply to author
Forward
0 new messages