<tab-panel>
<div data-tabname="one">Tab one</div>
<div data-tabname="two">Tab two</div>
<div data-tabname="three">Tab three</div>
</tab-panel>
<script>
function asTabs(node) {
let nArr = Array.from(node.childNodes);
nArr.map(node => {
console.log(node.getAttribute("data-tabname");
//далее другие манипуляции
});
};
asTabs(document.querySelector("tab-panel"));
</script>