Re: [whatwg] Proposal: defining script as link rel=script href=actualwaytoscript
On Thu, Jun 26, 2014 at 11:06 AM, Tim Marinin marinin...@gmail.com wrote: Most often use for tag script is to include external script through script src=somecdn.example/jquery.js, or alike. May be we could add rel=script to link tag with same behaviour as script with src. It's similiar to stylesheets: we can link external stylesheets via link and include CSS directly on page with style tag. This has obvious XSS drawbacks (similar to link rel=import). What are the upsides? -- http://annevankesteren.nl/
Re: [whatwg] Proposal: defining script as link rel=script href=actualwaytoscript
2014-06-26 14:12 GMT+04:00 Anne van Kesteren ann...@annevk.nl: On Thu, Jun 26, 2014 at 12:08 PM, Tim Marinin marinin...@gmail.com wrote: I propose exact the same behaviour, as script with src, these drawback will apply to script as well, don't they? No, script is known to link to scripts by existing filters. Why we can't use existing filters? Upsides are not functional, but semantic. It's a way to unify linking script and style, step to separate javascript from markup. That doesn't really seem like sufficient justification. The same justification as with style tag. If not, then why we need link for css, only for legacy reasons? P.S. I'm new to mail lists, should I answer to your directly or mail back to wha...@whatwg.com? Usually replies go back to the list. -- http://annevankesteren.nl/
Re: [whatwg] Proposal: defining script as link rel=script href=actualwaytoscript
On 6/26/14, 10:39 AM, Tim Marinin wrote: If not, then why we need link for css, only for legacy reasons? Pretty much, yes. If style were allowed in head, we could just do style src (and in fact Gecko had support for that at one point). -Boris
Re: [whatwg] Proposal: defining script as link rel=script href=actualwaytoscript
Отправлено с iPhone 26 июня 2014 г., в 19:31, Boris Zbarsky bzbar...@mit.edu написал(а): On 6/26/14, 10:39 AM, Tim Marinin wrote: If not, then why we need link for css, only for legacy reasons? Pretty much, yes. If style were allowed in head, we could just do style src (and in fact Gecko had support for that at one point). Do you mean if style src were supported? Because otherwise I don't understand: a lot of sites uses inline styles in head, e.g. Jsfiddle's iframe.
Re: [whatwg] Proposal: defining script as link rel=script href=actualwaytoscript
+1 to either link rel=script much more than style src=. On Thu, Jun 26, 2014 at 3:57 PM, Тимофей Маринин marinin...@gmail.com wrote: Отправлено с iPhone 26 июня 2014 г., в 19:31, Boris Zbarsky bzbar...@mit.edu написал(а): On 6/26/14, 10:39 AM, Tim Marinin wrote: If not, then why we need link for css, only for legacy reasons? Pretty much, yes. If style were allowed in head, we could just do style src (and in fact Gecko had support for that at one point). Do you mean if style src were supported? Because otherwise I don't understand: a lot of sites uses inline styles in head, e.g. Jsfiddle's iframe.
Re: [whatwg] Proposal: defining script as link rel=script href=actualwaytoscript
On 6/26/14, 2:57 PM, Тимофей Маринин wrote: Do you mean if style src were supported? No, I mean what I said. But looks like style doesn't autoclose head, in fact; I thought it did. -Boris
Re: [whatwg] Proposal: defining script as link rel=script href=actualwaytoscript
On Thu, Jun 26, 2014 at 12:09 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/26/14, 2:57 PM, Тимофей Маринин wrote: Do you mean if style src were supported? No, I mean what I said. But looks like style doesn't autoclose head, in fact; I thought it did. style is explicitly one of the five elements allowed in head. It's always been non-conforming for authors to put it in body. ~TJ