-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp-d-r.ts
30 lines (27 loc) · 819 Bytes
/
p-d-r.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import {PD} from './p-d.js';
import { define } from 'trans-render/define.js';
import {PDNavDown} from './PDNavDown.js';
/**
* Pass data from one element down the DOM tree to other elements, including children, recursively.
* Only drills into children if p-d-if matches css of p-d-r element.
* @element p-d-r
*/
export class PDR extends PD{
static is = 'p-d-r';
static attributeProps: any = ({} : PDR) => (<any>PD).props;
getMatches(pd: PDNavDown){
return pd.getMatches();
}
newNavDown(){
const bndApply = this.applyProps.bind(this);
const pdnd = new PDNavDown(this, this.to, this.careOf, bndApply, this.m!);
pdnd.root = this;
return pdnd;
}
}
define(PDR);
declare global {
interface HTMLElementTagNameMap {
"p-d-r": PDR,
}
}