getAttributes = (tag, context) => {
    const attributes = Object.assign({}, tag.attributes);
    const fragmentId = attributes.id;
    if (context && fragmentId && context[fragmentId]) {
        const fragmentCtxt = context[fragmentId];
        Object.assign(attributes, fragmentCtxt);
    }

    const {
        src,
        async: isAsync,
        primary,
        public: isPublic,
        timeout,
        ...rest
    } = attributes;

    return {
        ...rest,
        url: src,
        id: fragmentId,
        async: hasValue(isAsync),
        primary: hasValue(primary),
        public: hasValue(isPublic),
        fallbackUrl: attributes['fallback-src'],
        timeout: parseInt(timeout || 3000, 10)
    };
}
Merge the attributes based on the fragment tag attributes and context

@param {object} tag - Fragment tag from the template
@param {object=} context - Context object for the given fragment
@returns {object}