Rank: Member Groups: Member
Joined: 12/10/2015 Posts: 17
|
Why is the OBJECT element returned to the function type
Code: HTML/ASPX
<object id="SWFUpload_0" type="application/x-shockwave-flash" data="http://china.makepolo.com/misc/swfupload/swfupload.swf?preventswfcaching=1474624581338" width="80" height="24" class="swfupload"><param name="wmode" value="transparent"><param name="movie" value="http://china.makepolo.com/misc/swfupload/swfupload.swf?preventswfcaching=1474624581338"><param name="quality" value="high"><param name="menu" value="false"><param name="allowScriptAccess" value="always"><param name="flashvars" value="movieName=SWFUpload_0&uploadURL=http%3A%2F%2Fqueue1.img.makepolo.com%2Fuser_image_upload.php%3Ftype%3Dproduct&useQueryString=false&requeueOnError=false&httpSuccess=&assumeSuccessTimeout=0&params=PHPSESSID%3D&filePostName=Filedata&fileTypes=*.jpg%3B*.jpeg%3B*.gif%3B*.png&fileTypesDescription=Images&fileSizeLimit=10240%20KB&fileUploadLimit=4&fileQueueLimit=0&debugEnabled=false&buttonImageURL=http%3A%2F%2Fjic.makepolo.net%2Fimg%2Fucenter%2F18211_thumb_bendi2.gif.jpg&buttonWidth=80&buttonHeight=24&buttonText=&buttonTextTopPadding=0&buttonTextLeftPadding=0&buttonTextStyle=color%3A%20%23000000%3B%20font-size%3A%2016pt%3B&buttonAction=-110&buttonDisabled=false&buttonCursor=-2"></object>
Code: Visual Basic.NET
Dim retEmt As Object=WebView1.EvalScript("document.getElementById('SWFUpload_0');")
MsgBox(retEmt.GetType.Name)
What is the difference between JSObject and JSRealObject
|
Rank: Member Groups: Member
Joined: 12/10/2015 Posts: 17
|
Is there an asynchronous method for WebView1.InvokeFunction?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,083
|
Hi,
You can try the same code in Chrome browser and you will see it returns a function. This is probably because the JavaScript engine treats a class and that's class's constructor the same.
The difference between JSObject and JSRealObject is JSObject also presents special value "Null" and "Undefined", where as JSRealObject will never be those two values.
There is no asynchronous version of JSObject.InvokeFunction. If you wish to run JavaScript code asynchronously, you can use WebView.QueueScriptCall.
Thanks!
|