HTML in XUL, yay or nay?

I just started looking into XUL after deciding that handling the interface integration for my addon through the message system on an iframe would be too cumbersome.
At this point I had already build most of my addon’s interface in an HTML document.
So looking around I crossed this page, where it is explained that HTML elements can be created in XUL. Neat!
But, it also says:

You should avoid using HTML elements in XUL files if you can.

Without actually going into any reasons why…

So does anyone know more about this?
I’ve messed around a bit with porting the HTML layout to XUL.
And with a bit of extra struggle I seem to be able to convert most of it.
But actually knowing what the concerns are that I’m trying to avoid would be great.

Good quesiton I actually didn’t think much of it but I had a situation where I absolutely had to.

I had to put a canvas in a xul window, and if it didnt have html namespace the canvas wouldn’t work.

So you can use html in xul but if you do, set style of display to -moz-box and set width and height on the elements.

Here is the chat from IRC where I learned this, I don’t know the exact inner workings on why moz box helps but just do it, maybe someone else can help here:

00:52:45: Don’t mix XUL and HTML.
01:00:24: dont the canvas elements have to be html?
01:09:51: It’s not about improved performance. It’s about XUL and HTML box models not being designed to mix.
01:10:38: what do i do? :frowning: if i dont use html:canvas then the stuff doesnt draw
01:12:04: You can use a canvas, you just have to be careful.
01:19:31: Just make sure that it’s absolutely sized, and ideally it should be display:-moz-box

I’ve been setting my XUL box elements to display:block, which I think is the exact opposite, haha :smile:

What I take away from the chat log is that I need to watch out for layout problems between XUL and HTML.
I’ve noticed that the newtab page mixes XUL and HTML without any extra effort.
But maybe I’ll switch back to the iframe anyway, just for some peace of mind.