| 350 | } |
| 351 | |
| 352 | element(id: HfId): ElementHandle { |
| 353 | return { |
| 354 | id, |
| 355 | setStyle: (styles) => this.dispatch({ type: "setStyle", target: id, styles }), |
| 356 | setText: (value) => this.dispatch({ type: "setText", target: id, value }), |
| 357 | setAttribute: (name, value) => |
| 358 | this.dispatch({ type: "setAttribute", target: id, name, value }), |
| 359 | setTiming: (timing) => this.dispatch({ type: "setTiming", target: id, ...timing }), |
| 360 | removeElement: () => this.dispatch({ type: "removeElement", target: id }), |
| 361 | }; |
| 362 | } |
| 363 | |
| 364 | getSelection(): string[] { |
| 365 | return [...this.currentSelection]; |