Page 29 - JavaScript
P. 29

Importing with side effects                                                                      383

            Defining a module                                                                                383

            Importing named members from another module                                                      384

            Importing an entire module                                                                       384

            Importing named members with aliases                                                             385

            Exporting multiple named members                                                                 385

        Chapter 68: Namespacing                                                                             386

          Remarks                                                                                            386

          Examples                                                                                           386

            Namespace by direct assignment                                                                   386

            Nested Namespaces                                                                                386

        Chapter 69: Navigator Object                                                                        387

          Syntax                                                                                             387

          Remarks                                                                                            387

          Examples                                                                                           387

            Get some basic browser data and return it as a JSON object                                       387

        Chapter 70: Notifications API                                                                       389

          Syntax                                                                                             389

          Remarks                                                                                            389

          Examples                                                                                           389


            Requesting Permission to send notifications                                                      389
            Sending Notifications                                                                            390

            Hello                                                                                            390

            Closing a notification                                                                           390

            Notification events                                                                              390

        Chapter 71: Objects                                                                                 392

          Syntax                                                                                             392

          Parameters                                                                                         392

          Remarks                                                                                            392

          Examples                                                                                           393

            Object.keys                                                                                      393

            Shallow cloning                                                                                  393
   24   25   26   27   28   29   30   31   32   33   34