Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-74133

[browserstack-integration] Extract inline script block in com/browserstack/automate/ci/jenkins/AutomateTestAction/summary.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 38
      ----
      <script type="text/javascript">
                              var testAction = <st:bind value="${it}"/>
                              var sessionId = <st:bind value="${session.id}" />
                              //<![CDATA[
                              var startTime = (new Date).valueOf();
                              function onLoadIFrame() {
                                  testAction.iframeLoadTime((new Date).valueOf() - startTime);
                              }
      
                              var iframeElem = document.getElementById('browserstack-iframe-' + sessionId);
                              if (iframeElem.addEventListener) {
                                  iframeElem.addEventListener('load', onLoadIFrame, true);
                              } else if (iframeElem.attachEvent) {
                                  iframeElem.attachEvent('onload', onLoadIFrame);
                              }
                              //]]>
                          </script>
      ----
      

      Solution

      https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks

            Unassigned Unassigned
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: