Skip to content
Snippets Groups Projects
Commit a60c3a47 authored by catch's avatar catch
Browse files

Issue #3095113 by gapple, longwave, ravi.shankar, Deepak Goyal, anmolgoyal74,...

Issue #3095113 by gapple, longwave, ravi.shankar, Deepak Goyal, anmolgoyal74, Sahana _N, geek-merlin, catch, lauriii, Meenakshi.g: Deprecate IE conditional comments support
parent 3d7dd76c
No related branches found
No related tags found
7 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards,!16Draft: Resolve #2081585 "History storage"
......@@ -150,6 +150,8 @@ public static function preRenderConditionalComments($element) {
return $element;
}
@trigger_error('Support for IE Conditional Comments is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3102997', E_USER_DEPRECATED);
// Determine the conditional comment expression for Internet Explorer to
// evaluate.
if ($browsers['IE'] === TRUE) {
......
......@@ -251,9 +251,11 @@ public function testNoCache() {
/**
* Tests adding JavaScript within conditional comments.
*
* @group legacy
* @see \Drupal\Core\Render\Element\HtmlTag::preRenderConditionalComments()
*/
public function testBrowserConditionalComments() {
$this->expectDeprecation('Support for IE Conditional Comments is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3102997');
$default_query_string = $this->container->get('state')->get('system.css_js_query_string') ?: '0';
$build['#attached']['library'][] = 'common_test/browsers';
......
......@@ -206,22 +206,13 @@ public function providerPreRenderHtmlTag() {
$element = [
'#tag' => 'link',
];
$tags['link'] = [HtmlTag::preRenderConditionalComments($element), '<link />' . "\n"];
// Conditional link.
$element = [
'#tag' => 'link',
'#browsers' => [
'IE' => TRUE,
'!IE' => FALSE,
],
];
$tags['conditional-link'] = [HtmlTag::preRenderConditionalComments($element), "\n" . '<!--[if IE]>' . "\n" . '<link />' . "\n" . '<![endif]-->' . "\n"];
$tags['link'] = [$element, '<link />' . "\n"];
return $tags;
}
/**
* @group legacy
* @covers ::preRenderConditionalComments
* @dataProvider providerPreRenderConditionalComments
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment