summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLSlotElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html/HTMLSlotElement.cpp')
-rw-r--r--dom/html/HTMLSlotElement.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/dom/html/HTMLSlotElement.cpp b/dom/html/HTMLSlotElement.cpp
index b13729a09..18b8ef87b 100644
--- a/dom/html/HTMLSlotElement.cpp
+++ b/dom/html/HTMLSlotElement.cpp
@@ -4,6 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#include "mozilla/dom/DocGroup.h"
#include "mozilla/dom/HTMLSlotElement.h"
#include "mozilla/dom/HTMLSlotElementBinding.h"
#include "mozilla/dom/HTMLUnknownElement.h"
@@ -204,6 +205,26 @@ HTMLSlotElement::ClearAssignedNodes()
mAssignedNodes.Clear();
}
+void
+HTMLSlotElement::EnqueueSlotChangeEvent() const
+{
+ DocGroup* docGroup = OwnerDoc()->GetDocGroup();
+ if (!docGroup) {
+ return;
+ }
+
+ docGroup->SignalSlotChange(this);
+}
+
+void
+HTMLSlotElement::FireSlotChangeEvent()
+{
+ nsContentUtils::DispatchTrustedEvent(OwnerDoc(),
+ static_cast<nsIContent*>(this),
+ NS_LITERAL_STRING("slotchange"), true,
+ false);
+}
+
JSObject*
HTMLSlotElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{