mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 08:03:49 +00:00
[Pages] Add comments
Add comments to controller for Page objects in preparation for integration, WTD-1158.
This commit is contained in:
@ -5,8 +5,15 @@ define(
|
|||||||
function () {
|
function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controller for embedded web pages; serves simply as a
|
||||||
|
* wrapper for `$sce` to mark pages as trusted.
|
||||||
|
*/
|
||||||
function EmbeddedPageController($sce) {
|
function EmbeddedPageController($sce) {
|
||||||
return {
|
return {
|
||||||
|
/**
|
||||||
|
* Alias of `$sce.trustAsResourceUrl`.
|
||||||
|
*/
|
||||||
trust: function (url) {
|
trust: function (url) {
|
||||||
return $sce.trustAsResourceUrl(url);
|
return $sce.trustAsResourceUrl(url);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ define(
|
|||||||
return v;
|
return v;
|
||||||
});
|
});
|
||||||
|
|
||||||
controller = new EmbeddedPageController(mockSCE)
|
controller = new EmbeddedPageController(mockSCE);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("allows URLs to be marked as trusted", function () {
|
it("allows URLs to be marked as trusted", function () {
|
||||||
|
Reference in New Issue
Block a user