(parser)
| 9017 | this.args = { type: transitionType }; |
| 9018 | } |
| 9019 | static parse(parser) { |
| 9020 | if (!parser.matchToken("start")) return; |
| 9021 | parser.matchToken("a"); |
| 9022 | parser.requireToken("view"); |
| 9023 | parser.requireToken("transition"); |
| 9024 | parser.matchToken("using"); |
| 9025 | var typeToken = parser.matchTokenType("STRING"); |
| 9026 | var transitionType = typeToken ? typeToken.value : null; |
| 9027 | var body = parser.requireElement("commandList"); |
| 9028 | var tick = new ViewTransitionTick(); |
| 9029 | tick.next = body; |
| 9030 | var endCmd = new ViewTransitionEnd(); |
| 9031 | var last = body; |
| 9032 | while (last.next) last = last.next; |
| 9033 | last.next = endCmd; |
| 9034 | if (parser.hasMore()) { |
| 9035 | parser.requireToken("end"); |
| 9036 | } |
| 9037 | insertAborts(body, false); |
| 9038 | var cmd = new _ViewTransitionCommand(tick, transitionType); |
| 9039 | parser.setParent(tick, cmd); |
| 9040 | parser.setParent(body, cmd); |
| 9041 | endCmd.parent = cmd; |
| 9042 | return cmd; |
| 9043 | } |
| 9044 | resolve(context, { type }) { |
| 9045 | if (!document.startViewTransition) { |
| 9046 | return this.body; |
nothing calls this directly
no test coverage detected