Skip to content

Commit

Permalink
fix bare-function feature onclick handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Aug 9, 2012
1 parent 237d371 commit 087ab35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/tutorial/conf_files/volvox.json
Expand Up @@ -146,7 +146,8 @@
"CDS" : "transcript-CDS",
"UTR" : "transcript-UTR"
},
"subfeatures" : true
"subfeatures" : true,
"onClick": "function() { alert('Ran arbitrary JavaScript!'); };"
},
{
"feature" : [
Expand Down
4 changes: 2 additions & 2 deletions src/JBrowse/View/Track/HTMLFeatures.js
Expand Up @@ -939,8 +939,8 @@ var HTMLFeatures = declare( BlockBased,
_makeClickHandler: function( inputSpec, context ) {
var track = this;

if( typeof spec == 'function' ) {
inputSpec = { action: spec };
if( typeof inputSpec == 'function' ) {
inputSpec = { action: inputSpec };
}

var handler = function ( evt ) {
Expand Down

0 comments on commit 087ab35

Please sign in to comment.