Comparing version 5.0.0 to 5.0.1
{ | ||
"name": "hypertabs", | ||
"description": "tabbed interface with hyperscript", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"homepage": "https://github.com/dominictarr/hypertabs", | ||
@@ -6,0 +6,0 @@ "repository": { |
20
tabs.js
@@ -43,2 +43,8 @@ var h = require('hyperscript') | ||
function build_tab (page) { | ||
function close () { | ||
page.parentNode.removeChild(page) | ||
tabs.removeChild(tab) | ||
onClose && onClose(page.firstChild) | ||
} | ||
var link = h('a.link', { | ||
@@ -57,2 +63,9 @@ href: '#', | ||
} | ||
}, | ||
onauxclick: function (ev) { | ||
if(ev.which && ev.which === 2) { | ||
ev.preventDefault() | ||
ev.stopPropagation() | ||
close() | ||
} | ||
}}, | ||
@@ -66,6 +79,3 @@ getTitle(page) | ||
ev.stopPropagation() | ||
page.parentNode.removeChild(page) | ||
tabs.removeChild(tab) | ||
onClose && onClose(page.firstChild) | ||
close() | ||
}}, | ||
@@ -133,1 +143,3 @@ 'x' | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25379
392