Bug 1307710 - part2: webvtt cue voice span and language span need annotation. r=rillian
MozReview-Commit-ID: FqUMAt436ZP
--- a/dom/media/webvtt/vtt.jsm
+++ b/dom/media/webvtt/vtt.jsm
@@ -342,18 +342,18 @@ Cu.import('resource://gre/modules/Servic
function createElement(type, annotation) {
var tagName = TAG_NAME[type];
if (!tagName) {
return null;
}
var element = window.document.createElement(tagName);
element.localName = tagName;
var name = TAG_ANNOTATION[type];
- if (name && annotation) {
- element[name] = annotation.trim();
+ if (name) {
+ element[name] = annotation ? annotation.trim() : "";
}
return element;
}
var root;
if (bReturnFrag) {
root = window.document.createDocumentFragment();
} else {