版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Location.d.ts 949 B

1234567891011121314151617181920212223242526272829303132
  1. /// <reference types="node" />
  2. import { URL } from 'url';
  3. /**
  4. *
  5. */
  6. export default class Location extends URL {
  7. /**
  8. * Constructor.
  9. */
  10. constructor();
  11. /**
  12. * Replaces the current resource with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session History, meaning the user won't be able to use the back button to navigate to it.
  13. *
  14. * @param url URL.
  15. */
  16. replace(url: string): void;
  17. /**
  18. * Loads the resource at the URL provided in parameter.
  19. *
  20. * Note: Will do the same thing as "replace()" as server-dom does not support loading the URL.
  21. *
  22. * @param url
  23. * @see this.replace()
  24. */
  25. assign(url: string): void;
  26. /**
  27. * Reloads the resource from the current URL.
  28. *
  29. * Note: Will do nothing as reloading is not supported in server-dom.
  30. */
  31. reload(): void;
  32. }