cyber,
http://www.chromium.org/getting-involved/dev-channel
Logo, babbles же false, вот и не всплывают события выше element
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>…</title>
</head>
<body>
<button onclick="doo(this)">click me</button><div id="some"></div>
<script>
var element = document.documentElement, bubbles = true;
var observer = new WebKitMutationObserver(function (mutations) {
mutations.forEach(attrModified);
});
observer.observe(element, { attributes: true, subtree: bubbles });
function attrModified(mutation) {
var name = mutation.attributeName,
newValue = mutation.target.getAttribute(name),
oldValue = mutation.oldValue;
alert([name, newValue, oldValue]);
}
function doo(el) {
var some = document.getElementById('some');
some.style.border = '1px solid red';
some.setAttribute('style', 'border: 1px solid red');
}
</script>
</body>
</html>