mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Upgrade to gulp 4
This commit is contained in:
parent
70e48eeb52
commit
440404716e
4 changed files with 1954 additions and 674 deletions
|
|
@ -40,8 +40,8 @@ loadEditor(function() {
|
|||
monaco.languages.register({ id: 'mySpecialLanguage' });
|
||||
|
||||
monaco.languages.registerHoverProvider('mySpecialLanguage', {
|
||||
provideHover: function(model, position) {
|
||||
return xhr('../playground.html').then(function(res) {
|
||||
provideHover: function (model, position) {
|
||||
return xhr('../playground.html').then(function (res) {
|
||||
return {
|
||||
range: new monaco.Range(1, 1, model.getLineCount(), model.getLineMaxColumn(model.getLineCount())),
|
||||
contents: [
|
||||
|
|
@ -60,7 +60,7 @@ monaco.editor.create(document.getElementById("container"), {
|
|||
|
||||
function xhr(url) {
|
||||
var req = null;
|
||||
return new Promise(function(c,e) {
|
||||
return new Promise(function (c, e) {
|
||||
req = new XMLHttpRequest();
|
||||
req.onreadystatechange = function () {
|
||||
if (req._canceled) { return; }
|
||||
|
|
@ -75,7 +75,7 @@ function xhr(url) {
|
|||
}
|
||||
};
|
||||
|
||||
req.open("GET", url, true );
|
||||
req.open("GET", url, true);
|
||||
req.responseType = "";
|
||||
|
||||
req.send(null);
|
||||
|
|
@ -90,4 +90,4 @@ function xhr(url) {
|
|||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue