From d436f9b767ca5001b12b09b5d9d5d321a320fd70 Mon Sep 17 00:00:00 2001 From: rwldrn Date: Tue, 8 Feb 2011 12:46:20 -0500 Subject: [PATCH] [#310] Inject id to video if none exists --- popcorn.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/popcorn.js b/popcorn.js index 87c06db..e8ebee7 100644 --- a/popcorn.js +++ b/popcorn.js @@ -962,6 +962,11 @@ hasDataSources = false, dataSources, dataTemp, dataType, parserFn, popcornVideo; + // Ensure that the DOM has an id, satisfies #310 + if ( !video.id ) { + video.id = Popcorn.guid( "__popcorn" ); + } + // Ensure we're looking at a dom node and that it has an id // otherwise Popcorn won't be able to find the video element if ( video.nodeType && video.nodeType === 1 && video.id ) { -- 2.43.0