mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(load) Images, Events
This commit is contained in:
parent
a653a9b8c0
commit
448d8a6fa3
1 changed files with 3 additions and 6 deletions
|
|
@ -3,12 +3,9 @@
|
|||
|
||||
var DOMProto = Object.getPrototypeOf(DOM);
|
||||
|
||||
DOMProto.load = new LoaderProto(Util, DOM);
|
||||
DOMProto.load = new LoaderProto(Util, DOM.Images, DOM.Events);
|
||||
|
||||
function LoaderProto(Util, DOM) {
|
||||
var Images = DOM.Images,
|
||||
Events = DOM.Events;
|
||||
|
||||
function LoaderProto(Util, Images, Events) {
|
||||
/**
|
||||
* Функция создаёт элемент и загружает файл с src.
|
||||
*
|
||||
|
|
@ -72,7 +69,7 @@
|
|||
if (!p.id && p.src)
|
||||
p.id = load.getIdBySrc(p.src);
|
||||
|
||||
element = DOM.getById(p.id);
|
||||
element = document.getElementById(p.id);
|
||||
|
||||
if (element) {
|
||||
Util.exec(func);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue