/** @file JSMOMContentListCustom.cpp
 *
 * Copyright (C) Espial Limited 2014 - Company confidential - All rights reserved.
 *
 */

#include "config.h"

#if ENABLE(RMAI)

#include "MOMContentList.h"
#include "JSMOMContentList.h"
#include <runtime/PropertyName.h>

using namespace JSC;

namespace WebCore {

bool JSMOMContentList::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
{
	RefPtr<MOMContentItem> item = wrapped().namedItem(propertyNameToAtomicString(propertyName));
    if (!item)
        return false;

    value = toJS(exec, globalObject(), item.get());
    return true;
}

} // namespace WebCore

#endif // ENABLE(RMAI)
