Open benmccann opened 4 years ago
You can look in the code and see what APIs are used and look them up. Template strings are only used if you want to use them. I just create a template tag and work off of it. Let me know what you find.
Template tag is not supported in IE 11 either
Yes, that's true, template tags are not supported in IE and would require a polyfill. It was used simply for convenience of writing multiline strings and library in current state would be fine with input of just any single string.
I'll update readme on browser support, and will think how to get it.
Given small library footprint, desired functionality can be achieved with:
export function h(str) {
const template = str
.replace(/>\n+/g, '>')
.replace(/\s+</g, '<')
.replace(/>\s+/g, '>')
.replace(/\n\s+/g, '<!-- -->')
compilerTemplate.innerHTML = template
const content = compilerTemplate.content.firstChild
compile(content)
return content
}
However, I have to check other parts, as some low-level DOM API can also be unsupported in IE.
Hi, I'm wondering what browsers are supported. The README said that polyfills are not required, but also says that template strings are used, which are not supported in IE. So does that mean this library doesn't support IE? Are there other APIs used that would affect browser support?