Files
MOPMA/ƒ.js

37 lines
1.0 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

создатьОкно = (мир, id, файлHTML = null, файлCSS = null) =>
{
// Структура.
var окно = document.createElement("div");
окно.id = id;
окно.style.display = "none";
document.body.appendChild(окно);
// Вид.
if (файлHTML || файлCSS)
{
var м = мир.модули.модульПоУказателю(УКАЗАТЕЛЬТОГО_МОДУЛЯ);
if (файлHTML)
{
окно.innerHTML = м.содержимое[файлHTML];
}
if (файлCSS)
{
добавитьCSS(м.содержимое[файлCSS]);
}
}
// Функциональность.
окно.плавно = new ПлавноОтобразитьСкрыть(окно);
return окно;
};
// // // //
добавитьCSS = содержимое =>
{
var вид = document.createElement("style");
document.head.appendChild(вид);
вид.innerHTML = содержимое;
return вид;
};