diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-01-04 19:48:05 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-01-26 15:50:17 -0500 |
commit | 59c26110c1124844b5c6820573a8cb4807f1151a (patch) | |
tree | 5ac0f001cc097235e5e44c4c16fa9ab120c9b76d /dom/base/Element.h | |
parent | a2c7b5f1d971cd529e65179ad97d39750e956644 (diff) | |
download | UXP-59c26110c1124844b5c6820573a8cb4807f1151a.tar UXP-59c26110c1124844b5c6820573a8cb4807f1151a.tar.gz UXP-59c26110c1124844b5c6820573a8cb4807f1151a.tar.lz UXP-59c26110c1124844b5c6820573a8cb4807f1151a.tar.xz UXP-59c26110c1124844b5c6820573a8cb4807f1151a.zip |
Bug 1347634 - GetCustomElementData and SetCustomElementData don't need to be virtual;
Tag UXP Issue #1344
Diffstat (limited to 'dom/base/Element.h')
-rw-r--r-- | dom/base/Element.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/dom/base/Element.h b/dom/base/Element.h index ce84b74fb..6d8bc823e 100644 --- a/dom/base/Element.h +++ b/dom/base/Element.h @@ -390,6 +390,29 @@ public: Directionality GetComputedDirectionality() const; + /** + * Gets the custom element data used by web components custom element. + * Custom element data is created at the first attempt to enqueue a callback. + * + * @return The custom element data or null if none. + */ + inline CustomElementData* GetCustomElementData() const + { + nsDOMSlots *slots = GetExistingDOMSlots(); + if (slots) { + return slots->mCustomElementData; + } + return nullptr; + } + + /** + * Sets the custom element data, ownership of the + * callback data is taken by this element. + * + * @param aData The custom element data. + */ + void SetCustomElementData(CustomElementData* aData); + protected: /** * Method to get the _intrinsic_ content state of this element. This is the |