Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymer is undefined in IE11 #905

Closed
alitavector opened this issue Nov 10, 2014 · 1 comment
Closed

Polymer is undefined in IE11 #905

alitavector opened this issue Nov 10, 2014 · 1 comment

Comments

@alitavector
Copy link

In Line 46, Polymer('add-node', {
It strange to find Polymer is undefined error in IE developer tools console.

<!doctype html>
<head>
<link rel="import" href="/bower_components/polymer/polymer.html">
<link rel="import" href="/bower_components/paper-input/paper-input.html">
<link rel="import" href="/bower_components/paper-button/paper-button.html">
<link rel="import" href="/bower_components/core-ajax/core-ajax.html">
</head>
<body>
<polymer-element name="add-node" attributes="url item">
  <template>
    <style>
      paper-input {
        color:#000000;
        text-align:left;
      }
      paper-button.colored {
        background:#000000;
        color:#ffffff;
      }
      .centered {
        display:block;
        text-align:center;
        width:100%;
      }
    </style>
    <geo-location latitude="{{lat}}" longitude="{{lng}}"></geo-location>
    <form id="form_1">
      <paper-input floatingLabel label="Name:" value="{{item.name}}"></paper-input>
      <paper-input floatingLabel label="Street Address:" value="{{item.address}}"></paper-input>
      <paper-input floatingLabel label="City" value="{{item.city}}"></paper-input>
      <paper-input floatingLabel label="State" value="{{item.state}}"></paper-input>
      <paper-input floatingLabel label="Zip" value="{{item.zip}}"></paper-input>
      <paper-input floatingLabel label="Phone:" value="{{item.phone}}"></paper-input>
      <paper-input floatingLabel label="Description:" value="{{item.description}}"></paper-input>
      <div class="centered">
        <paper-button on-tap="{{doSend}}" raisedButton class="colored" label="Save"></paper-button>
      </div>
    </form>
    <core-ajax id="ajax" method="POST" url="r.php" params="{{item}}"
    on-core-response="{{handleResponse}}"
    response="{{resp}}"></core-ajax>
    <template repeat="{{resp}}">{{data}}</template>
    {{resp}} print status
  </template>
  <script>
    Polymer('add-node', {     //"Polymer is undefined" error in IE developer tools console.
      created: function() {
        this.item = {};
      },
      doSend: function() {
        this.$.ajax.go();
      },
      respChanged: function() {
        console.log("test");
      },
      handleResponse: function(e) {
        //console.log(e.detail.response);
      }
    });
  </script>
</polymer-element>
<add-node></add-node>
</body>
</html>
@arthurevans
Copy link

To run on IE, you need the polyfills (platform.js).

For example:

http://jsbin.com/bomuwi/1/edit?html,console,output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants