(parser)
| 8567 | this.args = { type: transitionType }; |
| 8568 | } |
| 8569 | static parse(parser) { |
| 8570 | if (!parser.matchToken("start")) return; |
| 8571 | parser.matchToken("a"); |
| 8572 | parser.requireToken("view"); |
| 8573 | parser.requireToken("transition"); |
| 8574 | parser.matchToken("using"); |
| 8575 | var typeToken = parser.matchTokenType("STRING"); |
| 8576 | var transitionType = typeToken ? typeToken.value : null; |
| 8577 | var body = parser.requireElement("commandList"); |
| 8578 | var tick = new ViewTransitionTick(); |
| 8579 | tick.next = body; |
| 8580 | var endCmd = new ViewTransitionEnd(); |
| 8581 | var last = body; |
| 8582 | while (last.next) last = last.next; |
| 8583 | last.next = endCmd; |
| 8584 | if (parser.hasMore()) { |
| 8585 | parser.requireToken("end"); |
| 8586 | } |
| 8587 | insertAborts(body, false); |
| 8588 | var cmd = new _ViewTransitionCommand(tick, transitionType); |
| 8589 | parser.setParent(tick, cmd); |
| 8590 | parser.setParent(body, cmd); |
| 8591 | endCmd.parent = cmd; |
| 8592 | return cmd; |
| 8593 | } |
| 8594 | resolve(context, { type }) { |
| 8595 | if (!document.startViewTransition) { |
| 8596 | return this.body; |
nothing calls this directly
no test coverage detected