// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.sdk;

/**
 * Exposes additional data if variable is a property of object and its property descriptor
 * is available.
 */
public interface JsObjectProperty extends JsVariable {
  /**
   * @return whether property described as 'writable'
   */
  boolean isWritable();

  /**
   * @return property getter or null
   */
  JsFunction getGetter();

  /**
   * @return property setter or null
   */
  JsFunction getSetter();

  /**
   * @return whether property described as 'configurable'
   */
  boolean isConfigurable();

  /**
   * @return whether property described as 'enumerable'
   */
  boolean isEnumerable();

  /**
   * Asynchronously evaluates property getter and returns property value.
   */
  RelayOk evaluateGet(JsEvaluateContext.EvaluateCallback callback, SyncCallback syncCallback);
}

@@ -483,31 +483,201 @@
 erty getter 
-or null
+value (function or undefined) or null if not an accessor property%0A   */%0A  JsValue getGetter();%0A%0A  /**%0A   * @return %7B@link #getGetter()%7D result as function or null if cannot cast
 %0A   */%0A  JsF
@@ -685,32 +685,42 @@
 nction getGetter
+AsFunction
 ();%0A%0A  /**%0A   * 
@@ -743,23 +743,81 @@
  setter 
-or null
+value (function or undefined) or null if not an accessor property
 %0A   */%0A 
@@ -815,32 +815,29 @@
 y%0A   */%0A  Js
-Function
+Value
  getSetter()
@@ -1112,16 +1112,157 @@
 y value.
+ Must only be used%0A   * if %7B@link #getGetterAsFunction()%7D returns not null; otherwise behavior is undefined and%0A   * implementation-specific.
 %0A   */%0A 

Change property descriptor interface