Skip to content

Instantly share code, notes, and snippets.

@tricki
Created February 25, 2021 16:56
Show Gist options
  • Save tricki/245f66fbfbe8f6b2d9faf8b2f9b399fd to your computer and use it in GitHub Desktop.
Save tricki/245f66fbfbe8f6b2d9faf8b2f9b399fd to your computer and use it in GitHub Desktop.
Example of the output of `getHostRef` for `<ion-icon name="rocket" />`
{
"$flags$": 483,
"$hostElement$": { "s-p": [] },
"$cmpMeta$": {
"$flags$": 1,
"$tagName$": "ion-icon",
"$members$": {
"mode": [1025],
"color": [1],
"ariaLabel": [1537, "aria-label"],
"ariaHidden": [513, "aria-hidden"],
"ios": [1],
"md": [1],
"flipRtl": [4, "flip-rtl"],
"name": [1],
"src": [1],
"icon": [8],
"size": [1],
"lazy": [4],
"sanitize": [4],
"svgContent": [32],
"isVisible": [32]
},
"$attrsToReflect$": [
["ariaLabel", "aria-label"],
["ariaHidden", "aria-hidden"]
],
"$watchers$": {
"name": ["loadIcon"],
"src": ["loadIcon"],
"icon": ["loadIcon"]
},
"$lazyBundleId$": "ion-icon"
},
"$instanceValues$": {},
"$renderCount$": 2,
"$onInstancePromise$": {},
"$onReadyPromise$": {},
"$ancestorComponent$": { "s-p": [{}, {}], "s-hn": "APP-ROOT" },
"$lazyInstance$": {},
"$vnode$": {
"$flags$": 4,
"$tag$": null,
"$text$": null,
"$elm$": {},
"$children$": [{ "$flags$": 0, "$tag$": "div", "$text$": null, "$elm$": { "s-hn": "ION-ICON" }, "$children$": null, "$attrs$": { "class": "icon-inner", "innerHTML": "<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"ionicon s-ion-icon\" viewBox=\"0 0 512 512\"><title>Rocket</title><path d=\"M328.85 156.79a26.69 26.69 0 1018.88 7.81 26.6 26.6 0 00-18.88-7.81z\"></path><path d=\"M477.44 50.06a.29.29 0 010-.09 20.4 20.4 0 00-15.13-15.3c-29.8-7.27-76.68.48-128.63 21.28-52.36 21-101.42 52-134.58 85.22A320.7 320.7 0 00169.55 175c-22.33-1-42 2.18-58.57 9.41-57.74 25.41-74.23 90.44-78.62 117.14a25 25 0 0027.19 29h.13l64.32-7.02c.08.82.17 1.57.24 2.26a34.36 34.36 0 009.9 20.72l31.39 31.41a34.27 34.27 0 0020.71 9.91l2.15.23-7 64.24v.13A25 25 0 00206 480a25.25 25.25 0 004.15-.34C237 475.34 302 459.05 327.34 401c7.17-16.46 10.34-36.05 9.45-58.34a314.78 314.78 0 0033.95-29.55c33.43-33.26 64.53-81.92 85.31-133.52 20.69-51.36 28.48-98.59 21.39-129.53zM370.38 224.94a58.77 58.77 0 110-83.07 58.3 58.3 0 010 83.07z\"></path><path d=\"M161.93 386.44a16 16 0 00-11 2.67c-6.39 4.37-12.81 8.69-19.29 12.9-13.11 8.52-28.79-6.44-21-20l12.15-21a16 16 0 00-15.16-24.91A61.25 61.25 0 0072 353.56c-3.66 3.67-14.79 14.81-20.78 57.26A357.94 357.94 0 0048 447.59 16 16 0 0064 464h.4a359.87 359.87 0 0036.8-3.2c42.47-6 53.61-17.14 57.27-20.8a60.49 60.49 0 0017.39-35.74 16 16 0 00-13.93-17.82z\"></path></svg>" }, "$key$": null, "$name$": null }],
"$attrs$": { "role": "img", "class": "md", "aria-label": "rocket" },
"$key$": null,
"$name$": null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment