<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Provide WebKitWebView::frame-loaded signal"
   href="https://bugs.webkit.org/show_bug.cgi?id=157899">157899</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[GTK] Provide WebKitWebView::frame-loaded signal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit Gtk
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mcrha&#64;redhat.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bugs-noreply&#64;webkitgtk.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While working on the Evolution port to the WebKit2, I realized that there is a problem when to attach DOM bindings, especially when the web view contains iframe-s (and these iframe-s can be formatted mail messages, which also contain iframe-s). The only current way of noticing when the loading was finished is to listen to WebKitWebView::load-event and add the bindings when the load_event == WEBKIT_LOAD_FINISHED, but it's a matter of luck whether the internal iframe-s will be loaded or not at that time.

Due to this, I propose a new signal to be added to the WebKitWebView with a name &quot;frame-loaded&quot;, with a prototype:

    void
    frame_loaded (WebKitWebView *web_view,
                  const gchar *frame_src, /* 'src' attribute content of the loaded (i)frame */
                  const gchar *frame_id,  /* 'id' attribute content of the loaded (i)frame */
                  gpointer user_data)

which will be called whenever any (i)frame will be in a state equivalent of the load_event == WEBKIT_LOAD_FINISHED of the main WebKitWebView.
That way, the subscriber to this signal will know that everything is ready and the DOM bindings can be safely done on that particular frame.

I was told that you have a similar request from someone else already, but I didn't find it in the bugzilla (maybe I used wrong search term), thus I filled it myself.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>