Files
YouTube.js/src/parser/classes/RichSection.ts
Luan d8f731b2fa feat(RichRenderers): Parse more UI elements
YouTube is currently A/B testing a new You/Library page that uses RichShelf nodes instead of Shelf. There are no major visual changes, other than the page being much more responsive due to how RichShelf is styled.
2025-04-05 03:40:11 -03:00

20 lines
476 B
TypeScript

import { YTNode } from '../helpers.js';
import { Parser, type RawNode } from '../index.js';
export default class RichSection extends YTNode {
static type = 'RichSection';
public content: YTNode;
public full_bleed: boolean;
public target_id?: string;
constructor(data: RawNode) {
super();
this.content = Parser.parseItem(data.content);
this.full_bleed = !!data.fullBleed;
if ('targetId' in data) {
this.target_id = data.targetId;
}
}
}