Permalink
Browse files

Added code for ObjectForScripting property

Signed-off-by: Peter Nelson <peter@peterdn.com>
  • Loading branch information...
1 parent f0db7de commit b0a96e1b95162ad291795eaa1eba7763aea2d6d6 @peterdn peterdn committed Sep 22, 2010
Showing with 12 additions and 8 deletions.
  1. +4 −1 WebKitCore/WebKitBrowserCore.cs
  2. +8 −7 WebKitCore/WebKitCore.csproj
@@ -1002,7 +1002,10 @@ private void CreateWindowScriptObject(JSContext context)
{
if (ObjectForScripting != null && context != null)
{
- MessageBox.Show("Need to create object again!");
+ JSObject global = context.GetGlobalObject();
+ JSObject window = global.GetProperty("window") as JSObject;
+ if (window != null)
+ window.SetProperty("external", (object)ObjectForScripting);
}
}
}
@@ -67,6 +67,12 @@
<Link>WebKit.NET.snk</Link>
</None>
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\JSCore\JSCore.vcproj">
+ <Project>{287EEE45-1390-44D5-982F-0B96D4A077DA}</Project>
+ <Name>JSCore</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -81,12 +87,7 @@ echo .tlb &gt;&gt; temp_exclude_files.txt
echo gitignore &gt;&gt; temp_exclude_files.txt
xcopy /E /Y /EXCLUDE:temp_exclude_files.txt "$(SolutionDir)webkit\*" "$(SolutionDir)bin\$(ConfigurationName)"
del temp_exclude_files.txt</PostBuildEvent>
- <PreBuildEvent>call "$(DevEnvDir)..\..\VC\vcvarsall.bat" x86
-if not exist "$(SolutionDir)tools\TypeNormalizer.exe" csc /out:"$(SolutionDir)tools\TypeNormalizer.exe" "$(SolutionDir)tools\TypeNormalizer.cs"
-tlbimp "$(SolutionDir)webkit\webkit.tlb" /silent /keyfile:"$(SolutionDir)WebKit.NET.snk" /namespace:WebKit.Interop /out:"$(SolutionDir)webkit\WebKit.Interop.dll"
-ildasm "$(SolutionDir)webkit\WebKit.Interop.dll" /out="$(SolutionDir)webkit\temp_webkit_interop.il" /nobar
-"$(SolutionDir)tools\TypeNormalizer.exe" "$(SolutionDir)webkit\temp_webkit_interop.il"
-ilasm "$(SolutionDir)webkit\temp_webkit_interop.il" /dll /output="$(SolutionDir)webkit\WebKit.Interop.dll" /key="$(SolutionDir)WebKit.NET.snk"
-del /F /Q "$(SolutionDir)webkit\temp_webkit_interop.*"</PreBuildEvent>
+ <PreBuildEvent>
+ </PreBuildEvent>
</PropertyGroup>
</Project>

0 comments on commit b0a96e1

Please sign in to comment.