dom.proto 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. // Messages containing DOM data captured from the browser.
  5. // It includes the structure of the HTML document and Navigator data.
  6. syntax = "proto2";
  7. option optimize_for = LITE_RUNTIME;
  8. package userfeedback;
  9. // Data captured from HTMLDocument DOM object.
  10. message HtmlDocument {
  11. // The value of document.URL property.
  12. required string url = 1;
  13. // The value of document.title property.
  14. optional string title = 2;
  15. // The value of document.documentElement property.
  16. optional HtmlElement document_element = 3;
  17. };
  18. // Data captured from HTMLElement DOM object.
  19. message HtmlElement {
  20. // The value of element.tagName property.
  21. required string tag_name = 1;
  22. // The value of element.id property.
  23. optional string id = 2;
  24. // The value of element.className property.
  25. optional string class_name = 3;
  26. // A list of child elements.
  27. repeated HtmlElement child_element = 4;
  28. // The value of frame.contentDocument property for FRAME and IFRAME elements.
  29. optional HtmlDocument frame_content_document = 5;
  30. };
  31. // Data captured from DOM Navigator object.
  32. message Navigator {
  33. // The value of 'navigator.appCodeName' property.
  34. optional string app_code_name = 1;
  35. // The value of 'navigator.appName' property.
  36. optional string app_name = 2;
  37. // The value of 'navigator.appVersion' property.
  38. optional string app_version = 3;
  39. // The value of 'navigator.appMinorVersion' property.
  40. optional string app_minor_version = 4;
  41. // The value of 'navigator.cookieEnabled' property.
  42. optional bool cookie_enabled = 5;
  43. // The value of 'navigator.cpuClass' property.
  44. optional string cpu_class = 6;
  45. // The value of 'navigator.onLine' property.
  46. optional bool on_line = 7;
  47. // The value of 'navigator.platform' property.
  48. optional string platform = 8;
  49. // The value of 'navigator.browserLanguage' property.
  50. optional string browser_language = 9;
  51. // The value of 'navigator.systemLanguage' property.
  52. optional string system_language = 10;
  53. // The value of 'navigator.userAgent' property.
  54. optional string user_agent = 11;
  55. // The return value of 'navigator.javaEnabled()' method.
  56. optional bool java_enabled = 12;
  57. // The return value of 'navigator.taintEnabled()' method.
  58. optional bool taint_enabled = 13;
  59. // Plugin names specified by 'navigator.plugins' property.
  60. repeated string plugin_name = 14;
  61. };
  62. // A path in the HTML document between two elements, which are in the
  63. // ancestor-descendant relationship.
  64. message HtmlPath {
  65. // Ordered list of zero-based indices.
  66. // Empty path selects root element.
  67. // Non-negative index N selects (N+1)-th child.
  68. // Index -1 selects root element from frame content document.
  69. repeated int32 index = 1;
  70. };