Skip to content

js: Emit DOM events on postbox/comment/thread render - #1126

Open
pkvach wants to merge 1 commit into
isso-comments:masterfrom
pkvach:feat/render-events
Open

pkvach wants to merge 1 commit into
isso-comments:masterfrom
pkvach:feat/render-events

Conversation

@pkvach

@pkvach pkvach commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • All new and existing tests are passing
  • (If adding features:) I have added tests to cover my changes
  • (If docs changes needed:) I have updated the documentation accordingly.
  • I have added an entry to CHANGES.rst because this is a user-facing change or an important bugfix
  • I have written proper commit message(s)

What changes does this Pull Request introduce?

Adds DOM events so embedding pages can react to rendered comment markup without overriding Isso's stylesheet.

  • Emit isso-postbox-rendered, isso-comment-rendered and isso-thread-rendered DOM events.
  • Add isso-postbox-submit, isso-postbox-preview and isso-postbox-edit classes to postbox buttons for easier restyling.

Example:

document.addEventListener('isso-postbox-rendered', function (e) {
    e.detail.element.querySelector(".isso-postbox-submit")
        .classList.add('btn', 'btn-primary');
});

Why is this necessary?

Closes #1003

@pkvach
pkvach marked this pull request as draft September 5, 2026 10:09
@pkvach
pkvach force-pushed the feat/render-events branch from ec15ca2 to d522b48 Compare September 5, 2026 10:38
@pkvach
pkvach marked this pull request as ready for review September 5, 2026 10:45
Emit `isso-postbox-rendered`, `isso-comment-rendered` and `isso-thread-rendered` DOM events so embedding pages can react to rendered markup. Add `isso-postbox-submit`, `isso-postbox-preview` and `isso-postbox-edit` classes to the postbox buttons for easier restyling.

Closes isso-comments#1003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow adding CSS classes to generated HTML elements

1 participant