12 lines
324 B
JavaScript
Raw Normal View History

2024-08-24 20:48:14 +02:00
'use strict';
var $ = require('../internals/export');
var call = require('../internals/function-call');
// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
$({ target: 'URL', proto: true, enumerable: true }, {
toJSON: function toJSON() {
return call(URL.prototype.toString, this);
}
});