mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-13 01:22:11 +00:00
feat(ChipBarView): Parse renderer_context
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
import { YTNode, type ObservedArray } from '../helpers.js';
|
||||
import { Parser, type RawNode } from '../index.js';
|
||||
import { RendererContext } from '../misc.js';
|
||||
import ChipView from './ChipView.js';
|
||||
|
||||
export default class ChipBarView extends YTNode {
|
||||
static type = 'ChipBarView';
|
||||
|
||||
chips: ObservedArray<ChipView>;
|
||||
public chips: ObservedArray<ChipView>;
|
||||
public chip_bar_state_entity_key?: string;
|
||||
public renderer_context?: RendererContext;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.chips = Parser.parseArray(data.chips, ChipView);
|
||||
this.chip_bar_state_entity_key = data.chipBarStateEntityKey;
|
||||
|
||||
if ('rendererContext' in data) {
|
||||
this.renderer_context = new RendererContext(data.rendererContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user