Open Bug 1168733 Opened 9 years ago Updated 2 years ago

InvalidStateError when using google api in xsl stylesheet

Categories

(Core :: XSLT, defect)

38 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: raptory2003, Unassigned)

Details

Attachments

(1 file)

Attached file stylesheet.xsl
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150513174244

Steps to reproduce:

Open local xml file: 
    <?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>

    <node1>
      <node2 name="content">
      </node2>

      <node3 name="conten1">
      </node3>
    </node1>

xsl file stylesheet.xsl - code taken dirrectly from Google examples
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="html"/>
        <xsl:template match="/">
       
    <html>
      <head>
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
        <script type="text/javascript">
          google.load("visualization", "1", {packages:["corechart"]});
          google.setOnLoadCallback(drawChart);
          function drawChart() {

            var data = google.visualization.arrayToDataTable([
              ['Task', 'Hours per Day'],
              ['Work',     11],
              ['Eat',      2],
              ['Commute',  2],
              ['Watch TV', 2],
              ['Sleep',    7]
            ]);

            var options = {
              title: 'My Daily Activities'
            };

            var chart = new google.visualization.PieChart(document.getElementById('piechart'));

            chart.draw(data, options);
          }
        </script>
      </head>
      <body>
        <div id="piechart" style="width: 900px; height: 500px;"></div>
      </body>
    </html>
      </xsl:template>

    </xsl:stylesheet>



Actual results:

Pie chart is not displayed.
InvalidStateError error in console


Expected results:

Pie chart loaded successfully

note: with IE it is OK - pie chart loaded
Attachment #8611054 - Attachment mime type: text/xml → text/xsl
Attachment #8611054 - Attachment mime type: text/xsl → application/xml
Component: Untriaged → XSLT
Product: Firefox → Core
In an effort to clean up the Untriaged list, I have triaged as Core -> XSLT. If you feel this is the incorrect component, please correct as needed. Thanks.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: