Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions src/widget-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1296,41 +1296,6 @@ class MyWidget extends WidgetBase<WidgetProperties> {
}
```

#### Matches

The `Matches` meta determines if the target of a DOM event matches a particular virtual DOM key.

```ts
const matches = this.meta(Matches).get('root', evt);
```

This allows a widget to not have to _know_ anything about the real DOM when dealing with events that may have bubbled
up from child DOM. For example to determine if the containing node in the widget was clicked on, versus the child node,
you would do something like this:

```ts
class TestWidget extends WidgetBase<WidgetProperties> {
private _onclick(evt: MouseEvent) {
if (this.meta(Matches).get('root', evt)) {
console.log('The root node was clicked on.');
}
}

render() {
const dimensions = this.meta(Matches).get('root');

return v('div', {
key: 'root'
onclick: this._onclick
}, [
v('div', {
innerHTML: 'Hello World'
})
]);
}
}
```

#### Resize

The resize observer meta uses the latest [`ResizeObserver`](https://wicg.github.io/ResizeObserver/) within Dojo based widgets.
Expand Down
12 changes: 0 additions & 12 deletions src/widget-core/meta/Matches.ts

This file was deleted.

183 changes: 0 additions & 183 deletions tests/widget-core/unit/meta/Matches.ts

This file was deleted.

1 change: 0 additions & 1 deletion tests/widget-core/unit/meta/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ import './Dimensions';
import './Drag';
import './Focus';
import './Intersection';
import './Matches';
import './Resize';
import './WebAnimation';