Nathan Knowler on Nostr: Custom element idea: declarative debugger element. Effectively, it’d be the browser ...
Custom element idea: declarative debugger element. Effectively, it’d be the browser developer tool’s “Break On” setting for elements, but something you could add to your HTML as you develop. It’d be a `debugger` statement wrapped in a `MutationObserver` that would be configured by the custom element’s API. It could probably do a bit more than what the dev tools provide, but that could be the start.
Rough API:
```html
<break-on type="subtree-modifications">
<div>Element subject to subtree changes</div>
</break-on>
<break-on type="attribute-modifications" attributefilter="class">
<div>Element subject to attribute modifications</div>
</break-on>
```
#WebComponents
Rough API:
```html
<break-on type="subtree-modifications">
<div>Element subject to subtree changes</div>
</break-on>
<break-on type="attribute-modifications" attributefilter="class">
<div>Element subject to attribute modifications</div>
</break-on>
```
#WebComponents