From: rwldrn Date: Thu, 24 Mar 2011 15:10:09 +0000 (-0400) Subject: [#450] Support non-specific elements; updates unit tests X-Git-Tag: v0.5~38^2~2^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b9748f459a64383febf189860c1f1f55ef69160a;p=popcorn-js.git [#450] Support non-specific elements; updates unit tests --- diff --git a/popcorn.js b/popcorn.js index e12fa5a..56cbcb0 100644 --- a/popcorn.js +++ b/popcorn.js @@ -1101,8 +1101,9 @@ document.addEventListener( "DOMContentLoaded", function () { + // Supports non-specific elements var dataAttr = "data-timeline-sources", - medias = document.querySelectorAll( "video,audio" ); + medias = document.querySelectorAll( "[" + dataAttr + "]" ); Popcorn.forEach( medias, function( idx, key ) { diff --git a/test/index.html b/test/index.html index 77eb56b..c075015 100644 --- a/test/index.html +++ b/test/index.html @@ -47,7 +47,7 @@ -