Raynos / mercury

A truly modular frontend framework
http://raynos.github.io/mercury/
MIT License
2.82k stars 142 forks source link

Add an example of manipulating real DOM element #175

Closed aknuds1 closed 9 years ago

aknuds1 commented 9 years ago

I couldn't find any documentation on manipulating real DOM elements (i.e. non-virtual), which can be necessary at least to integrate with 3rd party libraries. So I wrote an example on how to do it (based on virtual-dom's tests).

Raynos commented 9 years ago

@aknuds1

This one is cool though; do you want to add a widget to this too ?

aknuds1 commented 9 years ago

@Raynos Aha, hadn't noticed those. I can look into the widget thing, thanks.

aknuds1 commented 9 years ago

@Raynos Having just read up on Mercury widgets, do you suggest I add one to my example as an alternative approach for affecting the DOM?

aknuds1 commented 9 years ago

@Raynos I went ahead and added an alternative approach of using a widget to my example. Let me know if you had something else in mind.

aknuds1 commented 9 years ago

@Raynos Does it look OK to you now? Changing node.style.color should be correct JavaScript, AFAICT.

Raynos commented 9 years ago

Lgtm

aknuds1 commented 9 years ago

Thanks @Raynos :)