as implemented in async loadChallenge(challengeId), core-beta invokes displayChallenge in CTFd.js which downloads view.js for a challenge and does this:
before core-beta, postRender is invoked after the html is actually rendered, yet core-beta uses alpinejs, so show() the modal takes effect after the entire displayChallenge, which breaks the logic of a plugin which relied on postRender to get the challenge id with jquery($('#challenge-id')) and load the challenge info.
I think what I really need is CTFd._internal.challenge.data.id, yet I still wonder should postRender keep the previous behavior when virtual dom is actually rendered? otherwise what's the point of the postRender hook?
as implemented in
async loadChallenge(challengeId)
, core-beta invokesdisplayChallenge
inCTFd.js
which downloadsview.js
for a challenge and does this:https://github.com/CTFd/CTFd.js/blob/65df4e05fa039b6e464d50e62423e4536580f318/pages/challenge.js#L18-L33
before
core-beta
,postRender
is invoked after the html is actually rendered, yetcore-beta
uses alpinejs, soshow()
themodal
takes effect after the entiredisplayChallenge
, which breaks the logic of a plugin which relied onpostRender
to get the challenge id with jquery($('#challenge-id')
) and load the challenge info.I think what I really need is
CTFd._internal.challenge.data.id
, yet I still wonder shouldpostRender
keep the previous behavior when virtual dom is actually rendered? otherwise what's the point of thepostRender
hook?