本文整理汇总了C++中HTMLTextAreaElement::value方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLTextAreaElement::value方法的具体用法?C++ HTMLTextAreaElement::value怎么用?C++ HTMLTextAreaElement::value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTextAreaElement
的用法示例。
在下文中一共展示了HTMLTextAreaElement::value方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getValueProperty
JSValue* JSHTMLTextAreaElement::getValueProperty(ExecState* exec, int token) const
{
switch (token) {
case DefaultValueAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsString(exec, imp->defaultValue());
}
case FormAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return toJS(exec, WTF::getPtr(imp->form()));
}
case AccessKeyAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsString(exec, imp->accessKey());
}
case ColsAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsNumber(exec, imp->cols());
}
case DisabledAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsBoolean(imp->disabled());
}
case AutofocusAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsBoolean(imp->autofocus());
}
case NameAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsString(exec, imp->name());
}
case ReadOnlyAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsBoolean(imp->readOnly());
}
case RowsAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsNumber(exec, imp->rows());
}
case TypeAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsString(exec, imp->type());
}
case ValueAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsString(exec, imp->value());
}
case SelectionStartAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsNumber(exec, imp->selectionStart());
}
case SelectionEndAttrNum: {
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(impl());
return jsNumber(exec, imp->selectionEnd());
}
case ConstructorAttrNum:
return getConstructor(exec);
}
return 0;
}
示例2: value
HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::value(
/* [retval][out] */ BSTR* result)
{
ASSERT(m_element && m_element->hasTagName(textareaTag));
HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element);
WTF::String valueString = textareaElement->value();
*result = BString(valueString.characters(), valueString.length()).release();
if (valueString.length() && !*result)
return E_OUTOFMEMORY;
return S_OK;
}
示例3: updateFromElement
void RenderTextControlMultiLine::updateFromElement()
{
createSubtreeIfNeeded(0);
RenderTextControl::updateFromElement();
HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(node());
if (m_placeholderVisible)
setInnerTextValue(textArea->getAttribute(HTMLNames::placeholderAttr));
else
setInnerTextValue(textArea->value());
}
示例4: value
HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::value(
/* [retval][out] */ BSTR* result)
{
ASSERT(m_element && isHTMLTextAreaElement(m_element));
HTMLTextAreaElement* textareaElement = toHTMLTextAreaElement(m_element);
WTF::String valueString = textareaElement->value();
*result = BString(valueString).release();
if (valueString.length() && !*result)
return E_OUTOFMEMORY;
return S_OK;
}
示例5: valueAttrGetter
static v8::Handle<v8::Value> valueAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLTextAreaElement.value._get");
HTMLTextAreaElement* imp = V8HTMLTextAreaElement::toNative(info.Holder());
return v8String(imp->value());
}
示例6: value
const char* DOMHTMLTextAreaElement::value()
{
ASSERT(m_element && m_element->hasTagName(textareaTag));
HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element);
return strdup(textareaElement->value().utf8().data());
}
示例7: jsHTMLTextAreaElementValue
JSValue jsHTMLTextAreaElementValue(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
UNUSED_PARAM(exec);
HTMLTextAreaElement* imp = static_cast<HTMLTextAreaElement*>(static_cast<JSHTMLTextAreaElement*>(asObject(slot.slotBase()))->impl());
return jsString(exec, imp->value());
}
示例8: value
WebCore::String DOMHTMLTextAreaElement::value()
{
ASSERT(m_element && m_element->hasTagName(textareaTag));
HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element);
return textareaElement->value();
}