HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/biblioteka/wp-content/plugins/qtranslate-xt-3.15.2/js/core/dom.js
/**
 * DOM manipulation
 */
'use strict';

export const qtranxj_ce = function (tagName, props, parentNode, beforeNode) {
    const elem = document.createElement(tagName);
    if (props) {
        for (const prop in props) {
            elem[prop] = props[prop];
        }
    }
    if (parentNode) {
        // Retro-compatibility with old API.
        if (typeof beforeNode === "boolean" && beforeNode) {
            console.warn("qTranslate: deprecated boolean type in qtranxj_ce, will be removed in future major release.");
            beforeNode = parentNode.firstChild;
        }
        parentNode.insertBefore(elem, beforeNode);  // As AppendChild if beforeNode is null.
    }
    return elem;
};