* @return {!ActionService}
()
| 25 | * @return {!ActionService} |
| 26 | */ |
| 27 | function actionService() { |
| 28 | const win = { |
| 29 | document: { |
| 30 | body: {}, |
| 31 | head: { |
| 32 | nodeType: /* ELEMENT */ 1, |
| 33 | querySelector: () => null, |
| 34 | querySelectorAll: () => [], |
| 35 | }, |
| 36 | }, |
| 37 | __AMP_SERVICES: { |
| 38 | vsync: {obj: {}, ctor: Object}, |
| 39 | }, |
| 40 | performance: new FakePerformance(window), |
| 41 | }; |
| 42 | return new ActionService(new AmpDocSingle(win), document); |
| 43 | } |
| 44 | |
| 45 | function createExecElement(id, enqueAction, defaultActionAlias) { |
| 46 | const execElement = document.createElement('amp-element'); |