3

I am trying to work around a cross-origin problem with Chrome which is produced by having an iFrame tag with a src attribute that has data uri in it. I am wondering if I can work around this with the srcdoc attribute. Which is why I am curious to if the default content type for a srcdoc 'text/html'?

1 Answer 1

4

Yes, the default content type is in fact text/html. According to the HTML5 specification,

If the srcdoc attribute is specified:

Navigate the element's browsing context to a resource whose Content-Type is text/html, whose URL is about:srcdoc, and whose data consists of the value of the attribute. The resulting Document must be considered an iframe srcdoc document.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.