Mercurial > hg > webaudioevaluationtool
comparison js/specification.js @ 2550:15b42e98b06c
Added extra null-string check for <interface> name attribute
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Thu, 17 Nov 2016 15:04:26 +0000 |
parents | 464c6c6692d6 |
children | 13a0b65143a6 |
comparison
equal
deleted
inserted
replaced
2549:c5fd47349a4f | 2550:15b42e98b06c |
---|---|
395 } | 395 } |
396 }; | 396 }; |
397 | 397 |
398 this.encode = function (doc) { | 398 this.encode = function (doc) { |
399 var node = doc.createElement("interface"); | 399 var node = doc.createElement("interface"); |
400 if (typeof name == "string") | 400 if (typeof name == "string" && name.length > 0) |
401 node.setAttribute("name", this.name); | 401 node.setAttribute("name", this.name); |
402 if (typeof this.title == "string") { | 402 if (typeof this.title == "string") { |
403 var titleNode = doc.createElement("title"); | 403 var titleNode = doc.createElement("title"); |
404 titleNode.textContent = this.title; | 404 titleNode.textContent = this.title; |
405 node.appendChild(titleNode); | 405 node.appendChild(titleNode); |