@@ -51,6 +51,22 @@ if ('i' !== 'I'.toLowerCase()) {
51
51
52
52
function fromCharCode ( code ) { return String . fromCharCode ( code ) ; }
53
53
54
+ /**
55
+ * Creates the element for IE8 and below to allow styling of widgets
56
+ * (http://ejohn.org/blog/html5-shiv/). This hack works only if angular is
57
+ * included synchronously at the top of the document before IE sees any
58
+ * unknown elements. See regression/issue-584.html.
59
+ *
60
+ * @param {string } elementName Name of the widget.
61
+ * @returns {string } Lowercased string.
62
+ */
63
+ function shivForIE ( elementName ) {
64
+ elementName = lowercase ( elementName ) ;
65
+ if ( msie < 9 && elementName . charAt ( 0 ) != '@' ) { // ignore attr-widgets
66
+ document . createElement ( elementName ) ;
67
+ }
68
+ return elementName ;
69
+ }
54
70
55
71
var _undefined = undefined ,
56
72
_null = null ,
@@ -91,7 +107,7 @@ var _undefined = undefined,
91
107
/** @name angular.directive */
92
108
angularDirective = extensionMap ( angular , 'directive' ) ,
93
109
/** @name angular.widget */
94
- angularWidget = extensionMap ( angular , 'widget' , lowercase ) ,
110
+ angularWidget = extensionMap ( angular , 'widget' , shivForIE ) ,
95
111
/** @name angular.filter */
96
112
angularFilter = extensionMap ( angular , 'filter' ) ,
97
113
/** @name angular.service */
0 commit comments