Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-131156

Scripts injected on DocumentReady and Deferred are not always executed on google.com

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.2, 6.9.0 FF
    • 6.7.3, 6.8.0
    • WebEngine
    • None
    • Linux/X11
    • 6c8fe2667 (dev), a7cce88f2 (6.8)

    Description

      To reproduce

      1. Use the simplebrowser example
      2. In the WebPage constructor add

          QWebEngineScript script1;
          script1.setInjectionPoint(QWebEngineScript::DocumentCreation);
          script1.setSourceCode("console.log('DocumentCreation')");
          QWebEngineScript script2;
          script2.setInjectionPoint(QWebEngineScript::Deferred);
          script2.setSourceCode("console.log('Deferred')");
          QWebEngineScript script3;
          script3.setInjectionPoint(QWebEngineScript::DocumentReady);
          script3.setSourceCode("console.log('DocumentReady')");
          scripts().insert(\{script1, script2, script3});
      
      

      3. Run the project and open the dev tools console
      4. On most pages the console will log

      DocumentCreation
      DocumentReady
      Deferred
      

      5. Navigate to https://www.google.com
      6. Click on the Gmail link in the top right corner
      7. Check console and see that only DocumentCreation was printed

      This happens in multiple places when navigating inside google.com or when a google.com url is the first to be loaded in a QWebEnginePage.

      Possibly related to QTBUG-94924

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kchehlarski Kaloyan Chehlarski
            bterrier Benjamin Terrier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes