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
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.