MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / ensureSafeObject

Function ensureSafeObject

code/songhop/www/lib/angular/angular.js:11612–11637  ·  view source on GitHub ↗
(obj, fullExpression)

Source from the content-addressed store, hash-verified

11610}
11611
11612function ensureSafeObject(obj, fullExpression) {
11613 // nifty check if obj is Function that is fast and works across iframes and other contexts
11614 if (obj) {
11615 if (obj.constructor === obj) {
11616 throw $parseMinErr('isecfn',
11617 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
11618 fullExpression);
11619 } else if (// isWindow(obj)
11620 obj.window === obj) {
11621 throw $parseMinErr('isecwindow',
11622 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',
11623 fullExpression);
11624 } else if (// isElement(obj)
11625 obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {
11626 throw $parseMinErr('isecdom',
11627 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',
11628 fullExpression);
11629 } else if (// block Object so that we can't get hold of dangerous Object.* methods
11630 obj === Object) {
11631 throw $parseMinErr('isecobj',
11632 'Referencing Object in Angular expressions is disallowed! Expression: {0}',
11633 fullExpression);
11634 }
11635 }
11636 return obj;
11637}
11638
11639var CALL = Function.prototype.call;
11640var APPLY = Function.prototype.apply;

Callers 3

angular.jsFile · 0.70
setterFunction · 0.70
esoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected