jonsinat2,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script>
window.addEventListener('DOMContentLoaded', function() {
var target = document.getElementsByClassName("opa")[0].getElementsByTagName("opa")[0];
/* timer */
setInterval(function() {
target.innerHTML++
}, 500)
var observer = new MutationObserver(function() {
if(target.innerHTML == 15) {
alert("ok");observer.disconnect();
}
});
observer.observe(target, {childList: true});
});
</script>
</head>
<body>
<div class="opa"><opa>0</opa></div>
</body>
</html>