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: Unresolved
    • P2: Important
    • None
    • 6.7.3, 6.8.0
    • WebEngine
    • None
    • Linux/X11

    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

        For Gerrit Dashboard: QTBUG-131156
        # Subject Branch Project Status CR V

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change