Hacker News new | ask | show | jobs
by jdrc 1533 days ago
iframe is a full page. i mean some HTML code, a div or some text or a table etc. the kind of things we load with Ajax. The equivalent of <img>, but for HTML content : <remotehtml src="https://twitter.com/snip/12345678" />
1 comments

This isn't really any clearer than your earlier comment.

> iframe is a full page.

An iframe loads whatever you give it. If you give it a URL to a "full page"/"whole page", then it loads that. If the URL leads to e.g. "a div" or "a table", then that will be loaded. That's under the control of the person who's putting stuff on the other end of the URL. To repeat, there is exactly one case where this doesn't hold up: when you want the loaded content to be inline and not block-level (e.g. "some text"—and if inline content is what you meant, then you should say that instead of just giving another vague response; again, though, even if that is what you want, how would that be relevant to the use case we're talking about here: embedding tweets?)

it doesnt inherit style etc. it s also a completely different document for scripting purposes. it s also rather heavy, hard to have 100 iframes in a page
Side note: this would have been a lot easier if in response to, "do you want that snippet not to be sandboxed?" you'd just said, "yes".

What you're proposing stands little chance of being implemented, given the security implications.

it s just an idea not a proposal. it would be sandboxed, the idea is to allow html only, so as to avoid scripting. don't we do that all the time with ajax?