GithubHelp home page GithubHelp logo

alexxnica / polymer-devtools-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlearchive/polymer-devtools-extension

0.0 1.0 0.0 1.43 MB

Deprecated: Polymer debugging extension

Home Page: https://github.com/PolymerLabs/polydev

License: Apache License 2.0

JavaScript 84.11% Python 3.92% HTML 11.97%

polymer-devtools-extension's Introduction

Polymer debugging extension

How to run:

  • Clone the repository.

git clone https://github.com/sachinhosmani/polymer-devtools-extension.git

  • Navigate to cloned directory.
  • Get dependencies with bower (Make sure bower is installed before this).

bower install

  • Get Closure compiler from here.
  • Unzip file and put compiler.jar in ~/closureCompiler.
  • Install vulcanize

npm install -g vulcanize

  • Build the project.

python build.py

  • The extension was put into build/.
  • Open Chrome and go to chrome://extensions.
  • Check developer mode.
  • Click Load unpacked extension.
  • Browse build/ select it, Chrome will install the extension
  • Open a web page written with Polymer
  • Open devtools and navigate to the Polymer pane

Basic Usage:

  • You will see 2 sides in the Polymer pane.
  • The left side has two views of the DOM tree you can switch between.
  • One is the Composed DOM view and the other is the Local DOM view.
  • An element is either blue or brown. Blue ones are Polymer elements while the rest are not.
  • Polymer elements when hovered on, show a View Source button, which if you click will take you to the definition file of the Polymer element.
  • Hovering over an element highlights it in the page.
  • The DOM trees respond to DOM mutations and are hence up-to-date.
  • Composed DOM view gives you the entire composed DOM tree.
  • Local DOM view focuses more on a selected element and can show both light DOM and composed DOM separately.
  • In either of the views, clicking the + button to the left of a Polymer element will take you to the local DOM view (if you're not already in it) and show you the shadow DOM contents of the element. In this view, the entire composed DOM tree is never exposed. It goes one level deep into the shadow DOM and shows the light DOM of each child at that level.
  • Clicking the - button (when its shown) will zoom out of the shadow DOM and show just the light DOM of the element.
  • For convenience, one may find an element in the devtools inspector and select it. It will automatically get selected in the Polymer pane's composed DOM tree.
  • In the right hand side of the pane are 3 tabs.
  • They get filled up in response to what is selected in the element trees.
  • The properties tab shows the properties of the selected element. (These object-trees are shown slightly differently for Polymer elements)
  • The model tab shows the model that is behind an element (if any).
  • The breakpoints tab shows a list of methods of the selected element. Clicking on any will add a breakpoint to the first line of the method.
  • All properties/methods in the right side are live. They are kept up-to-date via O.o().
  • All properties can be modified by clicking on their values and entering new valuesand this change takes immediate effect in the page.
  • Some properties have a refresh button next to them. These properties are implemented as accessors and hence can't be kept up-to-date via O.o(). One has to refresh it to fetch the latest value.

Note: It needs Object.observe() to work which means only Chrome 36 and above.

polymer-devtools-extension's People

Contributors

sachinhosmani avatar addyosmani avatar paulirish avatar nevir avatar oskbor avatar indolering avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.