Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Allow scripts tag to be identified by id attribute #88

Closed
jguittard opened this issue Sep 14, 2016 · 1 comment
Closed

Allow scripts tag to be identified by id attribute #88

jguittard opened this issue Sep 14, 2016 · 1 comment

Comments

@jguittard
Copy link
Contributor

jguittard commented Sep 14, 2016

Using scripts view helper (headScript or inlineScript), id attribute is ignored when generating scripts tags.

protected $optionalAttributes = [
    'charset',
    'crossorigin',
    'defer',
    'async',
    'language',
    'src',
];

Can be useful to target some scripts blocks with an html id attribute

@jguittard
Copy link
Contributor Author

Allowed by $this->headScript()->setAllowArbitraryAttributes(true);

weierophinney added a commit that referenced this issue Mar 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant