Issue with ObservableObject and ECMAScript 5 get/set feature

3 posts, 1 answers
  1. Answer
    olivier
    olivier avatar
    14 posts
    Member since:
    Feb 2011

    Posted 30 Dec 2013 Link to this post

    Hello Kendo team!

    I'm facing an issue when I try to use ES5 get/set functions within an ObservableObject. Please check this JSBin for details. I was expecting to be invoke get or set functions on my observable object. However, apparently those functions are not recognized as part of the object structure.

    Any clues about this problem?

    Thanks!
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 31 Dec 2013 Link to this post

    Hi,

    Currently the extend method doesn't copy the ES5 getters and setters. You can however use Object.defineProperty like this: http://jsbin.com/AsinUjU/1/edit

    Regards,
    Atanas Korchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. olivier
    olivier avatar
    14 posts
    Member since:
    Feb 2011

    Posted 31 Dec 2013 Link to this post

    Object.defineProperty made the trick!

    Thank you so much and Happy New Year!
Back to Top