test(() => {
// Infers what are valid RTCErrorInit objects by passing them to the RTCError
// constructor.
assert_throws_js(TypeError, () => {
new RTCError({}, 'message');
});
new RTCError({errorDetail:'data-channel-failure'}, 'message');
}, 'RTCErrorInit.errorDetail is the only required attribute');
// All of these are number types (long or unsigned long).
const nullableAttributes = ['sdpLineNumber', 'sctpCauseCode', 'receivedAlert', 'sentAlert'];
nullableAttributes.forEach(attribute => {
test(() => {
const error = new RTCError({errorDetail:'data-channel-failure'}, 'message');
assert_equals(error[attribute], null);
}, 'RTCError.' + attribute + ' is null by default');
test(() => {
const error = new RTCError(
{errorDetail:'data-channel-failure', [attribute]: 0}, 'message');
assert_equals(error[attribute], 0);
}, 'RTCError.' + attribute + ' is settable by constructor');
test(function() {
assert_false("httpRequestStatusCode" in RTCError.prototype, "Should not be supported on the prototype");
}, "RTCError httpRequestStatusCode should not be supported.");
</script>
Messung V0.5
¤ Dauer der Verarbeitung: 0.25 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.