src/core/component.js
function (value) {
    var parsedValue;
    if (typeof value !== 'string') { return value; }
    if (this.isSingleProperty) {
      parsedValue = this.schema.parse(value);
      /**
       * To avoid bogus double parsings. Cached values will be parsed when building
       * component data. For instance when parsing a src id to its url, we want to cache
       * original string and not the parsed one (#monster -> models/monster.dae)
       * so when building data we parse the expected value.
       */
      if (typeof parsedValue === 'string') { parsedValue = value; }
    } else {
      // Parse using the style parser to avoid double parsing of individual properties.
      utils.objectPool.clearObject(this.parsingAttrValue);
      parsedValue = styleParser.parse(value, this.parsingAttrValue);
    }
    return parsedValue;
  }
function (value) {
    var parsedValue;
    if (typeof value !== 'string') { return value; }
    if (this.isSingleProperty) {
      parsedValue = this.schema.parse(value);
      /**
       * To avoid bogus double parsings. Cached values will be parsed when building
       * component data. For instance when parsing a src id to its url, we want to cache
       * original string and not the parsed one (#monster -> models/monster.dae)
       * so when building data we parse the expected value.
       */
      if (typeof parsedValue === 'string') { parsedValue = value; }
    } else {
      // Parse using the style parser to avoid double parsing of individual properties.
      utils.objectPool.clearObject(this.parsingAttrValue);
      parsedValue = styleParser.parse(value, this.parsingAttrValue);
    }
    return parsedValue;
  }
function ( value ) { var parsedValue ; if ( typeof value !== 'string' ) { return value ; } if ( this . isSingleProperty ) { parsedValue = this . schema . parse ( value ) ; /**
       * To avoid bogus double parsings. Cached values will be parsed when building
       * component data. For instance when parsing a src id to its url, we want to cache
       * original string and not the parsed one (#monster -> models/monster.dae)
       * so when building data we parse the expected value.
       */ if ( typeof parsedValue === 'string' ) { parsedValue = value ; } } else { // Parse using the style parser to avoid double parsing of individual properties. utils . objectPool . clearObject ( this . parsingAttrValue ) ; parsedValue = styleParser . parse ( value , this . parsingAttrValue ) ; } return parsedValue ; }
Given an HTML attribute value parses the string based on the component schema.
To avoid double parsings of strings into strings we store the original instead
of the parsed one

@param {string} value - HTML attribute value
Given an HTML attribute value parses the string based on the component schema . To avoid double parsings of strings into strings we store the original instead of the parsed one