Git Product home page Git Product logo

meteor-polymer-event-test's Introduction

Meteor Polymer TemplateEvent Test

Testing to see how to get meteor template events to work

Background

I was finding that in a basic Meteor app with a template include that once you include webcomponents.js in the header, events that are set in a meteor template stop firing in Safari and Firefox. Chrome still works.

So if you do this

<body>
  {{> hello}}
</body>

and this

Template.hello.events
  # Will not fire if webcomponents.js is loaded
  'click button': ->
    console.log("template click event")

The template events will not fire in non chrome browsers! Events set up via jQuery will still fire.

But if you change the template to this so the included template is in some block.

<body>
  <div>
    {{> hello}}
  </div>
</body>

then they work.

Example Site: http://polymer-event-test.meteor.com

Branches

  • Header insert (main branch) - Via Bower and links in head.

  • Compatibility - Polymer in client compatibility

  • Package - Add polymer as a package

  • Inject Initial - Inject the polymer script so it loads before Meteor

  • Famous Wrapped

  • No Polymer - Reference

  • Iron Router

meteor-polymer-event-test's People

Contributors

pfafman avatar

Stargazers

Richard Caceres avatar

Watchers

James Cloos avatar  avatar  avatar

meteor-polymer-event-test's Issues

Shadow DOM polyfill and meteor on Safari and Firefox

Template events work until you include the ShadowDom.js polyfill

main.html

<head>
  <title>Polymer Event Test</title>
  <script src="/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
  <script src="/bower_components/webcomponentsjs/ShadowDOM.js"></script>


  <link rel="import" href="/bower_components/font-roboto/roboto.html">
  <link rel="import" href="/bower_components/paper-button/paper-button.html">

</head>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.