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

HTMLImports fails on IE9 #229

Closed
positlabs opened this issue Aug 5, 2013 · 6 comments
Closed

HTMLImports fails on IE9 #229

positlabs opened this issue Aug 5, 2013 · 6 comments
Assignees

Comments

@positlabs
Copy link

Trying out a simple tag, but it seems like it's not importing.

<element name="test-tag">
  <template>
    <p>
      I am an instance of test-tag
    </p>
  </template>
  <script type="text/javascript">
    if (this != window) {
        var element = this;
        xtag.register(this, {
          lifecycle: {
            created: function () {
              var template = element.querySelector("template");
              this.innerHTML = template.innerHTML;
            }
          }
        });
    }
  </script>
</element>
@LouisStAmour
Copy link

Haven't tried it myself, but at a glance, isn't it supposed to be "polymer-element"?

@positlabs
Copy link
Author

I'm not using polymer elements, I'm using x-tags. The import should succeed regardless of what the contents are, yeah?

I am going to try pulling all of the x-tags dependencies (HTMLImports included) and rebuilding to see if the problem has been resolved.

@LouisStAmour
Copy link

The example posted to the X-Tag blog seems a bit modified from yours:

http://www.x-tags.org/blog

Most of the X-tag demos appear to avoid the element object entirely, sticking to JavaScript declarations.

Yet every example test I could find in the polymer project for creating elements appears to use "polymer-element" almost exclusively. Perhaps since the blog post and reference above seems to exclusively mention X-Tag, this bug should first go to https://github.com/x-tag/core ? I don't see anything above that screams "Polymer" at me, so ....

@positlabs
Copy link
Author

It may be an issue with x-tags, but it looks like it's failing because of HTMLImports. Here is a simplified test-case.

Anyway, I will see what the x-tags guys have to say about it.

<!doctype html>
<html>
<head>

  <link rel="import" href="hello-world.html"/>
  <script type="text/javascript" src="../../lib/x-tag-core.js"></script>

  <script type="text/javascript">

    window.onload = function () {
      console.log("window loaded");
    };

    window.addEventListener('HTMLImportsLoaded', function () {
      console.log("HTMLImportsLoaded");
    });

    window.addEventListener('WebComponentsReady', function () {
      console.log("WebComponentsReady");
    });

  </script>
</head>

<body>
</body>
</html>

hello-world.html

<script type="text/javascript">
  // this doesn't get logged in IE9
  console.log("hello world!");
</script>

@ghost ghost assigned ebidel and sorvell Sep 25, 2013
@addyosmani
Copy link
Member

@positlabs were you able to get a satisfactory answer from the XTags team?

@positlabs
Copy link
Author

Yes, it was an issue with the xmlhttp request using response instead of responseText. I submitted a pull request to the HTMLImports repo

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

5 participants