(tag: MetaDefinition)
| 186 | } |
| 187 | |
| 188 | function validateMetaDefinition(tag: MetaDefinition): void { |
| 189 | for (const prop of Object.keys(tag)) { |
| 190 | const attributeName = getMetaKeyMap(prop); |
| 191 | if (attributeName.toLowerCase().startsWith('on')) { |
| 192 | throw new RuntimeError( |
| 193 | RuntimeErrorCode.INVALID_EVENT_ATTRIBUTE, |
| 194 | (typeof ngDevMode === 'undefined' || ngDevMode) && |
| 195 | `The Meta service does not allow setting event handler attribute '${attributeName}' for security reasons.`, |
| 196 | ); |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | function parseSelector(tag: MetaDefinition): string { |
| 202 | const attr: string = tag.name ? 'name' : 'property'; |
no test coverage detected