Home | History | Annotate | Download | only in examples
      1 -- Copyright (c) 2010 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 
      5 tell application "Chromium"
      6   tell tab 1 of window 1
      7     print  -- Prints the tab, prompts the user for location.
      8   end tell
      9   
     10   tell tab 1 of window 1
     11     save in "/Users/Foo/Documents/Google" as "only html"
     12     -- Saves the contents of the tab without the accompanying resources.
     13     
     14     save in "/Users/Foo/Documents/Google" as "complete html"
     15     -- Saves the contents of the tab with the accompanying resources.
     16     
     17     -- Note: both the |in| and |as| part are optional, without it user is
     18     -- prompted for one.
     19   end tell
     20   
     21   tell tab 1 of window 1
     22     view source  -- View the HTML of the tab in a new tab.
     23   end tell
     24 end tell
     25