Registers JSON-LD scripts stored in the application view `jsonld` parameter.
This should be invoked in the <head> section of your layout.
434329
public static function registerScripts()
    {
        $view = Yii::$app->getView();

        if (isset($view->params['jsonld'])) {
            foreach ($view->params['jsonld'] as $jsonld) {
                echo Html::script($jsonld, ['type' => 'application/ld+json']);
            }
        }
    }
1197671
function registerLanguage(name, syntax) {
  var lang = syntax(low)

  languages[name] = lang

  languageNames.push(name)

  if (lang.aliases) {
    registerAlias(name, lang.aliases)
  }
}
1045825
function () {
		this._super.onconfigure ();
		var data = this.dom.qdoc ( "script[type='application/json']" );
		var json = JSON.parse ( data.textContent );
		var tree = this._maketree ( json );
		new dox.Tree ( tree ).output ();
	}
236526
def action_jsonld_playground(source_path, verbose=False):
    
    import webbrowser
    BASE_URL = "https://json-ld.org/playground/#startTab=tab-expanded&json-ld="
    my_file_handle = None

    printDebug("Preparing... : %s" % str(source_path), "comment")

    try:
        my_file_handle = open(source_path)
    except IOError:
        printDebug("------------------\nFile not found or path is incorrect",
                   "important")

    if my_file_handle:

        webbrowser.open(BASE_URL + quote(my_file_handle.read()))
222845
protected function registerClientScript()
    {
        $view = $this->getView();

        BootstrapTypeAheadAsset::register($view);

        $id = $this->options['id'];

        $options = $this->clientOptions !== false && !empty($this->clientOptions) ? Json::encode($this->clientOptions) : 'null';

        foreach($this->dataSets as $dataSet) {
            if(empty($dataSet)) {
                continue;
            }
            $dataSets[] = Json::encode($dataSet);
        }

        $dataSets = !empty($dataSets) ? implode(", ", $dataSets) : '{}';

        foreach ($this->engines as $bloodhound) {
            if ($bloodhound instanceof BootstrapTypeAheadBloodhound) {
                $js[] = $bloodhound->getClientScript();
            }
        }
        $js[] = "jQuery('#$id').typeahead($options, $dataSets);";
        foreach ($this->clientEvents as $eventName => $handler) {
            $js[] = "jQuery('#$id').on('$eventName', $handler);";
        }
        $view->registerJs(implode("\n", $js));
    }
738994
public function registerClientScript()
	{
		$id=$this->htmlOptions['id'];

		$acOptions=$this->getClientOptions();
		$options=$acOptions===array()?'{}' : CJavaScript::encode($acOptions);

		$cs=Yii::app()->getClientScript();
		$cs->registerCoreScript('autocomplete');
		if($this->data!==null)
			$data=CJavaScript::encode($this->data);
		else
		{
			$url=CHtml::normalizeUrl($this->url);
			$data='"'.$url.'"';
		}
		$cs->registerScript('Yii.CAutoComplete#'.$id,"jQuery(\"#{$id}\").legacyautocomplete($data,{$options}){$this->methodChain};");

		if($this->cssFile!==false)
			self::registerCssFile($this->cssFile);
	}
757010
function addCoreInstructions() {
  this._validateInstruction = this.ajv.compile(require('jsonscript/schema/instruction.json'));
  coreInstructions.forEach(function (inst) {
    this.addInstruction(inst, instructionKeywords[inst.evaluate.validatorKeyword], false);
  }, this);
}
786946
protected function registerClientScript()
	{
		$view = $this->getView();
		UMeditorAsset::register($view);
		$id = $this->options['id'];
		$options = Json::encode($this->clientOptions);
		$js = "window.um = UM.getEditor('$id', $options);";
		$view->registerJs($js, $view::POS_READY);
	}
93490
public function registerClientScript()
    {
        /** @var TbApi $api */
        $selector = '#' . TbArray::getValue('id', $this->htmlOptions, $this->getId());
        $this->registerPlugin(TbApi::PLUGIN_TYPEAHEAD, $selector, $this->pluginOptions);
    }
598618
def jsonld(client, records):
    
    from renku.models._json import dumps
    from renku.models._jsonld import asjsonld

    data = [asjsonld(record) for record in records]
    echo_via_pager(dumps(data, indent=2))
895646
public function registerClientScript()
	{
		$id=$this->htmlOptions['id'];
		$miOptions=$this->getClientOptions();
		$options=$miOptions!==array() ? ','.CJavaScript::encode($miOptions) : '';
		$js='';
		if(is_array($this->charMap))
			$js.='jQuery.mask.definitions='.CJavaScript::encode($this->charMap).";\n";
		$js.="jQuery(\"#{$id}\").mask(\"{$this->mask}\"{$options});";

		$cs=Yii::app()->getClientScript();
		$cs->registerCoreScript('maskedinput');
		$cs->registerScript('Yii.CMaskedTextField#'.$id,$js);
	}
28509
private function registerToView()
    {
        $view = $this->getView();
        $id = \yii\helpers\Json::encode($this->options['id']);
        $editor_options = \yii\helpers\Json::encode($this->editorOptions);

        // Register the javascript to replace the $id input with an instance of ckeditor
        $view->registerJs("CKEDITOR.replace({$id}, {$editor_options});");
        CoreAsset::register($view);
    }
358925
public function registerClientScript()
    {
        $view = $this->getView();
        TagsinputAsset::register($view);
        $clientOptions = Json::encode($this->clientOptions);
        $view->registerJs("jQuery(\"#{$this->options['id']}\").tagsinput({$clientOptions});");
    }
1780
protected function registerJs()
    {
        $config['options'] = $this->options;
        $config['layerOptions'] = $this->layerOptions;
        $config['layerOptions']['layerId'] = $this->layer->getLayerId();

        $config = Json::encode($config);
        $layerClass = Json::encode($this->layerClass);

        $this->view->registerJs("
            $.ajaxSetup({
                showNoty: true // default for all ajax calls
            });
            $(document).ajaxComplete(function (event, xhr, settings) {
                if (settings.showNoty && (settings.type=='POST' || settings.container)) {
                    $.ajax({
                        url: '$this->url',
                        method: 'POST',
                        cache: false,
                        showNoty: false,
                        global: false,
                        data: {
                            layerClass: '$layerClass',
                            config: '$config'
                        },
                        success: function(data) {
                           $('#" . $this->layer->getLayerId() . "').html(data);
                        }
                    });
                }
            });
        ", View::POS_END);
    }
243813
public function registerClientScript()
    {
        /* publish assets dir */
        $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

        /* @var $cs CClientScript */
        $cs = Yii::app()->getClientScript();

        $script = $this->debugMode
            ? 'jquery.sparkline.js'
            : 'jquery.sparkline.min.js';

        $cs->registerScriptFile($assetsUrl . '/js/' . $script);

        /* initialize plugin */
        $selector = '#' . TbArray::getValue('id', $this->htmlOptions, $this->getId());

        $data = CJavaScript::encode($this->data);
        $options = CJavaScript::encode($this->pluginOptions);

        $cs->registerScript(__CLASS__ . '#' . $selector, "jQuery('{$selector}').sparkline({$data}, {$options});");
    }
1130245
protected function registerScript()
    {
        $clientOptions = (count($this->clientOptions)) ? Json::encode($this->clientOptions) : '';
        $this->getView()->registerJs("jQuery('#{$this->options['id']}').redactor({$clientOptions});");
    }
510604
static <T> T registerJSONObject(T key, Object json) {
        registeredAtleastOnce = true;
        rawJsonMap.get().put(key, json);
        return key;
    }