Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/204516
Change subject: Polyfill node types in IE8 ...................................................................... Polyfill node types in IE8 mediawiki.jqueryMsg.js:1144 was blowing up on Node.TEXT_NODE because window.Node is undefined in IE8. The exception was ignored and this was causing a message containing {{PLURAL...}} or {{GENDER...}} to be rendered as is. Bug: T87118 Change-Id: I8c5c2ae74b68eeabd93bb5b81a3061bcb31f6549 --- M resources/Resources.php A resources/src/polyfill-nodeTypes-ie8.js 2 files changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/16/204516/1 diff --git a/resources/Resources.php b/resources/Resources.php index a17b678..ed1da02 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1268,6 +1268,7 @@ 'dependencies' => array( 'mediawiki.util', 'mediawiki.language', + 'ie8-shim', ), 'targets' => array( 'desktop', 'mobile' ), ), @@ -1694,6 +1695,13 @@ 'skipFunction' => 'resources/src/es5-skip.js', ), + /* ie8-shim */ + 'ie8-shim' => array( + 'scripts' => array( + 'resources/src/polyfill-nodeTypes-ie8.js', + ), + ), + /* OOjs */ 'oojs' => array( 'scripts' => array( diff --git a/resources/src/polyfill-nodeTypes-ie8.js b/resources/src/polyfill-nodeTypes-ie8.js new file mode 100644 index 0000000..e881f97 --- /dev/null +++ b/resources/src/polyfill-nodeTypes-ie8.js @@ -0,0 +1,19 @@ +/** + * Adds window.Node to IE8 according to: + * http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247 + */ + +window.Node = window.Node || { + ELEMENT_NODE: 1, + ATTRIBUTE_NODE: 2, + TEXT_NODE: 3, + CDATA_SECTION_NODE: 4, + ENTITY_REFERENCE_NODE: 5, + ENTITY_NODE: 6, + PROCESSING_INSTRUCTION_NODE: 7, + COMMENT_NODE: 8, + DOCUMENT_NODE: 9, + DOCUMENT_TYPE_NODE: 10, + DOCUMENT_FRAGMENT_NODE: 11, + NOTATION_NODE: 12 +}; -- To view, visit https://gerrit.wikimedia.org/r/204516 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c5c2ae74b68eeabd93bb5b81a3061bcb31f6549 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Sbisson <sbis...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits