$doc->addHeadLink('/images/banners/ad-background-1.svg','preload','rel',
array('fetchpriority'=>'high', 'as'=>'image', 'type'=>'image/svg+xml'));
$doc->addHeadLink('/images/banners/ad-background-2.svg','preload','rel',
array('fetchpriority'=>'high', 'as'=>'image', 'type'=>'image/svg+xml'));
<link href="/images/banners/ad-background-1.svg" rel="preload" fetchpriority="high" as="image" type="image/svg+xml">
<link href="/images/banners/ad-background-2.svg" rel="preload" fetchpriority="high" as="image" type="image/svg+xml">
<link href="/images/banners/ad-background-1.svg" rel="preload" fetchpriority="high" as="image" type="image/svg+xml">
the second and subsequent entries are ignored !
Joomla 5.0.3
following test give some hints about where is the problem. It looks like the method does not allow more than 1 entry with the same combination of attributes.
Following code:
$doc->addHeadLink('/images/banners/ad-background-1.svg','preload','rel',
array('fetchpriority'=>'high', 'as'=>'image', 'type'=>'image/svg+xml1'));
$doc->addHeadLink('/images/banners/ad-background-2.svg','preload','rel',
array('fetchpriority'=>'high', 'as'=>'image', 'type'=>'image/svg+xml2'));
produces result without that problem:
<link href="/images/banners/ad-background-1.svg" rel="preload" fetchpriority="high" as="image" type="image/svg+xml1">
<link href="/images/banners/ad-background-2.svg" rel="preload" fetchpriority="high" as="image" type="image/svg+xml2">
it looks like the bug prevent to add more than 1 entry with the same combination of attribites
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|