/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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/. */
NS_IMETHODIMP
HTMLOutputElement::Reset() {
mValueModeFlag = eModeDefault; // We can't pass mDefaultValue, because it'll be truncated when // the element's descendants are changed, so pass a copy instead. const nsAutoString currentDefaultValue(mDefaultValue); return nsContentUtils::SetNodeTextContent(this, currentDefaultValue, true);
}
void HTMLOutputElement::DoneAddingChildren(bool aHaveNotified) {
mIsDoneAddingChildren = true; // We should update DefaultValue, after parsing is done.
DescendantsChanged();
}
void HTMLOutputElement::SetDefaultValue(const nsAString& aDefaultValue,
ErrorResult& aRv) {
mDefaultValue = aDefaultValue; if (mValueModeFlag == eModeDefault) { // We can't pass mDefaultValue, because it'll be truncated when // the element's descendants are changed.
aRv = nsContentUtils::SetNodeTextContent(this, aDefaultValue, true);
}
}
nsDOMTokenList* HTMLOutputElement::HtmlFor() { if (!mTokenList) {
mTokenList = new nsDOMTokenList(this, nsGkAtoms::_for);
} return mTokenList;
}
void HTMLOutputElement::ContentWillBeRemoved(nsIContent* aChild, const BatchRemovalState* aState) { if (aState && !aState->mIsFirst) { return;
} // Make sure to run this once the removal has taken place.
nsContentUtils::AddScriptRunner(
NewRunnableMethod("HTMLOutputElement::DescendantsChanged", this,
&HTMLOutputElement::DescendantsChanged));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.