subtree: true
. Читать документацию, понимать, пробовать простые изолированные тесты делать. <div class="coolUpdates">
This library requires a working FFMpeg install. You will need both FFMpeg and FFProbe binaries to use it. Be sure that these binaries can be located with system PATH to get the benefit of the binary detection, otherwise you should have to explicitly give the binaries path on load.
// mixin
let sayHiMixin = {
sayHi() {
alert(`Hello ${this.name}`);
},
sayBye() {
alert(`Bye ${this.name}`);
}
};
// usage:
class User {
constructor(name) {
this.name = name;
}
}
// copy the methods
Object.assign(User.prototype, sayHiMixin);
// now User can say hi
new User("Dude").sayHi(); // Hello Dude!
Что происходит, что откуда приходит, и на что хочется показывать alert. Приходят же не div'ы, а сообщения прилетают, куда-то в socket, наверное. Движок чата наверняка умеет ставить сообщениям метки времени, или как-то помечать, где история, а где свежее прилетело.