Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Advanced Plugin Concepts: unclear lesson section Give Full Control of Elements #419

PDMackinnon opened this Issue · 3 comments

4 participants


If your plugin creates elements to be used within the DOM, then it's a good idea to offer plugin users some way to access those elements. Sometimes this means giving certain elements IDs or classes. But note that your plugin shouldn't rely on these hooks internally:

A bad implementation:

Perhaps its just me, but I cannot figure what it is that is bad about the implementation that follows. Further, the rest of the section appears to talk up the overall technique. Overall then, I think the text "A bad implementation: " is a mistake, or otherwise should be clarified as why this is bad.


It looks like the "bad implementation" is actually the suggested implementation. So I think you're correct that this was a mistake. However, I happen to disagree with this entire section. There's no reason to expose this type of control for generated elements. It's actually a pretty terrible API for users, especially the part where it encourages inline styles set via JavaScript.


Can somebody close this down as duplicate of #513? This one is older, but there were comments there, and a PR is open for that issue.


@PDMackinnon Thanks for reporting this. I'm closing this issue as suggested by @arthurvr as a duplicate of #513

@agcolom agcolom closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.