From 175490e1f76a382264bf3734908c29ac19770e4e Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 12 Aug 2015 14:32:05 -0700 Subject: [PATCH] [Code Style] Use prototypes in Web Page bundle WTD-1482 --- .../pages/src/EmbeddedPageController.js | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/platform/features/pages/src/EmbeddedPageController.js b/platform/features/pages/src/EmbeddedPageController.js index f7720bc62c..0ebe5dfa23 100644 --- a/platform/features/pages/src/EmbeddedPageController.js +++ b/platform/features/pages/src/EmbeddedPageController.js @@ -38,17 +38,19 @@ define( * @memberof platform/features/pages */ function EmbeddedPageController($sce) { - return { - /** - * Alias of `$sce.trustAsResourceUrl`. - * @memberof platform/features/pages.EmbeddedPageController# - */ - trust: function (url) { - return $sce.trustAsResourceUrl(url); - } - }; + this.$sce = $sce; } + /** + * Alias of `$sce.trustAsResourceUrl`. + * @param {string} url the URL to trust + * @returns {string} the trusted URL + */ + EmbeddedPageController.prototype.trust = function (url) { + return this.$sce.trustAsResourceUrl(url); + }; + + return EmbeddedPageController; }