Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
chore(dep-free): support multiple ajax-forms
Browse files Browse the repository at this point in the history
TODO:
- Fix DOM mutation detection /validation code
- Fix custom events in IE
- finish converting tests

#55
  • Loading branch information
Ray Nicholus committed Apr 28, 2015
1 parent e746c43 commit d056a08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ajax-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
@element ajax-form
@homepage index.html
-->
<template id="ajax-form-template">
<template class="ajax-form-template">
<content></content>

<script>
Expand Down
3 changes: 2 additions & 1 deletion ajax-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@
prototype: Object.create(HTMLFormElement.prototype, {
createdCallback: {
value: function () {
var template = importDoc.querySelector('#ajax-form-template'),
var templates = importDoc.querySelectorAll('.ajax-form-template'),
template = templates[templates.length - 1],
clone = document.importNode(template.content, true),
root = this.createShadowRoot();

Expand Down

0 comments on commit d056a08

Please sign in to comment.