Sha256: 8be72e3cfad98b350e7a692d0f93ab7f104aa1d56a2de602015349e6f7adc8be

Contents?: true

Size: 1.84 KB

Versions: 7

Compression:

Stored size: 1.84 KB

Contents

<!DOCTYPE html>
<html>
<!--
Copyright 2010 The Closure Library Authors. All Rights Reserved.

Use of this source code is governed by the Apache License, Version 2.0.
See the COPYING file for details.
-->
<head>
  <title>goog.silverlight.ClipboardButton</title>
  <meta charset="utf-8">
  <script src="../base.js"></script>
<script src="../../../third_party/closure/goog/deps.js"></script>
  <script>
    goog.require('goog.dom');
    goog.require('goog.silverlight.CopyButton');
    goog.require('goog.silverlight.PasteButton');

  </script>
  <link rel="stylesheet" href="css/demo.css">
  <style>
  </style>
</head>
<body>
  <h1>goog.silverlight.ClipboardButton</h1>

  <div>Click 'Paste' to alert the contents on your clipboard:</div>
  <div id='pasteButton'></div>

  <p/>
  <div>Click 'Copy' to put the contents of
      this textarea on your clipboard:</div>
  <div id='copyButton'></div>
  <textarea id='textarea'>
  Content to copy
  </textarea>

  <script>

  var $ = goog.dom.$;
 var DIR = '../../../third_party/closure/goog/';

  var XAP = DIR + 'silverlight/' +
      'clipboardbuttonxap/Bin/Release/ClosureClipboardButton.xap';

  if (goog.silverlight.ClipboardButton.hasClipboardAccess()) {
    var pasteButton = new goog.silverlight.PasteButton(XAP);
    pasteButton.render($('pasteButton'));
    goog.events.listen(
        pasteButton,
        goog.silverlight.ClipboardEventType.PASTE,
        function(e) {
          alert(e.getData());
        });

    var copyButton = new goog.silverlight.CopyButton(XAP, 'Copy Textarea');
    copyButton.render($('copyButton'));
    goog.events.listen(
        copyButton,
        goog.silverlight.ClipboardEventType.COPY,
        function(e) {
          e.setData($('textarea').value);
        });
  } else {
    document.write(
        '<b>No native clipboard access--demo will not function</b>');
  }

  </script>
</body>
</html>

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
middleman-wizard-template-1.0.4 lib/middleman-wizard-template/template/closure/library/closure/goog/demos/silverlightclipboardbutton.html
middleman-wizard-template-1.0.3 lib/middleman-wizard-template/template/closure/library/closure/goog/demos/silverlightclipboardbutton.html
middleman-wizard-template-1.0.2 lib/middleman-wizard-template/template/closure/library/closure/goog/demos/silverlightclipboardbutton.html
middleman-wizard-template-1.0.1 lib/middleman-wizard-template/template/closure/library/closure/goog/demos/silverlightclipboardbutton.html
middleman-wizard-template-1.0.0.pre.1 lib/middleman-wizard-template/template/closure/library/closure/goog/demos/silverlightclipboardbutton.html
closure-1.2.701 closure-library/closure/goog/demos/silverlightclipboardbutton.html
closure-1.1.692 closure-library/closure/goog/demos/silverlightclipboardbutton.html