Skip to content

Commit

Permalink
Fix #13754: Require element.style for support tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Apr 9, 2013
1 parent fdaf214 commit c6a694e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/support.js
Expand Up @@ -8,9 +8,9 @@ jQuery.support = (function( support ) {
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";

// Finish early in limited (non-browser) environments
all = div.getElementsByTagName("*");
all = div.getElementsByTagName("*") || [];

This comment has been minimized.

Copy link
@rwaldron

rwaldron Apr 9, 2013

Member

I wonder if we could use the first-born NodeList.prototype here?

This comment has been minimized.

Copy link
@gibson042

gibson042 Apr 9, 2013

Author Member

In 1.x? 2.x does this a different way; it might work here too but I'm not sure.

This comment has been minimized.

Copy link
@dmethvin

dmethvin Apr 9, 2013

Member

The .prototype is out because of oldIE's lack of them. Our main problem seems to be that we're stumbling across this nearly every release because we lack a test to catch it. Based on bzbarky's comment maybe we could create a test case doing a transformed document in an iframe and a few basic sanity tests. There's already an open ticket for this but I was thinking in terms of running ALL the tests in XHTML which we don't need to do for catching this.

This comment has been minimized.

Copy link
@rwaldron

rwaldron Apr 9, 2013

Member

...I was just sort of thinking out loud.

@dmethvin +1 to:

Based on bzbarky's comment maybe we could create a test case doing a transformed document in an iframe and a few basic sanity tests.

a = div.getElementsByTagName("a")[ 0 ];
if ( !all || !a || !all.length ) {
if ( !a || !a.style || !all.length ) {
return support;
}

Expand Down

0 comments on commit c6a694e

Please sign in to comment.