Attribute to give link[rel=import] JS files access to the DOM
Reported by
seandenn...@gmail.com,
Jun 3 2016
|
|||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.19 Safari/537.36 Steps to reproduce the problem: Not particularly a problem. What is the expected behavior? What went wrong? Javascript files inside a link[rel=import] html file return undefined when they try to access document.body. link[rel=import] is a great way for libraries to transport many components over in a single file, but currently lack access to the main DOM. Did this work before? N/A Chrome version: 52.0.2743.19 Channel: dev OS Version: 10.0 Flash Version: Shockwave Flash 22.0 r0 Whether this would be enabled behind an attribute or by default, it would greatly increase the portability of large libraries that have many subcomponents. Allowing developers to package their libraries into a single import with many internal imports would be an amazing feature, especially with the adaptation of http/2 However, as it stands right now, JS files do not have access to the DOM
,
Jun 3 2016
Marking the above issue as Untriaged as this is a feature request. Thank you!
,
Jun 3 2016
Not V8 related and likely something intentional regarding security.
,
Jun 6 2016
,
Jun 8 2016
can you provide a repro? Is this maybe because the link is in the head and the body just doesn't exist yet?
,
Jun 8 2016
@jochen, that fixed it, but that changes the question to whether or not link will get a defer attribute?
,
Jun 8 2016
I don't think we're going to add any more features to html imports, but html modules (which use the script tag) will solve this.
,
Jun 8 2016
I only ask about links getting a defer because I was packaging CSS together with the script and making an easily digestable way to add libraries without having to make users worry about dependency files
,
Jun 24 2016
,
Jul 29 2016
Assign hayato@ for triage
,
Aug 1 2016
HTML Imports -> kochi@
,
Aug 1 2016
,
Aug 9 2016
seandenny77@, as esprehn@ commented on #7, we don't add any new feature on the current HTML Imports. Could you file a bug at https://github.com/w3c/webcomponents/issues so other vendors can take part in designing html modules? At GitHub we can continue discussing about details of how it behaves when "defer" attribute is specified.
,
Aug 9 2016
I think the original question was resolved by jochen@'s comment on #5.
,
Aug 17 2016
Let me close this. seandenny77@, feel free to file any issue at github (URL in comment #13).
,
Aug 17 2016
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by dtapu...@chromium.org
, Jun 3 2016Labels: -Type-Bug Type-Feature