- From: Shane McCarron via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 24 Feb 2010 18:24:04 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/ReSpec.js/js In directory hutz:/tmp/cvs-serv23539 Modified Files: respec.js Log Message: Changed so data-oninclude does not get executed if the include fails. Index: respec.js =================================================================== RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- respec.js 24 Feb 2010 15:45:37 -0000 1.91 +++ respec.js 24 Feb 2010 18:24:02 -0000 1.92 @@ -363,19 +363,19 @@ var div = divs[i]; var URI = div.getAttribute('data-include'); var content = this._readFile(URI) ; - var flist = div.getAttribute('data-oninclude'); - if (flist) { - var methods = flist.split(/\s+/) ; - for (var j = 0; j < methods.length; j++) { - var call = 'content = ' + methods[j] + '(this,content)' ; - try { - eval(call) ; - } catch (e) { - warning('call to ' + call + ' failed with ' + e) ; + if (content) { + var flist = div.getAttribute('data-oninclude'); + if (flist) { + var methods = flist.split(/\s+/) ; + for (var j = 0; j < methods.length; j++) { + var call = 'content = ' + methods[j] + '(this,content)' ; + try { + eval(call) ; + } catch (e) { + warning('call to ' + call + ' failed with ' + e) ; + } } } - } - if (content) { div.innerHTML = content ; } }
Received on Wednesday, 24 February 2010 18:24:08 UTC