You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2020/01/25 05:59:26 UTC

[GitHub] [incubator-weex] donwilly2010 opened a new issue #3125: Load External JavaScript into Weex on Android

donwilly2010 opened a new issue #3125: Load External JavaScript into Weex on Android
URL: https://github.com/apache/incubator-weex/issues/3125
 
 
   Makes sure these boxes are checked befor submitting your issue - thank you!
   
   [Yes] If you encounter any problems using the tool, please check if there has a new version to update(Run weex update [pluginname]@latest).
   [Yes] Check the FAQ, make sure there have not the same issue.
   
   
   Weex is a fantastic Framework for Mobile development. But I need help while trying to load an external javascript page. this page will also need some parameters from props/data.
   This is required for payment integration such as loading a paypal card payment page into weex.
   
   I tried using the following but it didnt work on Weex on Android:
   
   var document=weex.document;
   
   method: {
   loadPaymentPanel(){
   var body = document.createElement('div', {
   classStyle: { alignItems: 'center' }
   })
   
                   var  script = document.createElement('script', {
                       attr: { src: 'url of payment gateway' },
                       classStyle: { alignItems: 'center'}
                   })
   body.appendChild(script)
   document.documentElement.appendChild(body)
   
   paymentOptions = {
   amount : 2000,
   user: "mark",
   email: "mark@email.com,
   }
   
   var window = document.getElementById(script).contentWindow
   
    var handler = window.PaymentPop.setup(paymentOptions)
               if (!this.embed) {
                   handler.openIframe()
               }
   }
   
   }
   
   *I got error the createElement is not a function.
   
   *Please how else can I achieve what I want??

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] cnryb closed issue #3125: Load External JavaScript into Weex on Android

Posted by GitBox <gi...@apache.org>.
cnryb closed issue #3125: Load External JavaScript into Weex on Android
URL: https://github.com/apache/incubator-weex/issues/3125
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] cnryb commented on issue #3125: Load External JavaScript into Weex on Android

Posted by GitBox <gi...@apache.org>.
cnryb commented on issue #3125: Load External JavaScript into Weex on Android
URL: https://github.com/apache/incubator-weex/issues/3125#issuecomment-578742215
 
 
   Integrating their SDK is more suitable in the app, if you want to use PayPal to pay on the app.
   such as Android  
   https://github.com/paypal/PayPal-Android-SDK
   https://github.com/braintree/braintree_android

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] donwilly2010 commented on issue #3125: Load External JavaScript into Weex on Android

Posted by GitBox <gi...@apache.org>.
donwilly2010 commented on issue #3125: Load External JavaScript into Weex on Android
URL: https://github.com/apache/incubator-weex/issues/3125#issuecomment-578786206
 
 
   Why did you close my issue without responding to my question??
   
   The whole essense if using weex is to avoid using android SDK.
   
   My question is not about PayPal. I just used PayPal as an example.
   My question is how do we load an external JavaScript using document.createElement
   
   or how can I do it if I can't use document??

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] donwilly2010 edited a comment on issue #3125: Load External JavaScript into Weex on Android

Posted by GitBox <gi...@apache.org>.
donwilly2010 edited a comment on issue #3125: Load External JavaScript into Weex on Android
URL: https://github.com/apache/incubator-weex/issues/3125#issuecomment-578786206
 
 
   Why did you close my issue without responding to my question??
   
   The whole essense if using weex is to avoid using android SDK.
   
   My question is not about PayPal. I never mentioned PayPal in my post. 
   Please note that loading an external JavaScript into a JavaScript based framework such as Weex is a very key functionality.
   My question is how do we load an external JavaScript using document.createElement
   
   or how can I do it if I can't use document??

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services