---
title: "Inline-модуль PDF.js через WebAssetManager Joomla - WebTolk"
description: "Используйте addInlineScript() с явной зависимостью и type=\"module\" . Зависимость активирует библиотеку. Обычный немодульный inline-script может выполниться…"
url: "https://web-tolk.ru/dev/joomla-plugins/wt-pdf-js/documentation/inline-module"
date: "2026-10-09T20:14:49+00:00"
language: "ru-RU"
---

## Breadcrumbs

[Главная](https://web-tolk.ru/) > [Расширения Joomla](https://web-tolk.ru/dev) > [Плагины Joomla](/dev/joomla-plugins) > [WT PDF.js](/dev/joomla-plugins/wt-pdf-js) > [Документация](/dev/joomla-plugins/wt-pdf-js/documentation) > Inline-модуль PDF.js через WebAssetManager Joomla

# Inline-модуль PDF.js через WebAssetManager Joomla

WT PDF.js - Документация

**Категория:** [Плагины Joomla](https://web-tolk.ru/dev/joomla-plugins)

[Проект](https://web-tolk.ru/dev/joomla-plugins/wt-pdf-js)[Версии](https://web-tolk.ru/dev/joomla-plugins/wt-pdf-js/versions)[Документация](https://web-tolk.ru/dev/joomla-plugins/wt-pdf-js/documentation)[GitHub](https://github.com/mozilla/pdf.js)

Используйте addInlineScript() с явной зависимостью и type="module" .

## Подключение inline-кода с зависимостью

Используйте `addInlineScript()` с явной зависимостью и `type="module"`. Зависимость активирует библиотеку. Обычный немодульный inline-script может выполниться до PDF.js. Пользовательские данные передавайте через script options, без прямой вставки непроверенных строк в JavaScript.

### Пример PHP

```
<?php
use Joomla\CMS\Factory;
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
$wa->addInlineScript(
    "window.addEventListener('DOMContentLoaded', () => { console.log(globalThis.pdfjsLib.version); }, { once: true });",
    ['name' => 'com_example.pdf-version'],
    ['type' => 'module'],
    ['wt-pdf-js-legacy']
);
```

## JSON-LD Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "https://web-tolk.ru/",
                "name": "Главная"
            }
        },
        {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "https://web-tolk.ru/dev",
                "name": "Расширения Joomla"
            }
        },
        {
            "@type": "ListItem",
            "position": 3,
            "item": {
                "@id": "/dev/joomla-plugins",
                "name": "Плагины Joomla"
            }
        },
        {
            "@type": "ListItem",
            "position": 4,
            "item": {
                "@id": "/dev/joomla-plugins/wt-pdf-js",
                "name": "WT PDF.js"
            }
        },
        {
            "@type": "ListItem",
            "position": 5,
            "item": {
                "@id": "/dev/joomla-plugins/wt-pdf-js/documentation",
                "name": "Документация"
            }
        },
        {
            "@type": "ListItem",
            "position": 6,
            "item": {
                "name": "Inline-модуль PDF.js через WebAssetManager Joomla"
            }
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Organization",
            "@id": "https://web-tolk.ru/#/schema/Organization/base",
            "name": "WebTolk",
            "url": "https://web-tolk.ru/",
            "logo": {
                "@type": "ImageObject",
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo",
                "url": "https://web-tolk.ru/images/webtolk-1080p.jpg",
                "contentUrl": "https://web-tolk.ru/images/webtolk-1080p.jpg",
                "width": 1920,
                "height": 1080
            },
            "image": {
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo"
            },
            "sameAs": [
                "https://github.com/WebTolk",
                "https://github.com/sergeytolkachyov",
                "https://vk.com/web_tolk",
                "https://vk.com/webtolkru",
                "https://tenchat.ru/sergeytolkachyov",
                "https://t.me/sergeytolkachyov",
                "https://t.me/webtolkru"
            ]
        },
        {
            "@type": "WebSite",
            "@id": "https://web-tolk.ru/#/schema/WebSite/base",
            "url": "https://web-tolk.ru/",
            "name": "WebTolk",
            "publisher": {
                "@id": "https://web-tolk.ru/#/schema/Organization/base"
            }
        },
        {
            "@type": "WebPage",
            "@id": "https://web-tolk.ru/#/schema/WebPage/base",
            "url": "https://web-tolk.ru/dev/joomla-plugins/wt-pdf-js/documentation/inline-module",
            "name": "Inline-модуль PDF.js через WebAssetManager Joomla - WebTolk",
            "description": "Используйте addInlineScript() с явной зависимостью и type=\"module\" . Зависимость активирует библиотеку. Обычный немодульный inline-script может выполниться…",
            "isPartOf": {
                "@id": "https://web-tolk.ru/#/schema/WebSite/base"
            },
            "about": {
                "@id": "https://web-tolk.ru/#/schema/TechArticle/base"
            },
            "inLanguage": "ru-RU",
            "breadcrumb": {
                "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17"
            }
        },
        {
            "@type": "TechArticle",
            "headline": "Inline-модуль PDF.js через WebAssetManager Joomla",
            "url": "https://web-tolk.ru/dev/joomla-plugins/wt-pdf-js/documentation/inline-module",
            "description": "Используйте addInlineScript() с явной зависимостью и type= module  .",
            "mainEntityOfPage": {
                "@type": "WebPage",
                "url": "https://web-tolk.ru/dev/joomla-plugins/wt-pdf-js/documentation/inline-module"
            }
        }
    ]
}
```
