On Dec 3, 2013, at 8:02 PM, Eric Bidelman <ericbidel...@google.com> wrote:
> On Tue, Dec 3, 2013 at 7:03 PM, Ryosuke Niwa <rn...@apple.com> wrote:
> On Oct 9, 2013, at 10:42 AM, Scott Miles <sjmi...@google.com> wrote:
> 
>> On Mon, Oct 7, 2013 at 3:24 AM, James Graham <ja...@hoppipolla.co.uk> wrote:
>> On 06/10/13 17:25, Dimitri Glazkov wrote:
>> 
>>     And, if the script is executed against the global/window object of
>>     the main document, can and should you be able to access the imported
>>     document?
>> 
>> 
>> You can and you should. HTML Imports are effectively #include for the Web.
>> 
>> Yes, that sounds like a good description of the problem :) It is rather 
>> noticable that no one making programming languages today replicates the 
>> #include mechanism, and I think html-imports has some of the same design 
>> flaws that makes #include unpopular.
>> 
>> I think authors will find it very hard to write code in an environment where 
>> simple functions like document.getElementById don't actually work on the 
>> document containing the script, but on some other document that they can't 
>> see.
>> 
>> It's true we are introducing something new, but this actually one of The 
>> Good Parts. Imports are not the main document, they are satellite to the 
>> main document. The main document maintains primacy, but your imports can act 
>> on it. So far, we haven't really had any problems with developers on this 
>> point.
> 
> We should be asking this question to an average Web developer who has never 
> heard of HTML imports before.
> 
> I speak with web developers on a regular basis. Most are agreeable with 
> distinction and generally positive about the possibilities it opens up.
> 
> http://robdodson.me/blog/2013/08/20/exploring-html-imports/

One minute of googling gave me an article that talks about HTML rel=import and 
says this is "the complex part" and that "[t]he spec doesn't address this 
issue":
http://www.stevesouders.com/blog/2013/11/16/async-ads-with-html-imports/

The article then proceeds to mention that there are many 3rd party ads that use 
document.write and suggests to manually override document.write when the entire 
problem wouldn't exist if the "document" was the imported document as expected 
by authors as mentioned by the article.

- R. Niwa

Reply via email to