1
1

SayAction.ts 496 B

123456789101112131415
  1. /// <reference path="../Say.ts" />
  2. class SayAction extends Say {
  3. public async getPureElements () : Promise<Array<Element | Text>> {
  4. let paragraphs = await this.getParagraphs();
  5. let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
  6. let b = document.createElement("b");
  7. b.classList.add("action");
  8. elements.forEach((element) => {
  9. b.appendChild(element);
  10. });
  11. return [b];
  12. }
  13. }