Page 132 - DCAP202_Fundamentals of Web Programming
P. 132

Name
                                    Description
                                                                     Version
                        Determine whether a window is closed or
           closed
                        not.
                        Retrieves  the  default  message  displayed
                                                           Implemented in JavaScript 1.0
           defaultStatus
                        in the window’s status bar at the bottom.
                        Contains  information  about  the  current
                                                           Implemented in JavaScript 1.0
           document
                        document.
                        Specifies the vertical dimension(height of
           innerHeight
                                                           Implemented in JavaScript 1.2
                        the window), in pixels.
                        Specifies the horizontal dimension(width
                                                           Implemented in JavaScript 1.2
           innerWidth
                        of the document)), in pixels.
                        Specify  the  information  of  the  current
                                                           Implemented in JavaScript 1.0
           location
                        URL.
                        Test whether the location bar is visible is   Implemented in JavaScript 1.1
           locationbar                                     Implemented in JavaScript 1.2
                        or not.
           menubar      Refers the browser window's menu bar.   Implemented in JavaScript 1.2
                        Get  the  unique  name  of  a  specified
           name                                            Implemented in JavaScript 1.0   Unit 10: Browser Objects
                        window.
                        Specifies  the  window  of  the  calling
           opener                                          Implemented in JavaScript 1.1
                        document.
                        Specifies the vertical dimension, in pixels,                            Notes
           outerHeight                                     Implemented in JavaScript 1.2
                        of the window's outside boundary.
                        Specifies the horizontal dimension of the
           outerWidth                                      Implemented in JavaScript 1.2
                        window’s outside boundary.
                        Refers the current x-position of a page in
           pageXOffset                                     Implemented in JavaScript 1.2
                        a window.
                        Refers the current y-position of a page in
           pageYOffset                                     Implemented in JavaScript 1.2
                        a window.
                        Refers  the  browser  window's  personal
           personalbar                                     Implemented in JavaScript 1.2
                        bar.
                        Specify  the  x  coordinate  of  the  left  edge
           screenX                                         Implemented in JavaScript 1.2
                        of the window.
                        Refers the y-coordinate of the upper edge
           screenY                                         Implemented in JavaScript 1.2
                        of a window.
                        Refers  the  scroll  bars  of  the  browser
           scrollbars                                      Implemented in JavaScript 1.2
                        window..
                        Specifies  a  string  displayed  in  the
           status       browser  status  bar  at  the  bottom  of  the  Implemented in JavaScript 1.0
                        window.
                        Refers  the  status  bar  of  the  browser
           statusbar                                       Implemented in JavaScript 1.2
                        window.
                        Refers  the  toolbar  of  the  browser
           toolbar                                         Implemented in JavaScript 1.2
                        window.

              Task  Compare and contrast innerHeight and innerWidth property.
          10.1.2 JavaScript Window Objects Methods
              Name                 Description                       Version
                       Displays  an  Alert  dialog  box  with  a
           alert                                          Implemented in JavaScript 1.0
                       message and an OK button.
                       Decodes  a  string  of  encoding  data  using
           atob                                           Implemented in JavaScript 1.2
                       base-64 encoding.
                       Takes the browser to the previous URL in
           back                                           Implemented in JavaScript 1.2
                       the current history list.
                       Removes focus from a specific window or
           blur                                           Implemented in JavaScript 1.0
                       frame.
                       Convert a given string to a encoded data
           btoa                                           Implemented in JavaScript 1.2
                       (using base-64 encoding) string.
                       Cancels a timeout that which was set with
           clearInterval                                  Implemented in JavaScript 1.2
                       the setInterval method.
                       Cancels a timeout which was set with the
           clearTimeout                                   Implemented in JavaScript 1.0
                       setTimeout method.
                                                                                Contd....
           close       Closes the specified window.       Implemented in JavaScript 1.0
                       Displays  a  Confirm  dialog  box  with  the
           confirm     specified  message  and  two  buttons  OK  Implemented in JavaScript 1.0
                       and Cancel.         LOVELY PROFESSIONAL UNIVERSITY                                   125
                       Search  the  specified  text  string  in  the
           find                                           Implemented in JavaScript 1.2
                       contents of the specified window.
           focus       Gives focus to a specific window.   Implemented in JavaScript 1.1
                       Takes the browser to the next URL in the
           forward                                        Implemented in JavaScript 1.2
                       current history list.
                       Returns the browser to the user's specified
           home                                           Implemented in JavaScript 1.2
                       home page.
                       Move  the  window  relative  to  it's  current
           moveBy                                         Implemented in JavaScript 1.2
                       position in pixels.
                       Move the top-left corner of the window to
           moveTo                                         Implemented in JavaScript 1.2
                       the given screen coordinates.
           open        Opens a new web browser window.    Implemented in JavaScript 1.0
           print       Prints the contents of the window.   Implemented in JavaScript 1.2
                       Displays a Prompt dialog box including a
           prompt                                         Implemented in JavaScript 1.0
                       message and an input field.
                       Resizes an entire window by moving the
           resizeBy    window's  bottom-right  corner  by  the  Implemented in JavaScript 1.2
                       specified number of pixels.
                       Resizes an entire window to the specified
           resizeTo                                       Implemented in JavaScript 1.2
                       pixel dimensions.
                       Scrolls  the  specified  window  by  the
           scrollBy                                       Implemented in JavaScript 1.2
                       number of pixels passed to the method.
                       Scrolls the viewing area of the window so
           scrollTo    that the specified point becomes the top- Implemented in JavaScript 1.2
                       left corner.
                       Either  evaluates  an  expression  or  calls  a
           setInterval                                    Implemented in JavaScript 1.2
                       function  after  every  specified  number  of
   127   128   129   130   131   132   133   134   135   136   137