Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. English
  3. Scripting / Logic
  4. JavaScript
  5. Enable DOM objects for javascript and typescript [gelöst]

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    22
    1
    1.1k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.1k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.4k

Enable DOM objects for javascript and typescript [gelöst]

Geplant Angeheftet Gesperrt Verschoben JavaScript
javascript
8 Beiträge 3 Kommentatoren 1.0k Aufrufe 3 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • E Offline
    E Offline
    Ethernet-Fellow
    schrieb am zuletzt editiert von Ethernet-Fellow
    #1

    The simple type- and javascript statement
    document.getElementById('xxx')
    returns a syntax error: 'document' unknown.
    On Google I found that the DOM objects are not enabled by default in typescript.
    To enable it the typescript configuration file 'tsconfig.json' file must contain the line
    "lib": ["DOM", "ES2017"],
    to enable the DOM objects for typescript (and also for javascript).
    I inserted that line in /opt/iobroker/node_modules/@iobroker/plugin-base/tsconfig.json
    without success. On my Raspi there are about 20 more such file.

    So my question, does anyone know how to enable the DOM objects for type- and javascript in iobroker.
    Thanks a lot

    liv-in-skyL 1 Antwort Letzte Antwort
    0
    • Jey CeeJ Online
      Jey CeeJ Online
      Jey Cee
      Developer
      schrieb am zuletzt editiert von
      #2

      That doesn't make sense.
      DOM objects are only available on web pages, ioBroker is complete server side based and uses nodejs.
      So it useless there.
      If you wan't this feature anyway you have to include a third party module.

      Persönlicher Support
      Spenden -> paypal.me/J3YC33

      1 Antwort Letzte Antwort
      1
      • E Offline
        E Offline
        Ethernet-Fellow
        schrieb am zuletzt editiert von
        #3

        Thanks Jey Cee,
        I didn't find an editable table. So I tried to implement it by Typescript.

        1 Antwort Letzte Antwort
        0
        • E Ethernet-Fellow

          The simple type- and javascript statement
          document.getElementById('xxx')
          returns a syntax error: 'document' unknown.
          On Google I found that the DOM objects are not enabled by default in typescript.
          To enable it the typescript configuration file 'tsconfig.json' file must contain the line
          "lib": ["DOM", "ES2017"],
          to enable the DOM objects for typescript (and also for javascript).
          I inserted that line in /opt/iobroker/node_modules/@iobroker/plugin-base/tsconfig.json
          without success. On my Raspi there are about 20 more such file.

          So my question, does anyone know how to enable the DOM objects for type- and javascript in iobroker.
          Thanks a lot

          liv-in-skyL Offline
          liv-in-skyL Offline
          liv-in-sky
          schrieb am zuletzt editiert von
          #4

          @ethernet-fellow the DOM elements are only available in the vis.

          to use it you have to write scripts in the vis editor or in the e.g. html standard widget

          do I misunderstand your question ?

          what you want to do

          nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

          1 Antwort Letzte Antwort
          0
          • E Offline
            E Offline
            Ethernet-Fellow
            schrieb am zuletzt editiert von
            #5

            Hi liv-in-sky,
            I tried to make a table in VIS using HTML and typescript, but the typescript does not know DOM elements.

            liv-in-skyL 1 Antwort Letzte Antwort
            0
            • E Ethernet-Fellow

              Hi liv-in-sky,
              I tried to make a table in VIS using HTML and typescript, but the typescript does not know DOM elements.

              liv-in-skyL Offline
              liv-in-skyL Offline
              liv-in-sky
              schrieb am zuletzt editiert von
              #6

              @ethernet-fellow I only use javascript - it is working

              example: a script which builds the html und jquery - in the vis you have to use the binding for the datapoint

              https://forum.iobroker.net/topic/51217/html-tabelle-für-zigbee-devices-vis-übersicht

              or this exampleis in the script-tab in the vis-editor:

              https://forum.iobroker.net/topic/48663/howto-skripte-im-vis-editor-mit-jquery

              nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

              1 Antwort Letzte Antwort
              1
              • E Offline
                E Offline
                Ethernet-Fellow
                schrieb am zuletzt editiert von
                #7

                Thanks a lot liv-in-sky,
                that's what I missed.

                liv-in-skyL 1 Antwort Letzte Antwort
                1
                • E Ethernet-Fellow

                  Thanks a lot liv-in-sky,
                  that's what I missed.

                  liv-in-skyL Offline
                  liv-in-skyL Offline
                  liv-in-sky
                  schrieb am zuletzt editiert von
                  #8

                  @ethernet-fellow

                  you're welcome

                  by the way - for example : fast tables for vis:

                  https://forum.iobroker.net/topic/48130/howto-schnell-erstellte-html-tabelle-für-vis

                  nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                  1 Antwort Letzte Antwort
                  0
                  Antworten
                  • In einem neuen Thema antworten
                  Anmelden zum Antworten
                  • Älteste zuerst
                  • Neuste zuerst
                  • Meiste Stimmen


                  Support us

                  ioBroker
                  Community Adapters
                  Donate

                  935

                  Online

                  32.5k

                  Benutzer

                  81.6k

                  Themen

                  1.3m

                  Beiträge
                  Community
                  Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                  ioBroker Community 2014-2025
                  logo
                  • Anmelden

                  • Du hast noch kein Konto? Registrieren

                  • Anmelden oder registrieren, um zu suchen
                  • Erster Beitrag
                    Letzter Beitrag
                  0
                  • Home
                  • Aktuell
                  • Tags
                  • Ungelesen 0
                  • Kategorien
                  • Unreplied
                  • Beliebt
                  • GitHub
                  • Docu
                  • Hilfe