From 2be5bedc19111e13cb81a07aacc9c194dc73ddea Mon Sep 17 00:00:00 2001 From: Gabriel Rubens Date: Sat, 25 Jun 2016 17:06:08 -0300 Subject: [PATCH] Update App.appendToConfig to use a raw string --- tools/cordova/builder.js | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tools/cordova/builder.js b/tools/cordova/builder.js index f3cf2be256..26695e9951 100644 --- a/tools/cordova/builder.js +++ b/tools/cordova/builder.js @@ -255,13 +255,7 @@ export class CordovaBuilder { // Set custom tags into widget element _.each(this.custom, elementSet => { - let tag = config - .element(elementSet.name, elementSet.contents.attrs); - - _.each(elementSet.contents.children, child => { - tag.element(child.name, child.attrs); - if(child.txt) tag.txt(child.txt); - }); + const tag = config.raw(elementSet); }); config.element('content', { src: this.metadata.contentUrl }); @@ -647,17 +641,13 @@ configuration. The key may be deprecated.`); /** * @summary Append custom tags into config's widget element. * - * `App.appendToConfig('custom-tag', {attrs: '', children: {}});` + * `App.appendToConfig('');` * - * @param {String} elementName The tag name - * @param {Object} contents The contents + * @param {String} element The XML you want to include * @memberOf App */ - appendToConfig: function (name, contents) { - builder.custom.push({ - name, - contents - }); - } + appendToConfig: function (xml) { + builder.custom.push(xml); + }, }; }