Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor to split model / view #50

Open
pmuellr opened this issue May 6, 2011 · 0 comments
Open

refactor to split model / view #50

pmuellr opened this issue May 6, 2011 · 0 comments

Comments

@pmuellr
Copy link

pmuellr commented May 6, 2011

I recently enabled an "extension" mode for the weinre debugger - http://pmuellr.github.com/weinre/ - and have built an extension which runs DOM Monster. What happens is that I run DOM Monster in one window (say on a mobile device) and then display the results in another window (weinre web app running on a desktop / laptop).

I did the minimal amount of work to do this split, and a couple other little things, in the project https://github.com/pmuellr/weinre-ext-dom-monster . The file dom-monster-agent.js is the hacked version of dommonster.js.

Clearly, something better should be done. :-) Technically, from the desktop I can ship a wad of JS code down the mobile device, and get the result back. The result can be an object, it's JSON-ified before sending, and then un-JSON-ified when it arrives at the desktop. I'm essentially wrapping a function around the existing dommonster.js, executing it, having it return the HTML it would otherwise write back into the page. I then get that HTML on the desktop, and insert it into the debugger's page.

The code for the plugin bits isn't out yet, so you can't run this extension yourself - right now - should be up next week.

You can see what it (will) look like here: http://www.flickr.com/photos/pmuellr/5692972464/ - I just love the adorable mini DOM Monster in the panel icon bar at the top!

Thanks for the work on DOM Monster, and for making it open source!

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

No branches or pull requests

1 participant