Generated file

Copy as Markdown

Other Tools

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
/* THIS FILE IS AUTOGENERATED FROM TextUpdateEvent.webidl BY Codegen.py - DO NOT EDIT */
#include "EventBinding.h"
#include "TextUpdateEvent.h"
#include "TextUpdateEventBinding.h"
#include "js/GCAPI.h"
#include "mozilla/HoldDropJSObjects.h"
#include "mozilla/dom/BindingCallContext.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrimitiveConversions.h"
#include "mozilla/dom/TextUpdateEvent.h"
namespace mozilla::dom {
TextUpdateEvent::TextUpdateEvent(mozilla::dom::EventTarget* aOwner)
: Event(aOwner, nullptr, nullptr)
{
}
TextUpdateEvent::~TextUpdateEvent()
{
}
TextUpdateEvent*
TextUpdateEvent::AsTextUpdateEvent()
{
return this;
}
JSObject*
TextUpdateEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return TextUpdateEvent_Binding::Wrap(aCx, this, aGivenProto);
}
already_AddRefed<TextUpdateEvent>
TextUpdateEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const TextUpdateEventInit& aOptions)
{
RefPtr<TextUpdateEvent> e = new TextUpdateEvent(aOwner);
bool trusted = e->Init(aOwner);
e->InitEvent(aType, aOptions.mBubbles, aOptions.mCancelable);
e->mUpdateRangeStart = aOptions.mUpdateRangeStart;
e->mUpdateRangeEnd = aOptions.mUpdateRangeEnd;
e->mText = aOptions.mText;
e->mSelectionStart = aOptions.mSelectionStart;
e->mSelectionEnd = aOptions.mSelectionEnd;
e->SetTrusted(trusted);
e->SetComposed(aOptions.mComposed);
return e.forget();
}
already_AddRefed<TextUpdateEvent>
TextUpdateEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const TextUpdateEventInit& aOptions)
{
nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports());
return Constructor(owner, aType, aOptions);
}
uint32_t
TextUpdateEvent::UpdateRangeStart() const
{
return mUpdateRangeStart;
}
uint32_t
TextUpdateEvent::UpdateRangeEnd() const
{
return mUpdateRangeEnd;
}
void
TextUpdateEvent::GetText(nsString& aRetVal) const
{
aRetVal = mText;
}
uint32_t
TextUpdateEvent::SelectionStart() const
{
return mSelectionStart;
}
uint32_t
TextUpdateEvent::SelectionEnd() const
{
return mSelectionEnd;
}
} // namespace mozilla::dom