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

Chrome DevTools DOM Domain #746

Closed
8 tasks done
petekanev opened this issue Apr 24, 2017 · 1 comment
Closed
8 tasks done

Chrome DevTools DOM Domain #746

petekanev opened this issue Apr 24, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@petekanev
Copy link
Contributor

petekanev commented Apr 24, 2017

Implement the DOM Agent, part of the Chrome Debugging Protocol, inside Chrome DevTools.

Features:

Requirements:

ping @vakrilov @hshristov @PanayotCankov

In order to display the visual tree, and to work properly, the DOM needs to be sent computed data about the view structure. It should come from the nativescript core-modules following a specific interface.

When the DevTools are connected and the Elements tab opened - the DevTools backend will request the whole visual tree.

Notifications [modules -> runtime] need to be emitted on the following occasions:

  • a page is loaded/navigated to (changed)
  • a child view is inserted inside another view (with the computed Node)
  • a child view is removed from another view
  • an attribute is modified on the view
  • an attribute is removed from the view

Node class:

class DOMNode {
	nodeId: string
	nodeType: number // 9 = root, 1 = element
	nodeName: string
	localName: string // = this.nodeName
	nodeValue: string // = empty string 
	children?: DOMNode[]
	attributes?: string[] // pairs of strings - [attr1Name, attr1Value, attr2Name, attr2Value]	
}

Part of Epic #563

@petekanev
Copy link
Contributor Author

The feature will be available immediately with the 3.1.0 release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant