Make more cross-browser compatible
This commit is contained in:
parent
82a0ce6ec0
commit
7f18e75647
10 changed files with 89 additions and 33 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue