From 22c3a63737b1839a286659166885c569f138b9e3 Mon Sep 17 00:00:00 2001 From: Jason Tsai Date: Wed, 19 Feb 2025 00:56:57 +0800 Subject: feat: add `Notification` Web API binding (#34842) * feat: add Notification Web API binding Signed-off-by: Jason Tsai * chore: update spec link Signed-off-by: Jason Tsai * chore: fix clippy Signed-off-by: Jason Tsai * fix: index overflow Signed-off-by: Jason Tsai * test(tidy): add notification WebIDL standard URL Signed-off-by: Jason Tsai * fix: allow crown::unrooted_must_root Signed-off-by: Jason Tsai * implement GetPermission Signed-off-by: Jason Tsai * fix silent type Signed-off-by: Jason Tsai * add all properties Signed-off-by: Jason Tsai * test: add Notification to global Signed-off-by: Jason Tsai * chore: update wpt manifest and fix clippy Signed-off-by: Jason Tsai * test: temp skip notifications Signed-off-by: Jason Tsai * add vibration and apply suggestions Signed-off-by: Jason Tsai * partially implement RequestPermission Signed-off-by: Jason Tsai * call Permission request permission algorithm Signed-off-by: Jason Tsai * chore: pub crate Notification Signed-off-by: Jason Tsai * chore: fix clippy Signed-off-by: Jason Tsai * chore: crown attribute Signed-off-by: Jason Tsai * fix part of suggestions Signed-off-by: Jason Tsai * fix: store private `Action` structure Signed-off-by: Jason Tsai * chore: fix typo Signed-off-by: Jason Tsai * fix: serialize images URL Signed-off-by: Jason Tsai * fix: use globalscope as environment settings object Signed-off-by: Jason Tsai * chore: add pref `dom_notification_enabled` and default to disabled Signed-off-by: Jason Tsai * fix: use `descriptor_permission_state` Signed-off-by: Jason Tsai * apply suggestions Signed-off-by: Jason Tsai Co-authored-by: Josh Matthews * test: remove passed meta Signed-off-by: Jason Tsai * test: enable notification prefs in mozilla tests Signed-off-by: Jason Tsai --------- Signed-off-by: Jason Tsai Co-authored-by: Josh Matthews --- components/script_bindings/codegen/Bindings.conf | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'components/script_bindings/codegen') diff --git a/components/script_bindings/codegen/Bindings.conf b/components/script_bindings/codegen/Bindings.conf index d8c7f94917a..bdc57b39746 100644 --- a/components/script_bindings/codegen/Bindings.conf +++ b/components/script_bindings/codegen/Bindings.conf @@ -383,6 +383,10 @@ DOMInterfaces = { 'canGc': ['CloneNode', 'SetTextContent'], }, +'Notification': { + 'canGc': ['RequestPermission'], +}, + 'OfflineAudioContext': { 'inRealms': ['StartRendering'], 'canGc': ['StartRendering'], -- cgit v1.2.3