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

Inspecting DOM as HTML w/ Plunker #1501

Open
paroche opened this issue Oct 22, 2019 · 7 comments
Open

Inspecting DOM as HTML w/ Plunker #1501

paroche opened this issue Oct 22, 2019 · 7 comments

Comments

@paroche
Copy link
Collaborator

paroche commented Oct 22, 2019

Is there a way to see the DOM as HTML in the Plunker sandbox? When we are changing the DOM it can be nice to see what the new document looks like, in HTML form. The only way I've managed to do this so far is to put the code in an HTML file, load it in the browser (Chrome), then look at the Elements in DevTools. That's not all that hard, but is there a simpler way?

Does this make sense?

@iliakan
Copy link
Member

iliakan commented Oct 22, 2019

Not sure there's a simpler way.

P.S. We could implement something, but people should know how to use DevTools if they are moving towards WebDev ;)

@iliakan iliakan closed this as completed Oct 22, 2019
@paroche
Copy link
Collaborator Author

paroche commented Oct 22, 2019

Well, they should then know (be told) that it's not going to work in the sandbox, no? If people are supposed to know more than has been taught in tutorial (besides basic HTML & CSS), it would be good to be clear on that.

@iliakan
Copy link
Member

iliakan commented Oct 22, 2019

Here we talk about dev tools, the Elements pane: http://javascript.info/dom-nodes#see-it-for-yourself
Should we separate it to another article maybe?

@paroche
Copy link
Collaborator Author

paroche commented Oct 22, 2019

I'm not talking about how to use dev tools, per se, just that it doesn't seem to necessarily work for all things in the Plunker sandbox, which is what's used for all the demos, etc.

@iliakan
Copy link
Member

iliakan commented Oct 22, 2019

Maybe I'm not just getting the idea. Could you provide an example of what's confusing now and can be improved?

@iliakan iliakan reopened this Oct 22, 2019
@paroche
Copy link
Collaborator Author

paroche commented Oct 24, 2019

In the course of testing the examples, I have HTML w/ JS code that modifies the DOM. I run it in the Plunker sandbox. I can see the results (the modified web page, displayed), but have not been able to get devtools to show me the modified DOM contained within the Plunker window. Maybe there's a way, but I haven't found it. Instead, I've been keeping an .html file on my computer, pasting the HTML & JS into it, then opening it in a Chrome tab. Then, of course, devtools elements will show me the modified DOM. I was asking if this could also be done in Plunker. And if not, suggesting that maybe this should be mentioned.

@iliakan
Copy link
Member

iliakan commented Oct 24, 2019

@paroche That's bit tricky. The plunker shows the document inside an iframe.

The simplest way is to right-click on the element in the document and choose "Inspect" from the menu.

That is, here:
image

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

2 participants