Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to convert dom element to isc object?

    For example I have a ISC label with class 'echart_box' .
    Ican get this element by var el = document.querySelector('.echart_box');
    How to convert it to isc object so that I can call the drawing functions as I want.

    #2
    Hi,
    You can use this technique:
    var el = eval(document.querySelector(".echart_box").getAttribute("eventProxy"));

    This way you will have isc object. BTW, it doesn't seem like a good practice to select an element by its class. You should consider a more distinctive way to do that (by id\name).

    Comment


      #3
      Originally posted by kshamir View Post
      Hi,
      You can use this technique:
      var el = eval(document.querySelector(".echart_box").getAttribute("eventProxy"));

      This way you will have isc object. BTW, it doesn't seem like a good practice to select an element by its class. You should consider a more distinctive way to do that (by id\name).
      But the Id is generate by isc... how to map it outside the isc lifecycle?
      I.e. I have a draw js after label rendered. In that cycle, can I get the isc ID?

      Comment


        #4
        See the documentation for Automated Testing. The DOM generated by SmartClient is considered internal details, because we need to change it occasionally to work around browser bugs. But via the Automated Testing system we provide stable "locators" for generated elements.

        Comment

        Working...
        X