Вопрос

Following this answer, I was able to insert some text with Firefox like this

css

body
{
  -moz-binding: url(foo.xml#bar);
}

foo.xml

<bindings xmlns="http://www.mozilla.org/xbl">
  <binding id="bar">
    <content>
      Hello world
    </content>
  </binding>
</bindings>

However I could not find a way to insert HTML rather text using this method.

Это было полезно?

Решение

It appears that I just need to declare the XHTML namespace

<bindings xmlns="http://www.mozilla.org/xbl"
    xmlns:html="http://www.w3.org/1999/xhtml">
  <binding id="bar">
    <content>
      <html:b>
        Hello world
      </html:b>
    </content>
  </binding>
</bindings>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top