-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #172
- Loading branch information
Showing
7 changed files
with
96 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
// Generated from Web IDL definitions. | ||
|
||
@JS() | ||
library; | ||
|
||
import 'dart:js_interop'; | ||
|
||
typedef HTMLString = String; | ||
typedef ScriptString = String; | ||
typedef ScriptURLString = String; | ||
typedef TrustedType = JSObject; | ||
typedef CreateHTMLCallback = JSFunction; | ||
typedef CreateScriptCallback = JSFunction; | ||
typedef CreateScriptURLCallback = JSFunction; | ||
extension type TrustedHTML._(JSObject _) implements JSObject { | ||
external static TrustedHTML fromLiteral(JSObject templateStringsArray); | ||
external String toJSON(); | ||
} | ||
extension type TrustedScript._(JSObject _) implements JSObject { | ||
external static TrustedScript fromLiteral(JSObject templateStringsArray); | ||
external String toJSON(); | ||
} | ||
extension type TrustedScriptURL._(JSObject _) implements JSObject { | ||
external static TrustedScriptURL fromLiteral(JSObject templateStringsArray); | ||
external String toJSON(); | ||
} | ||
extension type TrustedTypePolicyFactory._(JSObject _) implements JSObject { | ||
external TrustedTypePolicy createPolicy( | ||
String policyName, [ | ||
TrustedTypePolicyOptions policyOptions, | ||
]); | ||
external bool isHTML(JSAny? value); | ||
external bool isScript(JSAny? value); | ||
external bool isScriptURL(JSAny? value); | ||
external String? getAttributeType( | ||
String tagName, | ||
String attribute, [ | ||
String elementNs, | ||
String attrNs, | ||
]); | ||
external String? getPropertyType( | ||
String tagName, | ||
String property, [ | ||
String elementNs, | ||
]); | ||
external TrustedHTML get emptyHTML; | ||
external TrustedScript get emptyScript; | ||
external TrustedTypePolicy? get defaultPolicy; | ||
} | ||
extension type TrustedTypePolicy._(JSObject _) implements JSObject { | ||
external TrustedHTML createHTML( | ||
String input, | ||
JSAny? arguments, | ||
); | ||
external TrustedScript createScript( | ||
String input, | ||
JSAny? arguments, | ||
); | ||
external TrustedScriptURL createScriptURL( | ||
String input, | ||
JSAny? arguments, | ||
); | ||
external String get name; | ||
} | ||
extension type TrustedTypePolicyOptions._(JSObject _) implements JSObject { | ||
external factory TrustedTypePolicyOptions({ | ||
CreateHTMLCallback createHTML, | ||
CreateScriptCallback createScript, | ||
CreateScriptURLCallback createScriptURL, | ||
}); | ||
|
||
external set createHTML(CreateHTMLCallback value); | ||
external CreateHTMLCallback get createHTML; | ||
external set createScript(CreateScriptCallback value); | ||
external CreateScriptCallback get createScript; | ||
external set createScriptURL(CreateScriptURLCallback value); | ||
external CreateScriptURLCallback get createScriptURL; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters