From 0ef8f1bdad39f807c9d18c999ea0a1c86980f283 Mon Sep 17 00:00:00 2001
From: shelley vohr <codebytere@github.com>
Date: Wed, 21 Feb 2018 07:53:48 -0500
Subject: [PATCH] Add deprecation warnings fot html/rtf methods (#11995)

---
 lib/common/api/clipboard.js | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/lib/common/api/clipboard.js b/lib/common/api/clipboard.js
index b52524d75998..d5efbdb06aee 100644
--- a/lib/common/api/clipboard.js
+++ b/lib/common/api/clipboard.js
@@ -2,8 +2,41 @@ if (process.platform === 'linux' && process.type === 'renderer') {
   // On Linux we could not access clipboard in renderer process.
   module.exports = require('electron').remote.clipboard
 } else {
+  const {deprecate} = require('electron')
   const clipboard = process.atomBinding('clipboard')
 
+  // TODO(codebytere): remove in 3.0
+  clipboard.readHtml = function () {
+    if (!process.noDeprecations) {
+      deprecate.warn('clipboard.readHtml', 'clipboard.readHTML')
+    }
+    return clipboard.readHTML()
+  }
+
+  // TODO(codebytere): remove in 3.0
+  clipboard.writeHtml = function () {
+    if (!process.noDeprecations) {
+      deprecate.warn('clipboard.writeHtml', 'clipboard.writeHTML')
+    }
+    return clipboard.writeHTML()
+  }
+
+  // TODO(codebytere): remove in 3.0
+  clipboard.readRtf = function () {
+    if (!process.noDeprecations) {
+      deprecate.warn('clipboard.readRtf', 'clipboard.writeRTF')
+    }
+    return clipboard.readRTF()
+  }
+
+  // TODO(codebytere): remove in 3.0
+  clipboard.writeRtf = function () {
+    if (!process.noDeprecations) {
+      deprecate.warn('clipboard.writeRtf', 'clipboard.writeRTF')
+    }
+    return clipboard.writeRTF()
+  }
+
   // Read/write to find pasteboard over IPC since only main process is notified
   // of changes
   if (process.platform === 'darwin' && process.type === 'renderer') {