@@ -90,23 +90,13 @@ function assertJasmineSuites() {
9090
9191/*
9292 * tests about the contents of source (and lib) files:
93- * - check that we don't have any features that break in IE
9493 * - check that we don't use getComputedStyle unexpectedly
9594 * - check that require statements use lowercase (to match assertFileNames)
9695 * or match the case of the source file
9796 */
9897function assertSrcContents ( ) {
9998 var logs = [ ] ;
10099
101- // These are forbidden in IE *only in SVG* but since
102- // that's 99% of what we do here, we'll forbid them entirely
103- // until there's some HTML use case where we need them.
104- // (not sure what we'd do then, but we'd think of something!)
105- var IE_SVG_BLACK_LIST = [ 'innerHTML' , 'parentElement' , 'children' ] ;
106-
107- // Forbidden in IE in any context
108- var IE_BLACK_LIST = [ 'classList' ] ;
109-
110100 // require'd built-in modules
111101 var BUILTINS = [ 'events' ] ;
112102
@@ -122,28 +112,11 @@ function assertSrcContents() {
122112 // look for .classList
123113 if ( node . type === 'MemberExpression' ) {
124114 var source = node . source ( ) ;
125- var parts = source . split ( '.' ) ;
126- var lastPart = parts [ parts . length - 1 ] ;
127115
128116 if ( source === 'Math.sign' ) {
129117 logs . push ( file + ' : contains Math.sign (IE failure)' ) ;
130118 } else if ( source === 'window.getComputedStyle' ) {
131119 getComputedStyleCnt ++ ;
132- } else if ( IE_BLACK_LIST . indexOf ( lastPart ) !== - 1 ) {
133- logs . push ( file + ' : contains .' + lastPart + ' (IE failure)' ) ;
134- } else if ( IE_SVG_BLACK_LIST . indexOf ( lastPart ) !== - 1 ) {
135- // add special case for sunburst, icicle and treemap where we use 'children'
136- // off the d3-hierarchy output
137- var dirParts = path . dirname ( file ) . split ( path . sep ) ;
138- var filename = dirParts [ dirParts . length - 1 ] ;
139- var isSunburstOrIcicleOrTreemap =
140- filename === 'sunburst' ||
141- filename === 'icicle' ||
142- filename === 'treemap' ;
143- var isLinkedToObject = [ 'pt' , 'd' , 'parent' , 'node' ] . indexOf ( parts [ parts . length - 2 ] ) !== - 1 ;
144- if ( ! ( isSunburstOrIcicleOrTreemap && isLinkedToObject ) ) {
145- logs . push ( file + ' : contains .' + lastPart + ' (IE failure in SVG)' ) ;
146- }
147120 }
148121 } else if ( node . type === 'Identifier' && node . source ( ) === 'getComputedStyle' ) {
149122 if ( node . parent . source ( ) !== 'window.getComputedStyle' ) {
0 commit comments