---
Title: HTML5 Location, <base>, and SVG
Date: 2015-06-20 10:30
Subtitle: >
Making Angular and SVG xlink:href work correctly in Firefox.
Summary: >
Angular requires if you want to use HTML5's
location⦠but if you get it wrong, SVG things can and will
break under you.
Tags: [software development, angularjs, javascript]
Modified: 2015-07-02 22:00
...
For quite some time, I have been frustrated by a bug in HolyBible.com: Firefox
would not render SVGs using the ``
pattern. Today, I set aside my ongoing work on new user-facing functionality
and dedicated what working time I had to hunting down the cause of this and
fixing it at last.
I was surprised to find the culprit: the `` tag. If you don't know what
the `` tag is, you're not alone. It is *not* used all that much in
general, and I had never actually seen it on a site before starting on this
project last year.
So what went wrong? How do these two things play together?
I am using (and reusing) SVG items throughout the HolyBible.com interface,
taking advantage of the ability to define symbols and reference them with the
`