$document->addScript(file.js, 'text/x-template', 'modal-template')
result could be forexample:
Title |
|
||||||
Labels |
Added:
?
|
Category | ⇒ | com_tags JavaScript |
Use the $attribs
param of HTMLHelper::script()
or Document::addScript()
to add attributes such as these. This feature is not supported on addScriptDeclaration
and a pull request adding it would be welcome.
Status | New | ⇒ | Discussion |
Document::addScript( ) does not have the $attribs param, it has $url, $type
, $defer and $async
Kian William
On Wed, Jul 25, 2018 at 4:40 PM, Michael Babker notifications@github.com
wrote:
Use the $attribs param of HTMLHelper::script() or Document::addScript()
to add attributes such as these. This feature is not supported on
addScriptDeclaration and a pull request adding it would be welcome.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#21253 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO1hTAtVS8NWrxiu43iyZMxIWOufaxKOks5uKGBJgaJpZM4VfxEU
.
Then you are on a massively outdated release as the signature was changed at 3.7.0 to have the $attribs
param.
Actually before sending this request I mentioned it in Joomla Forum :
https://forum.joomla.org/viewtopic.php?f=706&t=963885
to be sure. Thanks for the information
Kian William
On Wed, Jul 25, 2018 at 11:15 PM, Michael Babker notifications@github.com
wrote:
Then you are on a massively outdated release as the signature was changed
at 3.7.0 to have the $attribs param.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#21253 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO1hTJ2nxaXrtn56JEDFWYvMnwq5Raztks5uKLzMgaJpZM4VfxEU
.also addScriptDeclaration does not have $attribs yet, does it?
@KianWilliam Please close this issue if solved. Thanks.
Also addScriptDeclaration does not have $attribs param, does it?
Kian William
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-26 03:45:03 |
Closed_By | ⇒ | KianWilliam |
Please ALWAYS use the JHtml! It's the prefered API for the static assets and already supports what you need here