Adding LayoutManager to position videos as cleverly as possible

This commit is contained in:
David Négrier 2020-08-11 22:32:55 +02:00
parent 4b940a571c
commit 7232bbaef9
3 changed files with 105 additions and 1 deletions

View file

@ -0,0 +1,10 @@
export class HtmlUtils {
public static getElementByIdOrFail<T extends HTMLElement>(id: string): T {
const elem = document.getElementById(id);
if (elem === null) {
throw new Error("Cannot find HTML element with id '"+id+"'");
}
// FIXME: does not check the type of the returned type
return elem as T;
}
}