Add load event listener
This commit is contained in:
Родитель
c77729d1e1
Коммит
3a6d109b78
|
@ -39,10 +39,23 @@ module.exports = class Player {
|
|||
|
||||
container.appendChild(iframe);
|
||||
|
||||
iframe.attacheEvent("onload", this._onLoad);
|
||||
|
||||
return iframe;
|
||||
}
|
||||
|
||||
// Binding onload callback.
|
||||
onLoad(onLoadCallback) {
|
||||
this._onLoadCallback = onLoadCallback;
|
||||
}
|
||||
|
||||
_onLoad() {
|
||||
if (this._onLoadCallback) {
|
||||
this._onLoadCallback();
|
||||
}
|
||||
}
|
||||
|
||||
test() {
|
||||
console.log("Call test method.", this.embed, );
|
||||
console.log("Call test method.", this.embed);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "furioos-sdk",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "Furioos SDK to create your own furioos viewer",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче