* Extracts the encoded ShadowRoot ID from the object. * * @param {?} obj The object to extract the ID from. * @return {string} the extracted ID. * @throws {TypeError} if the object is not a valid encoded ID.
(obj)
| 3231 | * @throws {TypeError} if the object is not a valid encoded ID. |
| 3232 | */ |
| 3233 | static extractId(obj) { |
| 3234 | if (obj && typeof obj === 'object') { |
| 3235 | if (typeof obj[SHADOW_ROOT_ID_KEY] === 'string') { |
| 3236 | return obj[SHADOW_ROOT_ID_KEY] |
| 3237 | } |
| 3238 | } |
| 3239 | throw new TypeError('object is not a ShadowRoot ID') |
| 3240 | } |
| 3241 | |
| 3242 | /** |
| 3243 | * @param {?} obj the object to test. |
nothing calls this directly
no outgoing calls
no test coverage detected