(componentEl, prop)
| 11072 | return source; |
| 11073 | } |
| 11074 | function parseArg(componentEl, prop) { |
| 11075 | if (typeof prop !== "string") return null; |
| 11076 | var cache = componentEl._attrsCache || (componentEl._attrsCache = {}); |
| 11077 | if (!cache[prop]) { |
| 11078 | var attrValue = componentEl.getAttribute(prop); |
| 11079 | if (attrValue == null) return null; |
| 11080 | try { |
| 11081 | cache[prop] = createParser(tokenizer2.tokenize(attrValue)).requireElement("expression"); |
| 11082 | } catch (e) { |
| 11083 | console.error("component: failed to parse attrs." + prop + ":", e.message); |
| 11084 | return null; |
| 11085 | } |
| 11086 | } |
| 11087 | return cache[prop]; |
| 11088 | } |
| 11089 | function parentContext(componentEl) { |
| 11090 | var parent = componentEl.parentElement; |
| 11091 | return parent ? runtime2.makeContext(parent, null, parent, null) : null; |
no test coverage detected