Comments (3)
For my particular case, calling ewk_context_web_storage_delete_all
fixes the issue. I used following extension method:
internal static partial class Interop
{
private static class Libraries
{
internal const string ChromiumEwk = "libchromium-ewk.so";
}
internal static partial class ChromiumEwk
{
[DllImport(Libraries.ChromiumEwk)]
internal static extern bool ewk_context_web_storage_delete_all(IntPtr context);
}
}
public static class ContextExtensions
{
private static IntPtr GetHandle(this Context context)
{
var contextType = context.GetType();
var handleField = contextType.GetField(
"_handle",
BindingFlags.Instance | BindingFlags.NonPublic);
if (handleField == null)
throw new NotSupportedException("Context doesn't have a _handle field");
if (handleField.FieldType != typeof(IntPtr))
throw new NotSupportedException(
$"Unexpected field type. Expected {typeof(IntPtr)}, got {handleField.FieldType}");
return (IntPtr) handleField.GetValue(context);
}
public static bool DeleteWebStorage(this Context context)
{
var handle = context.GetHandle();
return Interop.ChromiumEwk.ewk_context_web_storage_delete_all(handle);
}
}
Consider to expose this CAPI. Another possible solution for my problem would be to launch a WebView in incognito mode, but I'm not sure if it's exposed now.
from tizenfx.
The problem seems to be a little bit more complex. It looks like Tizen.WebView
was designed to be used as a 'singleton'. I use the AddJavaScriptMessageHandler
method (https://github.com/Samsung/TizenFX/blob/master/src/Tizen.WebView/Tizen.WebView/WebView.cs#L432) and this method adds a handler
to static _javaScriptMessageHandlerMap
dictionary. I don't see any option to remove already registered JS message handler. This is a problem in following case:
- create 1st WebView
- register JS message handler with some name
- destroy 1st WebView
- create 2nd WebView
- register JS message handler with the same name as for 1st WebView
Second AddJavaScriptMessageHandler call fails due to:
from tizenfx.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
from tizenfx.
Related Issues (20)
- Question/Possible bug after update to Tizen 5.5 HOT 2
- Issues with Tizen.Applications.DirectoryInfo constructor HOT 11
- Error: with privileges HOT 1
- sqlite
- GPIO output pin init high state does not work. HOT 1
- Improper BaselineDpi is given for UHD screen. HOT 2
- Badge API returns errors when default app certificate is used. HOT 1
- `new CultureInfo()` throws an exception in Invariant Mode. (on .NET 6) HOT 2
- [NUI.Components.CheckBox] SelectedChanged event doesn't invoke when IsSelected is changed by setter. HOT 2
- Wrong property name
- RelativeLayout Issue on DefaultLinearItem and DefaultGridItem. HOT 6
- Duplicated TextChanged event handler in TextField
- [NUI] AccessibilityCalculateStatesWrapper Missing null check
- Question: how to change input source? HOT 1
- [Tdbc] Avoid managed obj creation. HOT 4
- [PrivacyPrivilegeManager] Crash while checking permission on TV profile HOT 1
- CollectionView Overlapped Issue HOT 1
- TimeZoneChangedEventArgs can not be used on net6.0-tizen9.0
- Biometric Data Upload App Development Using Galaxy Watch 3 : Data Collection Discrepancies Due to Hardware Specification Differences
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tizenfx.