WebDialogs, "skp:", and Windows 8/IE 10?
-
When using WebDialogs with JavaScript, you can pass messages from the JS back to the Ruby plugin using this technique:
window.location = "skp:callback_name@callback_data"
(described in "Accessing SketchUp from JavaScript" in Automatic SketchUp on page 319)
The
skp:
is a psuedo-protocol and the above line of code sendscallback_data
to the Ruby methodcallback_name
.This works fine across Mac (using Safari instances for the WebDialogs) an Windows (IE instances) for local HTML files (using
WebDialog.set_file html_filepath
) and it works for remote JavaScript web pages (usingWebDialog.set_url my_url
) in every instance we've seen…except with Windows 8! (which uses IE 10 for WebDialogs?)We've looked into workarounds (setting the registry to properly handle "skp:", etc.) but can't find anything easy. Is there anything we can do to get this "skp:" message passing to work in IE 10 WebDialogs for remote .html files?
Thanks,
j.
-
(I thought embedded IE (maybe only IE8) uses IE7 mode.)
Did you play around with different doctypes or setting standard/quirks/etc. mode?
Check out the lost WebDialog manual. Whatever the solution is, it would be valuable to have in the manual. -
@jasef said:
The
skp:
is a psuedo-protocol and the above line of code sendscallback_data
to the Ruby methodcallback_name
.Microsoft calls them "Asynchronous Pluggable Protocols"
see this MSDN page for more info -
@jasef said:
Is there anything we can do to get this "skp:" message passing to work in IE 10 WebDialogs for remote .html files?
Did you set the WebDialog to allow actions from your remote host ?
-
Dan, we tried
WebDialog.allow_actions_from_host()
with no luck so far.Correction: this is not an IE10 issue; Win 8 uses IE10 as the default browser, but SketchUp is using IE7 for web dialogs:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729) Google-SketchUp/8.0 (PC)
-
My understanding is that Windows is not "using" IE7 for WebDialogs, that is just one unusual nature of the user agent string. MSDN says to trust the Trident setting as being more accurate:
http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85.aspxAs such, Trident/6.0 = IE10.
--J
-
Yes I think applications host the WebBrowser Control from shdocvw.dll (not MSIE, itself.)
See: Chapter 11 - The WebBrowser Control
On XP, shdocvw.dll is ver 6.0.xxxx, and is likely newer on Windows 8.
-
@jasef said:
Dan, we tried
WebDialog.allow_actions_from_host()
with no luck so far.Correction: this is not an IE10 issue; Win 8 uses IE10 as the default browser, but SketchUp is using IE7 for web dialogs:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729) Google-SketchUp/8.0 (PC)
The rules for picking doctype (and hence render engine) is different for embedded IE than browser IE. It's much more conservative in order to preserve application compatibilities.
To force WebDialogs to use the latest render mode use the
X-UA-Compatible
META element.<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
Advertisement