Topic on Project:Support desk

Summary by Johnywhy

Gadgets and widgets are similar:

  • they both support HTML (including normally-disallowed HTML), JS, and CSS.
  • they both offer permissions-options (global, hidden, user-selected, etc).

The main difference:

  • Gadgets start with JS and/or CSS. Any desired HTML must rendered by JS.
  • Widgets start with raw HTML. The HTML can import JS and CSS files.
Johnywhy (talkcontribs)

Its seems both support HTML/CSS/JS.

Extension:Widgets

Extension:Gadgets

How to choose one over the other? How are they different?

This page says:

  • Gadgets — Lets users select custom CSS and JavaScript gadgets in their preferences.
  • Widgets — Allows wiki administrators to add free-form widgets to the wiki by editing pages within the Widget namespace.

Observations:

  • Not sure what "free-form" means. Both widgets and gadgets are added by admins, so that factor seems the same.
  • I believe widgets are a type of gadget, and the widget feature must be defined on the gadgets-definition page. But that doesn't help me understand the difference between them.
  • Sounds like either one could be a video-player, feed-reader, or any other visual toy embedded on the page.
Ciencia Al Poder (talkcontribs)

Gadgets is for adding scripts and CSS snippets that will be loaded on all pages, for all users or those users that choose to use them in their preferences.

Widgets are HTML fragments that you define (including content that usually isn't allowed in wikitext, like HTML forms, iframes, etc) that can be included on specific pages.

Johnywhy (talkcontribs)
  • A JS gadget may write HTML to a page, but gadgets start with a JS or CSS file (or page), and not an HTML file. Correct?
  • A JS gadget may write HTML that usually isn't allowed in wikitext (like forms, iframes, etc). Correct?
  • A widget starts with raw HTML. That HTML may load CSS or JS. Correct?
Ciencia Al Poder (talkcontribs)

All 3 points are correct

Johnywhy (talkcontribs)

nm