Make more cross-browser compatible

This commit is contained in:
Schmelczer András 2019-12-30 21:01:27 +01:00
parent 82a0ce6ec0
commit 7f18e75647
10 changed files with 89 additions and 33 deletions

View file

@ -1,4 +1,4 @@
import { html, ResponsiveImage } from "../model/misc";
import { html } from "../model/misc";
export const createElement = (from: html): HTMLElement => {
const element: HTMLElement = document.createElement("div");
@ -91,3 +91,5 @@ export const range = ({
export const last = <T>(list: Array<T>): T =>
list.length > 0 ? list[list.length - 1] : undefined;
export const isChrome = (): boolean => !!navigator.appVersion.match(/chrome/i);