UniWebViewBackForwardItem.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections.Generic;
  2. /// <summary>
  3. /// Represents an item in the back-forward navigation list of a UniWebView browser.
  4. /// This class stores information about a single entry in the browsing history.
  5. ///
  6. /// You do not create an instance of this class directly. Instead, you get instances of this class from the
  7. /// `UniWebViewBackForwardList` class.
  8. /// </summary>
  9. public class UniWebViewBackForwardItem {
  10. /// <summary>
  11. /// Gets the current URL of the history item.
  12. /// </summary>
  13. public string Url { get; private set; }
  14. /// <summary>
  15. /// Gets the title of the webpage represented by this history item.
  16. ///
  17. /// Empty if the title is not available or set.
  18. /// </summary>
  19. public string Title { get; private set; }
  20. /// <summary>
  21. /// Gets the original URL before any redirects occurred.
  22. /// </summary>
  23. public string OriginalUrl { get; private set; }
  24. /// <summary>
  25. /// Initializes a new instance of UniWebViewBackForwardItem.
  26. /// </summary>
  27. /// <param name="dict">A dictionary containing the item's URL, title and original URL information.</param>
  28. public UniWebViewBackForwardItem(Dictionary<string, object> dict) {
  29. Url = dict["url"] as string;
  30. Title = dict["title"] as string;
  31. OriginalUrl = dict["originalUrl"] as string;
  32. }
  33. }