From b9748f459a64383febf189860c1f1f55ef69160a Mon Sep 17 00:00:00 2001 From: rwldrn Date: Thu, 24 Mar 2011 11:10:09 -0400 Subject: [PATCH] [#450] Support non-specific elements; updates unit tests --- popcorn.js | 3 ++- test/index.html | 2 +- test/popcorn.unit.js | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) 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 @@ -