This is part of ongoing work to make core platform-independent.
BREAKING CHANGE
All private exports from 'angular2/src/core/facade/{lang,collection,exception_handler}' should be replaced with 'angular2/src/facade/{lang,collection,exception_handler}'.
		
	
			
		
			
				
	
	
		
			17 lines
		
	
	
		
			661 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			661 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
 | |
| import {isPresent} from 'angular2/src/facade/lang';
 | |
| 
 | |
| export class MockSchemaRegistry implements ElementSchemaRegistry {
 | |
|   constructor(public existingProperties: {[key: string]: boolean},
 | |
|               public attrPropMapping: {[key: string]: string}) {}
 | |
|   hasProperty(tagName: string, property: string): boolean {
 | |
|     var result = this.existingProperties[property];
 | |
|     return isPresent(result) ? result : true;
 | |
|   }
 | |
| 
 | |
|   getMappedPropName(attrName: string): string {
 | |
|     var result = this.attrPropMapping[attrName];
 | |
|     return isPresent(result) ? result : attrName;
 | |
|   }
 | |
| }
 |