You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by tw93 <gi...@git.apache.org> on 2018/03/05 12:19:19 UTC
[GitHub] incubator-weex pull request #1047: [WEEX-233][iOS] More enhanced about ...
GitHub user tw93 opened a pull request:
https://github.com/apache/incubator-weex/pull/1047
[WEEX-233][iOS] More enhanced about <web> component
First of all, thank you for your contribution!
Please makes sure that these checkboxes are checked before submitting your PR, thank you!
CheckList:
*isNewFeature* **:**
* [ ] Update API docs for the component.
* [ ] Update/Add demo to demonstrate new feature.
* [ ] Update test scripts for the feature.
* [ ] Add unit tests for the feature.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tw93/incubator-weex ios-feature-enhanced-web
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-weex/pull/1047.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1047
----
commit a052c9f934899b8a0f83ee3d5ff2ba5dc3b13c60
Author: Tw93 <tw...@...>
Date: 2018-02-27T10:47:26Z
+ [ios] more enhanced about web
commit e33353a794ed56033305d40692d876fdc58736f9
Author: Tw93 <tw...@...>
Date: 2018-03-01T09:07:42Z
+ [ios] change to postmessage
commit 900426be26bf5ec08d32304d003f691932f61180
Author: Tw93 <tw...@...>
Date: 2018-03-05T11:39:28Z
+ [ios] Code Style Guidelines
----
---
[GitHub] incubator-weex pull request #1047: [WEEX-233][iOS] More enhanced about ...
Posted by tw93 <gi...@git.apache.org>.
GitHub user tw93 reopened a pull request:
https://github.com/apache/incubator-weex/pull/1047
[WEEX-233][iOS] More enhanced about <web> component
First of all, thank you for your contribution!
Please makes sure that these checkboxes are checked before submitting your PR, thank you!
CheckList:
*isNewFeature* **:**
* [ ] Update API docs for the component.
* [ ] Update/Add demo to demonstrate new feature.
* [ ] Update test scripts for the feature.
* [ ] Add unit tests for the feature.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tw93/incubator-weex ios-feature-enhanced-web
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-weex/pull/1047.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1047
----
commit a052c9f934899b8a0f83ee3d5ff2ba5dc3b13c60
Author: Tw93 <tw...@...>
Date: 2018-02-27T10:47:26Z
+ [ios] more enhanced about web
commit e33353a794ed56033305d40692d876fdc58736f9
Author: Tw93 <tw...@...>
Date: 2018-03-01T09:07:42Z
+ [ios] change to postmessage
commit 900426be26bf5ec08d32304d003f691932f61180
Author: Tw93 <tw...@...>
Date: 2018-03-05T11:39:28Z
+ [ios] Code Style Guidelines
commit db1c20e4c1a543db060ece68c7715b42384de594
Author: 侑夕 <tw...@...>
Date: 2018-03-07T11:26:39Z
+ [ios] according to the W3C specification
----
---
[GitHub] incubator-weex pull request #1047: [WEEX-233][iOS] More enhanced about ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-weex/pull/1047
---
[GitHub] incubator-weex pull request #1047: [WEEX-233][iOS] More enhanced about ...
Posted by acton393 <gi...@git.apache.org>.
Github user acton393 commented on a diff in the pull request:
https://github.com/apache/incubator-weex/pull/1047#discussion_r172825375
--- Diff: ios/sdk/WeexSDK/Sources/Module/WXWebViewModule.m ---
@@ -27,6 +27,7 @@ @implementation WXWebViewModule
@synthesize weexInstance;
--- End diff --
webViewModule method is deprecated gradually as we support component method, the same expose way as module method
see more details: http://weex.apache.org/guide/extend-ios.html#component-method
Maybe it will be better if use component method
---
[GitHub] incubator-weex pull request #1047: [WEEX-233][iOS] More enhanced about ...
Posted by tw93 <gi...@git.apache.org>.
Github user tw93 commented on a diff in the pull request:
https://github.com/apache/incubator-weex/pull/1047#discussion_r172833325
--- Diff: ios/sdk/WeexSDK/Sources/Module/WXWebViewModule.m ---
@@ -27,6 +27,7 @@ @implementation WXWebViewModule
@synthesize weexInstance;
--- End diff --
Thinks @acton393 , I have modified it
---
[GitHub] incubator-weex pull request #1047: [WEEX-233][iOS] More enhanced about ...
Posted by tw93 <gi...@git.apache.org>.
Github user tw93 commented on a diff in the pull request:
https://github.com/apache/incubator-weex/pull/1047#discussion_r172837062
--- Diff: ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m ---
@@ -104,6 +142,10 @@ - (void)updateAttributes:(NSDictionary *)attributes
if (attributes[@"src"]) {
self.url = attributes[@"src"];
}
+
+ if (attributes[@"source"]) {
--- End diff --
done!
---
[GitHub] incubator-weex pull request #1047: [WEEX-233][iOS] More enhanced about ...
Posted by tw93 <gi...@git.apache.org>.
Github user tw93 closed the pull request at:
https://github.com/apache/incubator-weex/pull/1047
---
[GitHub] incubator-weex issue #1047: [WEEX-233][iOS] More enhanced about compon...
Posted by weex-bot <gi...@git.apache.org>.
Github user weex-bot commented on the issue:
https://github.com/apache/incubator-weex/pull/1047
<!--
0 failure:
0 warning:
2 messages
-->
<table>
<thead>
<tr>
<th width="50"></th>
<th width="100%" data-danger-table="true">Messages</th>
</tr>
</thead>
<tbody><tr>
<td>:book:</td>
<td>has no jsfm file changed.</td>
</tr>
<tr>
<td>:book:</td>
<td>jsfm test finished.</td>
</tr>
</tbody>
</table>
<p align="right">
Generated by :no_entry_sign: <a href="http://github.com/danger/danger-js/">dangerJS</a>
</p>
---
[GitHub] incubator-weex pull request #1047: [WEEX-233][iOS] More enhanced about ...
Posted by acton393 <gi...@git.apache.org>.
Github user acton393 commented on a diff in the pull request:
https://github.com/apache/incubator-weex/pull/1047#discussion_r172826404
--- Diff: ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m ---
@@ -69,6 +71,11 @@ - (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDict
{
if (self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance]) {
self.url = attributes[@"src"];
+
+ if(attributes[@"source"]){
+ self.source = attributes[@"source"];
--- End diff --
the init method is executed in background thread named component method and `self.source` will call [self setSource:""],
the method for `setSource` called view operation which is only for main thread.
A better way is that define another member for source to save the variable during this initialization, and call self.source in component hook lifeCycle like `viewDidLoad`.
---
[GitHub] incubator-weex pull request #1047: [WEEX-233][iOS] More enhanced about ...
Posted by acton393 <gi...@git.apache.org>.
Github user acton393 commented on a diff in the pull request:
https://github.com/apache/incubator-weex/pull/1047#discussion_r172835622
--- Diff: ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m ---
@@ -104,6 +142,10 @@ - (void)updateAttributes:(NSDictionary *)attributes
if (attributes[@"src"]) {
self.url = attributes[@"src"];
}
+
+ if (attributes[@"source"]) {
--- End diff --
maybe we should update the initSource when update attributes,
as the view can be unloaded during the screen scroll, so the viewDidLoad method can called again with initSource
---