Merge pull request #1237 from sveltejs/gh-1209

use setAttribute with inputs, for benefit of IE - fixes #1209
pull/1246/head
Rich Harris 7 years ago committed by GitHub
commit 26239463c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -518,7 +518,6 @@ const attributeLookup = {
type: {
appliesTo: [
'button',
'input',
'command',
'embed',
'object',

@ -33,6 +33,10 @@ function removeListener(node, event, handler) {
node.removeEventListener(event, handler, false);
}
function setAttribute(node, attribute, value) {
node.setAttribute(attribute, value);
}
function blankObject() {
return Object.create(null);
}
@ -206,7 +210,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
addListener(input, "change", input_change_handler);
input.type = "checkbox";
setAttribute(input, "type", "checkbox");
},
m: function mount(target, anchor) {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener } from "svelte/shared.js";
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, state) {
var input;
@ -16,7 +16,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
addListener(input, "change", input_change_handler);
input.type = "checkbox";
setAttribute(input, "type", "checkbox");
},
m: function mount(target, anchor) {

Loading…
Cancel
Save